/* ============================================
   MERTCOSKUN — shared design system
   Loaded by the subpages. index.html carries its
   own inline copy of these rules.
   ============================================ */

:root {
  /* Colors */
  --color-primary: #C4784A;
  --color-primary-dark: #9E5A32;
  --color-neutral: #F5F0EB;
  --color-neutral-dark: #E8E0D8;
  --color-accent: #2C1810;
  --color-text: #1A1A1A;
  --color-text-light: #6B6B6B;

  /* Typography */
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Liquid Glass Tokens */
  --glass-tint: 255, 255, 255;
  --glass-blur: 20px;
  --glass-saturation: 180%;
  --glass-bg-opacity: 0.08;
  --glass-bg-opacity-hover: 0.12;
  --glass-border-opacity: 0.18;
  --glass-border-opacity-hover: 0.28;
  --glass-highlight-opacity: 0.15;
  --glass-highlight-opacity-hover: 0.25;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --glass-shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.12);
  --glass-radius: 20px;
  --glass-radius-sm: 12px;
  --glass-radius-lg: 28px;
  --glass-transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --glass-transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Glass on dark backgrounds */
  --glass-dark-bg-opacity: 0.12;
  --glass-dark-bg-opacity-hover: 0.18;
  --glass-dark-border-opacity: 0.15;
  --glass-dark-border-opacity-hover: 0.25;
  --glass-dark-highlight-opacity: 0.1;
  --glass-dark-highlight-opacity-hover: 0.18;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-neutral);
  color: var(--color-text);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   NAVIGATION
   ============================================ */

nav {
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-lg);
}

/* .glass sets `position: relative`, which outranks the `nav` element selector
   and would unpin the bar. Restore it here where the class actually applies. */
nav.glass {
  position: fixed;
}

nav .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

nav .logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

nav ul {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

nav .nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: none;
  border: 1px solid rgba(44, 24, 16, 0.15);
  border-radius: 10px;
  cursor: pointer;
}

nav .nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

nav .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
nav .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

nav a:hover { color: var(--color-primary); }
nav a:hover::after { width: 100%; }

/* Dark hero pages flip the nav to light text */
.glass-dark nav,
body.nav-dark nav {
  color: #fff;
}

body.nav-dark nav .logo,
body.nav-dark nav a { color: #fff; }
body.nav-dark nav .nav-toggle { border-color: rgba(255, 255, 255, 0.25); }
body.nav-dark nav .nav-toggle span { background: #fff; }

/* Only the mobile dropdown carries its own panel. On desktop the <ul> sits
   inside the nav's glass, and a second fill would read as a mismatched box. */
@media (max-width: 768px) {
  body.nav-dark nav ul {
    background: rgba(44, 24, 16, 0.9);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* The bar floats over a dark hero, then over pale sections as you scroll. A
   white-based tint vanishes against the latter, so the dark page navs carry
   their own dark fill to keep white text legible at every scroll depth. */
body.nav-dark nav.glass {
  --glass-tint: 44, 24, 16;
  --glass-bg-opacity: 0.55;
  --glass-bg-opacity-hover: 0.7;
  --glass-highlight-opacity: 0.1;
  --glass-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

/* ============================================
   LIQUID GLASS SYSTEM
   ============================================ */

.glass {
  position: relative;
  isolation: isolate;
}

.glass::before,
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}

.glass::before {
  background: rgba(var(--glass-tint), var(--glass-bg-opacity));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  z-index: -2;
}

.glass::after {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, var(--glass-highlight-opacity)) 0%,
    rgba(255, 255, 255, calc(var(--glass-highlight-opacity) * 0.3)) 35%,
    rgba(255, 255, 255, calc(var(--glass-highlight-opacity) * 0.15)) 65%,
    rgba(255, 255, 255, var(--glass-highlight-opacity)) 100%
  );
  opacity: 0.9;
}

.glass {
  border: 1px solid rgba(255, 255, 255, var(--glass-border-opacity));
  border-radius: var(--glass-radius);
  box-shadow:
    var(--glass-shadow),
    inset 0 1px 0 rgba(255, 255, 255, calc(var(--glass-highlight-opacity) * 1.5)),
    inset 0 -1px 0 rgba(255, 255, 255, calc(var(--glass-highlight-opacity) * 0.5));
  transition:
    background var(--glass-transition),
    border-color var(--glass-transition),
    box-shadow var(--glass-transition),
    backdrop-filter var(--glass-transition);
}

/* Variants */

.glass-subtle {
  --glass-bg-opacity: 0.05;
  --glass-highlight-opacity: 0.08;
  --glass-border-opacity: 0.12;
  --glass-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  --glass-radius: var(--glass-radius-sm);
}

.glass-elevated {
  --glass-bg-opacity: 0.12;
  --glass-highlight-opacity: 0.2;
  --glass-border-opacity: 0.22;
  --glass-shadow: var(--glass-shadow-elevated);
  --glass-radius: var(--glass-radius-lg);
}

.glass-nav {
  --glass-bg-opacity: 0.08;
  --glass-highlight-opacity: 0.12;
  --glass-border-opacity: 0.15;
  --glass-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --glass-radius: 0;
  border-left: none;
  border-right: none;
  border-radius: 0;
}

.glass-nav::after {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, var(--glass-highlight-opacity)) 0%,
    rgba(255, 255, 255, calc(var(--glass-highlight-opacity) * 0.4)) 50%,
    rgba(255, 255, 255, var(--glass-highlight-opacity)) 100%
  );
}

.glass-button {
  --glass-bg-opacity: 0.1;
  --glass-highlight-opacity: 0.18;
  --glass-border-opacity: 0.2;
  --glass-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --glass-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-accent);
  cursor: pointer;
  transition:
    background var(--glass-transition-fast),
    border-color var(--glass-transition-fast),
    box-shadow var(--glass-transition-fast),
    transform var(--glass-transition-fast);
}

.glass-button:hover {
  --glass-bg-opacity: 0.16;
  --glass-highlight-opacity: 0.3;
  --glass-border-opacity: 0.35;
  --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.glass-button:active {
  transform: translateY(0);
  --glass-bg-opacity: 0.14;
  --glass-highlight-opacity: 0.22;
  --glass-border-opacity: 0.28;
}

.glass-button-primary {
  --glass-bg-opacity: 0.12;
  --glass-highlight-opacity: 0.18;
  --glass-border-opacity: 0.22;
  --glass-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --glass-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.glass-button-primary:hover {
  --glass-bg-opacity: 0.18;
  --glass-highlight-opacity: 0.3;
  --glass-border-opacity: 0.4;
  --glass-shadow: 0 8px 24px rgba(196, 120, 74, 0.3);
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  color: #fff;
}

.glass-button-secondary {
  --glass-bg-opacity: 0.08;
  --glass-highlight-opacity: 0.15;
  --glass-border-opacity: 0.2;
  --glass-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --glass-radius: 8px;
  background: transparent;
  color: var(--color-primary);
  border: 1px solid rgba(196, 120, 74, 0.5);
}

.glass-button-secondary:hover {
  --glass-bg-opacity: 0.14;
  --glass-highlight-opacity: 0.25;
  --glass-border-opacity: 0.35;
  --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: #fff;
  color: var(--color-accent);
  border-color: #fff;
}

/* Dark surface variant - for dark backgrounds */
.glass-dark,
.glass-dark .glass,
.glass-dark .glass-subtle,
.glass-dark .glass-elevated,
.glass-dark .glass-nav,
.glass-dark .glass-button {
  --glass-bg-opacity: var(--glass-dark-bg-opacity);
  --glass-bg-opacity-hover: var(--glass-dark-bg-opacity-hover);
  --glass-border-opacity: var(--glass-dark-border-opacity);
  --glass-border-opacity-hover: var(--glass-dark-border-opacity-hover);
  --glass-highlight-opacity: var(--glass-dark-highlight-opacity);
  --glass-highlight-opacity-hover: var(--glass-dark-highlight-opacity-hover);
  --glass-saturation: 150%;
}

.glass-dark .glass-button:hover {
  --glass-bg-opacity: var(--glass-dark-bg-opacity-hover);
  --glass-highlight-opacity: var(--glass-dark-highlight-opacity-hover);
  --glass-border-opacity: var(--glass-dark-border-opacity-hover);
}

.glass-dark .glass-button-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.glass-dark .glass-button-secondary:hover {
  background: #fff;
  color: var(--color-accent);
  border-color: #fff;
}

/* Interactive states */
.glass:hover,
.glass-subtle:hover,
.glass-elevated:hover {
  --glass-bg-opacity: var(--glass-bg-opacity-hover);
  --glass-border-opacity: var(--glass-border-opacity-hover);
  --glass-highlight-opacity: var(--glass-highlight-opacity-hover);
}

/* Focus visible for accessibility */
.glass-button:focus-visible,
.glass-nav a:focus-visible,
a.glass:focus-visible,
a.glass-subtle:focus-visible,
nav a:focus-visible,
#contact a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Fallback for no backdrop-filter support */
@supports not (backdrop-filter: blur(1px)) {
  .glass::before,
  .glass-subtle::before,
  .glass-elevated::before,
  .glass-nav::before,
  .glass-button::before {
    background: rgba(245, 240, 235, 0.92) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .glass-dark::before,
  .glass-dark .glass::before {
    background: rgba(44, 24, 16, 0.9) !important;
  }
}

/* ============================================
   SUBPAGE HERO
   ============================================ */

#hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--space-3xl) + var(--space-xl)) var(--space-lg) var(--space-3xl);
  background: var(--color-accent);
  color: #fff;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(196, 120, 74, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 80%, rgba(196, 120, 74, 0.1) 0%, transparent 55%);
  pointer-events: none;
}

#hero .container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

#hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

#hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: #fff;
}

#hero .subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  font-weight: 400;
  font-style: italic;
}

#hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

#hero .image-frame {
  width: 100%;
  border-radius: var(--glass-radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  line-height: 0;
}

#hero .image-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   SECTION SHELLS
   ============================================ */

.section {
  padding: var(--space-3xl) var(--space-lg);
}

.section .container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-accent);
  text-align: center;
  margin-bottom: var(--space-xl);
  letter-spacing: -0.02em;
}

.section-light { background: #fff; }
.section-tint { background: linear-gradient(135deg, var(--color-neutral) 0%, var(--color-neutral-dark) 100%); }
.section-dark { background: var(--color-accent); color: #fff; }
.section-dark .section-heading { color: #fff; }

.section-intro {
  max-width: 60ch;
  margin: calc(var(--space-xl) * -1) auto var(--space-xl);
  text-align: center;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ============================================
   GALLERY (Mertcoart)
   ============================================ */

#gallery .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

#gallery .tile {
  display: block;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  line-height: 0;
}

#gallery .tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#gallery .tile:hover img {
  transform: scale(1.06);
}

/* ============================================
   PROCESS STEPS (BiosignalX)
   ============================================ */

#process .steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

#process .step {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

#process .step-number {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  color: var(--color-primary);
  opacity: 0.45;
  line-height: 1;
  letter-spacing: -0.02em;
}

#process .step h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--color-accent);
  font-weight: 600;
}

#process .step p {
  color: var(--color-text-light);
  line-height: 1.7;
  font-size: 0.98rem;
}

/* ============================================
   PRODUCT SHOWCASE (BiosignalX)
   ============================================ */

#product .showcase {
  border-radius: var(--glass-radius);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(44, 24, 16, 0.12);
  line-height: 0;
}

#product .showcase img {
  width: 100%;
  height: auto;
  display: block;
}

#product .caption {
  margin-top: var(--space-lg);
  text-align: center;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ============================================
   PROSE (About on subpages)
   ============================================ */

#about .container {
  max-width: 780px;
  margin: 0 auto;
}

#about h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

#about .prose p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

#about .prose p:last-child { margin-bottom: 0; }

/* ============================================
   CONTACT
   ============================================ */

#contact {
  padding: var(--space-3xl) var(--space-lg);
  background: var(--color-accent);
  text-align: center;
  color: #fff;
}

#contact .container {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}

#contact h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: var(--space-md);
  color: #fff;
  letter-spacing: -0.02em;
}

/* The heading itself is the booking call-to-action */
#contact h2 a {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  padding: var(--space-xs) var(--space-md);
  border-radius: 8px;
  background: var(--color-primary);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#contact h2 a:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 120, 74, 0.3);
}

#contact p {
  opacity: 0.8;
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

#contact .social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

/* All three read as one set: copper at rest, white on hover */
#contact .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

#contact .social-link:hover {
  color: #fff;
  transform: translateY(-4px);
}

/* Google Maps ships a fixed-colour logo, so match it to the pair at rest */
#contact .social-link[aria-label="Google Maps"] svg path:nth-child(1) { fill: var(--color-primary); }
#contact .social-link[aria-label="Google Maps"] svg path:nth-child(2) { fill: var(--color-primary); }
#contact .social-link[aria-label="Google Maps"] svg path:nth-child(3) { fill: var(--color-primary); }
#contact .social-link[aria-label="Google Maps"] svg path:nth-child(4) { fill: var(--color-primary); }

#contact .social-link[aria-label="Google Maps"]:hover svg path:nth-child(1) { fill: #fff; }
#contact .social-link[aria-label="Google Maps"]:hover svg path:nth-child(2) { fill: #fff; }
#contact .social-link[aria-label="Google Maps"]:hover svg path:nth-child(3) { fill: #fff; }
#contact .social-link[aria-label="Google Maps"]:hover svg path:nth-child(4) { fill: #fff; }

#contact a.email,
#contact .email {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--glass-radius-sm);
  transition: color 0.3s ease;
}

#contact .email:hover { color: #fff; }

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: var(--space-lg);
  background: var(--color-accent);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer nav,
footer .nav-toggle { display: none; }

footer .legal-links {
  margin-top: var(--space-xs);
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  font-size: 0.8rem;
}

footer .legal-links a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color var(--glass-transition-fast);
}

footer .legal-links a:hover { color: #fff; }

footer .legal-links a:focus-visible {
  color: #fff;
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  nav .nav-toggle { display: flex; }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--space-sm) 0;
  }

  nav ul.open { display: flex; }

  nav ul li { text-align: center; }

  nav ul a {
    display: block;
    padding: var(--space-sm) 0;
  }

  nav ul a::after { display: none; }

  #hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  #hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions { justify-content: center; }

  #contact .container { padding: var(--space-xl) var(--space-md); }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   MERTCOART — glass frame, gallery video,
   scroll sequence, process video
   ============================================ */

/* A black liquid-glass pane: dark frosted tint, bright rim, specular sweep.
   Tuned for the site's light sections, where it reads as a dark frame. */
.glassframe {
  position: relative;
  isolation: isolate;
}

.glassframe__glass {
  position: relative;
  height: 100%;
  padding: 0.7rem;
  border-radius: 2rem;
  background: linear-gradient(150deg, rgba(60, 60, 68, 0.92), rgba(18, 18, 22, 0.96) 45%, rgba(40, 40, 46, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 22px rgba(255, 255, 255, 0.08),
    0 24px 48px -16px rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.3);
}

.glassframe__glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 28%);
  mix-blend-mode: soft-light;
}

.glassframe__screen {
  position: relative;
  height: 100%;
  border-radius: 1.45rem;
  overflow: hidden;
  background: #202026;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.glassframe__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
}

.glassframe__video.is-live { opacity: 1; }

/* Opening veil: the mark on dark, held, then dissolved to reveal the footage. */
.glassframe__intro {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #202026, #16161a 75%);
  opacity: 0;
  animation: glass-veil 1.6s ease-in-out forwards;
}

.glassframe__intro.is-first { opacity: 1; animation-name: glass-veil-first; }

.glassframe__intro img {
  width: 58%;
  height: auto;
  opacity: 0;
  animation: glass-mark 1.6s ease-in-out forwards;
}

.glassframe__intro.is-waiting,
.glassframe__intro.is-waiting img { animation-play-state: paused; }

.glassframe__intro.is-first img { animation-name: glass-mark-first; }

@keyframes glass-veil {
  0% { opacity: 0; }
  26%, 59% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes glass-veil-first {
  0%, 59% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes glass-mark {
  0% { opacity: 0; transform: scale(0.94); }
  18%, 59% { opacity: 1; transform: scale(1); }
  88%, 100% { opacity: 0; transform: scale(1.03); }
}

@keyframes glass-mark-first {
  0% { opacity: 0; transform: scale(0.94); }
  18%, 59% { opacity: 1; transform: scale(1); }
  88%, 100% { opacity: 0; transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .glassframe__intro { display: none; }
}

/* Gallery: 4 columns by 6 rows. The video fills the middle two columns of the
   middle four rows, so the 16 photos wrap it exactly (4 + 4 + 4 + 4). */
#gallery .gallery-video {
  grid-column: 2 / 4;
  grid-row: 2 / 6;
  min-height: 0;
}

#gallery .gallery-video .glassframe__glass { padding: 0.9rem; border-radius: 2.2rem; }
#gallery .gallery-video .glassframe__screen { border-radius: 1.5rem; }

@media (max-width: 700px) {
  #gallery .grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
  #gallery .gallery-video {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 9 / 14;
  }
}

/* Pinned scroll sequence */
.seq {
  position: relative;
  background: #16161a;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.seq__glass {
  width: min(calc(100% - 2 * var(--space-md)), 72rem, calc((100svh - 13rem) * 16 / 9));
  margin-top: 3rem;
}

.seq__screen { aspect-ratio: 16 / 9; height: auto; }

@media (min-width: 768px) {
  .seq__glass .glassframe__glass { padding: 0.9rem; border-radius: 2rem; }
  .seq__screen { border-radius: 1.3rem; }
}

.seq__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.seq__still { display: block; width: 100%; height: 100%; object-fit: cover; }

.seq--static { height: auto; padding: var(--space-2xl) 0; }

.seq__loading,
.seq__cue {
  position: absolute;
  inset-inline: 0;
  bottom: var(--space-lg);
  text-align: center;
  color: #a8a49d;
}

.seq__loading[hidden],
.seq__cue[hidden] { display: none; }

.seq__count {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: #f4f1ec;
  font-variant-numeric: tabular-nums;
}

.seq__label,
.seq__cue {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* About the Process: copy on the left, video in a glass frame on the right */
#about .about-split {
  max-width: 1080px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: var(--space-2xl);
  align-items: center;
}

#about .prose a {
  color: var(--color-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.process-media { aspect-ratio: 776 / 960; }
.process-media .glassframe__screen { border-radius: 1.4rem; }
.process-video { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 800px) {
  #about .about-split { grid-template-columns: 1fr; gap: var(--space-xl); }
  .process-media { width: min(100%, 340px); margin: 0 auto; }
}

#about .about-copy .section-heading { text-align: left; }

/* Process video: the footage dissolves into the mark at the end of each pass and
   back out of it at the start of the next. */
.process-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #202026, #16161a 75%);
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.process-veil.is-on { opacity: 1; }
.process-veil[hidden] { display: none; }
.process-veil img { width: 52%; height: auto; }

/* ============================================
   ACCESSIBILITY, CTA, FAQ, MILESTONES
   ============================================ */

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -4rem;
  z-index: 1000;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--glass-radius-sm);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus { top: var(--space-sm); }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 3px;
}

.cta-button {
  display: inline-block;
  padding: 14px 32px;
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

/* FAQ: native details/summary, so it works without JavaScript */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-list details {
  border-bottom: 1px solid var(--color-neutral-dark);
}

.faq-list summary {
  position: relative;
  padding: var(--space-md) var(--space-xl) var(--space-md) 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-accent);
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--color-primary-dark);
  transition: transform 0.3s ease;
}

.faq-list details[open] summary::after { content: '\2212'; }

.faq-list .faq-answer {
  padding: 0 0 var(--space-md);
  color: var(--color-text-light);
  line-height: 1.8;
}

.faq-list .faq-answer a {
  color: var(--color-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-more {
  text-align: center;
  margin-top: var(--space-xl);
}

/* Milestones (BiosignalX) */
.milestones {
  list-style: none;
  max-width: 780px;
  margin: 0 auto;
  padding: 0;
  border-left: 2px solid var(--color-neutral-dark);
}

.milestones li {
  position: relative;
  padding: 0 0 var(--space-lg) var(--space-lg);
}

.milestones li:last-child { padding-bottom: 0; }

.milestones li::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-neutral-dark);
}

.milestones li[data-status="current"]::before {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.milestones h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.milestones .status {
  display: inline-block;
  margin-left: var(--space-xs);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--color-neutral);
  border: 1px solid var(--color-neutral-dark);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-light);
  vertical-align: middle;
}

.milestones li[data-status="current"] .status {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
}

.milestones p { color: var(--color-text-light); line-height: 1.7; }

footer .legal-links { flex-wrap: wrap; }
footer .legal-links a { padding: 8px 4px; }

/* The mark shown in the frame while the sequence loads, then dissolved away. */
.seq__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #202026, #16161a 75%);
  transition: opacity 0.8s ease-in-out;
}

.seq__veil.is-off { opacity: 0; }
.seq__veil img { width: min(22%, 11rem); height: auto; }
