/* ============================================
   BIOMEDON — Design System
   Swiss Precision + Commercial Warmth
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Variables --- */
:root {
  /* Brand */
  --blue: #0095ff;
  --blue-dark: #0077cc;
  --blue-light: #e6f4ff;
  --red: #e40521;

  /* Neutrals */
  --black: #111111;
  --dark: #1A1A1A;
  --gray-900: #222222;
  --gray-700: #555555;
  --gray-400: #999999;
  --gray-200: #E5E5E5;
  --gray-100: #F5F5F5;
  --white: #FFFFFF;

  /* Semantic */
  --text-primary: var(--black);
  --text-secondary: var(--gray-700);
  --text-muted: var(--gray-400);
  --bg-primary: var(--white);
  --bg-secondary: var(--gray-100);
  --bg-dark: var(--dark);
  --bg-footer: var(--black);
  --accent: var(--blue);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-base: 17px;
  --text-sm: 14px;
  --text-xs: 12px;
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 42px;
  --text-4xl: 56px;
  --line-height: 1.6;

  /* Spacing */
  --section-padding: 80px;
  --container-max: 1200px;
  --container-padding: 24px;

  /* Transitions */
  --transition: 0.3s ease;
  --transition-slow: 0.4s ease;
}

@media (min-width: 768px) {
  :root {
    --container-padding: 48px;
    --section-padding: 100px;
  }
}

@media (min-width: 1024px) {
  :root {
    --container-padding: 80px;
    --section-padding: 120px;
  }
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--line-height);
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--blue-dark);
}

ul, ol {
  list-style: none;
}

/* --- Layout --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  width: 100%;
}

.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

.section--gray {
  background: var(--bg-secondary);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--white);
}

.section--footer {
  background: var(--bg-footer);
  color: var(--gray-400);
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: 32px;
}

.grid--2 {
  grid-template-columns: 1fr;
}

.grid--3 {
  grid-template-columns: 1fr;
}

.grid--4 {
  grid-template-columns: 1fr;
}

.grid--2x2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--2x2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Typography --- */
.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.section--dark .section-label {
  color: var(--gray-400);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
}

h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
}

h2 {
  font-size: var(--text-2xl);
  margin-bottom: 24px;
}

h3 {
  font-size: var(--text-xl);
  margin-bottom: 16px;
}

h4 {
  font-size: var(--text-lg);
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }
}

.section-intro {
  max-width: 700px;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-size: var(--text-lg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 500;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--text-primary);
}

.btn-white:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

/* --- Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card__body {
  padding: 24px;
}

.card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 4px;
}

.card__subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.card__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.card__link:hover {
  gap: 10px;
}

.card--large .card__body {
  padding: 32px;
}

/* --- Image Placeholder --- */
.image-placeholder {
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
}

.image-placeholder span {
  color: var(--gray-700);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.header--transparent {
  background: transparent;
  border-bottom-color: transparent;
}

.header--transparent.scrolled {
  background: var(--white);
  border-bottom-color: var(--gray-200);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}

.header__logo svg {
  height: 22px;
  width: auto;
}

@media (min-width: 768px) {
  .header__logo svg {
    height: 32px;
  }
}

.header--transparent:not(.scrolled) .header__logo svg .logo-blue {
  fill: var(--white);
}

.header--transparent:not(.scrolled) .header__logo svg .logo-red {
  fill: #e40521;
}

.header--transparent:not(.scrolled) .header__logo svg .logo-white-bg {
  fill: var(--white);
}

.header__nav {
  display: none;
  align-items: center;
  gap: 36px;
}

.header__nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  padding: 4px 0;
}

.header--transparent:not(.scrolled) .header__nav a {
  color: var(--white);
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.header__nav a:hover::after,
.header__nav a.active::after {
  width: 100%;
}

.header__nav a:hover {
  color: var(--accent);
}

.header--transparent:not(.scrolled) .header__nav a:hover {
  color: var(--accent);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  gap: 4px;
}

.header--transparent:not(.scrolled) .lang-switch {
  color: rgba(255, 255, 255, 0.6);
}

.lang-switch a {
  color: inherit;
  padding: 4px 6px;
}

.lang-switch a.active {
  color: var(--text-primary);
}

.header--transparent:not(.scrolled) .lang-switch a.active {
  color: var(--white);
}

.lang-switch a:hover {
  color: var(--accent);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition);
}

.header--transparent:not(.scrolled) .hamburger span {
  background: var(--white);
}

.hamburger.active span {
  background: var(--text-primary) !important;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--white);
  z-index: 999;
  padding: 96px 32px 48px;
  transition: right var(--transition-slow);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  display: block;
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--text-primary);
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--accent);
}

.mobile-menu__lang {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  padding-top: 16px;
}

.mobile-menu__lang a {
  font-size: var(--text-base);
  border: none;
  padding: 8px 16px;
  display: inline-block;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }

  .hamburger {
    display: none;
  }
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.hero--full {
  height: 100vh;
}

.hero--compact {
  height: auto;
  min-height: 0;
  padding: 140px 0 80px;
}

.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 0 var(--container-padding);
}

.hero__logo {
  margin: 0 auto 32px;
  max-width: 320px;
}

.hero__logo svg {
  width: 100%;
  height: auto;
}

.hero__title {
  font-size: var(--text-2xl);
  font-weight: 300;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hero__subtitle {
  font-size: var(--text-base);
  font-weight: 400;
  opacity: 0.8;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__swiss-cross {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #e40521;
  position: relative;
  flex-shrink: 0;
}

.hero__swiss-cross::before,
.hero__swiss-cross::after {
  content: '';
  position: absolute;
  background: #e40521;
}

.hero__swiss-cross::before {
  width: 60%;
  height: 20%;
  top: 40%;
  left: 20%;
  background: var(--white);
}

.hero__swiss-cross::after {
  width: 20%;
  height: 60%;
  top: 20%;
  left: 40%;
  background: var(--white);
}

.hero--compact .hero__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.hero--compact .hero__subtitle {
  font-size: var(--text-lg);
  letter-spacing: 0;
  text-transform: none;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero--full {
    height: 100vh;
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .hero__logo {
    max-width: 400px;
  }

  .hero--compact {
    padding: 160px 0 100px;
  }

  .hero--compact .hero__title {
    font-size: var(--text-4xl);
  }
}

/* --- Capability Cards --- */
.capability {
  text-align: left;
}

.capability__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.capability__icon svg {
  width: 100%;
  height: 100%;
}

.capability__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 12px;
}

.capability__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Swiss Made Section --- */
.swiss-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 768px) {
  .swiss-section {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.swiss-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.swiss-badge__cross {
  width: 20px;
  height: 20px;
  background: var(--red);
  position: relative;
  flex-shrink: 0;
}

.swiss-badge__cross::before,
.swiss-badge__cross::after {
  content: '';
  position: absolute;
  background: var(--white);
}

.swiss-badge__cross::before {
  width: 60%;
  height: 20%;
  top: 40%;
  left: 20%;
}

.swiss-badge__cross::after {
  width: 20%;
  height: 60%;
  top: 20%;
  left: 40%;
}

.swiss-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Client Logos */
.client-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin-top: 48px;
}

.client-logo {
  padding: 16px 24px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.client-logo span {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-400);
}

/* --- Logo Carousel --- */
.logo-carousel {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logo-carousel__track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: logo-scroll 25s linear infinite;
}

.logo-carousel__track:hover {
  animation-play-state: paused;
}

@keyframes logo-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.client-logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.45;
  transition: all var(--transition);
  flex-shrink: 0;
}

.client-logo-img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.contact-info h3 {
  color: var(--white);
  margin-bottom: 24px;
}

.contact-info p {
  color: var(--gray-400);
  margin-bottom: 8px;
  line-height: 1.7;
}

.contact-info a {
  color: var(--gray-400);
  transition: color var(--transition);
}

.contact-info a:hover {
  color: var(--white);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--gray-400);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  outline: none;
  transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-400);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Light form variant (for contact page) */
.form--light .form-group label {
  color: var(--text-secondary);
}

.form--light .form-group input,
.form--light .form-group textarea {
  color: var(--text-primary);
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.form--light .form-group input:focus,
.form--light .form-group textarea:focus {
  border-color: var(--accent);
}

/* Honeypot */
.form-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* --- Spec Table --- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid var(--gray-200);
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table td {
  padding: 14px 0;
  font-size: var(--text-sm);
  vertical-align: top;
}

.spec-table td:first-child {
  font-weight: 500;
  color: var(--text-primary);
  width: 40%;
  padding-right: 24px;
}

.spec-table td:last-child {
  color: var(--text-secondary);
}

/* --- Key Features --- */
.feature {
  padding: 24px;
  border-left: 3px solid var(--accent);
}

.feature__title {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 8px;
}

.feature__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Product Detail --- */
.product-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

@media (min-width: 768px) {
  .product-intro {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.product-description {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
}

.product-description p + p {
  margin-top: 16px;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 64px 0;
  border-top: 1px solid var(--gray-200);
}

.cta-section h3 {
  margin-bottom: 8px;
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* --- Footer --- */
.footer {
  background: var(--bg-footer);
  padding: 48px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.footer__logo svg {
  height: 24px;
  width: auto;
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--gray-400);
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--gray-700);
  margin-top: 8px;
}

.footer__links {
  display: flex;
  gap: 24px;
  margin-top: 4px;
}

.footer__links a {
  font-size: var(--text-xs);
  color: var(--gray-700);
}

.footer__links a:hover {
  color: var(--gray-400);
}

/* --- Google Maps --- */
.map-container {
  width: 100%;
  height: 400px;
  margin-top: 48px;
  border: 1px solid var(--gray-200);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(20%);
}

/* --- About Approach Cards --- */
.approach-card {
  padding: 32px;
  border: 1px solid var(--gray-200);
  background: var(--white);
}

.approach-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 12px;
}

.approach-card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Expertise Tags --- */
.expertise-tag {
  padding: 24px;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
}

.expertise-tag__title {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 8px;
}

.expertise-tag__text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* --- Utilities --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-48 { margin-bottom: 48px; }

/* --- Alert Messages --- */
.alert {
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: var(--text-sm);
}

.alert--success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 3px solid #2e7d32;
}

.alert--error {
  background: #fbe9e7;
  color: #c62828;
  border-left: 3px solid #c62828;
}
