/* ==========================================================================
   BESA landing page — design tokens
   Values sourced from Figma file "BESA" (node 70:3647, "Concept 1")
   ========================================================================== */

:root {
  /* Color */
  --color-ink: #000000;
  --color-ink-muted: rgba(0, 0, 0, 0.64);
  --color-ink-faint: rgba(0, 0, 0, 0.12);
  --color-paper: #ffffff;
  --color-paper-muted: rgba(255, 255, 255, 0.88);
  --color-surface: #f3f1ef;
  --color-surface-hover: #fcfaf8;
  --color-accent: #ff7e1f;
  --color-border: rgba(0, 0, 0, 0.12);
  --color-overlay-diagonal: rgba(0, 0, 0, 0.4);
  --color-overlay-flat: rgba(0, 0, 0, 0.12);
  --color-overlay-video: rgba(0, 0, 0, 0.8);

  /* Typography */
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display-sans: "Hedvig Letters Sans", var(--font-sans);
  --font-display-serif: "Hedvig Letters Serif", Georgia, "Times New Roman", serif;

  --fs-xs: 0.875rem;   /* 14px — buttons */
  --fs-sm: 1rem;       /* 16px — nav, body, eyebrow */
  --fs-md: 1.25rem;    /* 20px — stat labels */
  --fs-lg: 1.875rem;   /* 30px — pull quote */
  --fs-xl: 2rem;       /* 32px — card / row titles */
  --fs-2xl: 3.5rem;    /* 56px — section headlines */
  --fs-3xl: 4rem;      /* 64px — hero / CTA headlines */
  --fs-4xl: 7rem;      /* 112px — giant stat */

  /* Spacing scale (4px base) */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-32: 8rem;    /* 128px */

  /* Radius */
  --radius-xs: 1px;
  --radius-sm: 2px;
  --radius-badge: 3px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Layout */
  --container-max: 1390px;
  --container-pad: var(--space-6);

  /* Motion */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 240ms;

  /* Scroll-reveal (fade-in-up) */
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-reveal: 0.56s;
  --reveal-distance: 22px;
  --reveal-stagger: 0.12s;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400; /* headings default to bold in the UA stylesheet; every
                        headline in this design uses a Regular display face */
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  z-index: 100;
  transition: top var(--duration-base) var(--ease-standard);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

.divider {
  height: 1px;
  background: var(--color-border);
  width: 100%;
  border: 0;
  margin: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

.btn--accent:hover {
  background: #e8710f;
}

.btn--dark {
  background: var(--color-ink);
  color: var(--color-paper);
  width: 100%;
}

.btn--dark:hover {
  background: #262626;
}

.btn--light {
  background: var(--color-paper);
  color: var(--color-ink);
  height: 48px;
}

.btn--light:hover {
  background: var(--color-surface);
}

/* ==========================================================================
   Layout shell
   ========================================================================== */

.page {
  display: flex;
  justify-content: center;
  padding: 0 var(--container-pad);
}

.page__inner {
  width: 100%;
  max-width: var(--container-max);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

@media (max-width: 900px) {
  .page {
    padding: 0;
  }
  .page__inner {
    border-left: 0;
    border-right: 0;
  }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.logo {
  display: block;
  height: 48px;
  width: auto;
  mix-blend-mode: multiply;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex: 1;
  min-width: 0;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-group--primary {
  gap: var(--space-6);
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: -0.005em;
  padding: var(--space-1) 0;
  border-bottom: 1px solid transparent;
  transition: color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--color-ink-muted);
}

.nav-item .caret {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--color-ink);
  transition: transform var(--duration-base) var(--ease-standard),
    opacity var(--duration-base) var(--ease-standard);
}

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

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

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

@media (max-width: 900px) {
  .site-header {
    padding: var(--space-3) var(--space-4);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 65px 0 0 0;
    background: var(--color-paper);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--space-6);
    padding: var(--space-6) var(--space-4);
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-standard),
      transform var(--duration-base) var(--ease-standard);
    z-index: 50;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-group {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .nav-group--primary {
    gap: var(--space-4);
  }

  .btn--header {
    width: 100%;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: var(--space-32) var(--space-6) var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.eyebrow {
  font-family: var(--font-display-sans);
  font-size: var(--fs-sm);
  color: var(--color-ink-muted);
}

.hero__headline {
  font-family: var(--font-display-serif);
  font-size: var(--fs-3xl);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0;
}

.hero__headline span.is-sans {
  font-family: var(--font-display-sans);
}

@media (max-width: 640px) {
  .hero {
    padding: var(--space-16) var(--space-4) var(--space-8);
  }
  .hero__headline {
    font-size: 2.5rem;
  }
}

/* ==========================================================================
   Highlights
   ========================================================================== */

.highlights {
  display: flex;
  overflow-x: auto;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-ink-faint) transparent;
}

.highlight {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--space-4);
  flex: 0 0 auto;
  width: 574px;
  border-right: 1px solid var(--color-border);
  padding: var(--space-6) var(--space-4) var(--space-6) var(--space-6);
  scroll-snap-align: start;
  background-color: var(--color-paper);
  transition: background-color var(--duration-base) var(--ease-standard);
}

.highlight:hover {
  background-color: var(--color-surface-hover);
}

.highlight:nth-child(2),
.highlight:nth-child(3),
.highlight:nth-child(4),
.highlight:nth-child(5) {
  width: 566px;
}

.highlight:last-child {
  border-right: 0;
}

.highlight__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex-shrink: 0;
  width: 186px;
}

.highlight__copy .btn {
  margin-top: auto;
}

.highlight__title {
  font-family: var(--font-display-serif);
  font-size: var(--fs-xl);
  font-weight: 400;
}

.highlight__desc {
  color: var(--color-ink-muted);
  font-weight: 500;
}

.highlight__media {
  flex: 1;
  min-width: 0;
  aspect-ratio: 345 / 278;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  --ripple-x: -999px;
  --ripple-y: -999px;
}

.highlight__media img {
  position: absolute;
  object-fit: cover;
}

/* The illustrations have no background of their own (transparent PNG) and
   are inset within their 345x278 frame rather than filling it — sizing them
   to 100%/cover like a photo would blow them up past their Figma proportions.
   Percentages reproduce each illustration's exact Figma inset so they scale
   correctly at any frame size. */
.highlight__media--research img {
  left: 0;
  top: 9.71%; /* 27 / 278 */
  width: 97.39%; /* 336 / 345 */
  height: 80.58%; /* 224 / 278 */
}

.highlight__media--connectivity img {
  left: 2.03%; /* 7 / 345 */
  top: 5.76%; /* 16 / 278 */
  width: 97.1%; /* 335 / 345 */
  height: 89.21%; /* 248 / 278 */
}

/* These three illustrations are exported pre-cropped to (roughly) the
   345x278 frame itself, unlike research/connectivity above which are
   exported at their full uncropped size and then inset by hand — so they
   just need to fill the frame; object-fit: cover (from .highlight__media
   img) takes care of the small aspect-ratio difference without distorting
   the image the way stretching it via mismatched width/height would. */
.highlight__media--mri img,
.highlight__media--statistics img,
.highlight__media--simulator img {
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Hover-follow noise: a second copy of the same image, distorted by
   #hover-ripple, revealed only inside a soft circle at the cursor via
   a radial-gradient mask. script.js keeps --ripple-x/--ripple-y in
   sync with the pointer; everywhere outside the circle stays fully
   transparent, so the crisp base image shows through untouched. */
.highlight__media-ripple {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-standard);
  -webkit-mask-image: radial-gradient(
    circle 46px at var(--ripple-x) var(--ripple-y),
    black 40%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle 46px at var(--ripple-x) var(--ripple-y),
    black 40%,
    transparent 100%
  );
}

.highlight__media:hover .highlight__media-ripple {
  opacity: 1;
  filter: url(#hover-ripple);
}

@media (prefers-reduced-motion: reduce), (hover: none) {
  .highlight__media:hover .highlight__media-ripple {
    opacity: 0;
  }
}

@media (max-width: 480px) {
  /* .highlight:nth-child(2)-(5) carry a fixed 566px width (above) with
     higher specificity than a plain .highlight selector, so repeating the
     :nth-child selectors here is required — otherwise those cards would
     ignore this override and stay desktop-width, overflowing the viewport. */
  .highlight,
  .highlight:nth-child(2),
  .highlight:nth-child(3),
  .highlight:nth-child(4),
  .highlight:nth-child(5) {
    width: 85vw;
    flex-wrap: wrap;
  }
  .highlight__copy {
    width: 100%;
  }
}

/* ==========================================================================
   Animated border glow (hover) — highlight cards only
   A thin conic-gradient ring, masked down to just the border (padding +
   mask-composite: exclude, no extra markup needed), sweeps slowly around
   the edge on hover. Registering --border-glow-angle as an <angle> is what
   lets the browser tween it smoothly frame-to-frame instead of snapping;
   browsers without @property support just see a static (non-spinning) ring
   — a harmless fallback, not a broken one.
   ========================================================================== */

@property --border-glow-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.highlight {
  position: relative;
}

.highlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--border-glow-angle),
    transparent 0deg,
    transparent 270deg,
    rgba(255, 126, 31, 0.08) 300deg,
    rgba(255, 126, 31, 0.65) 328deg,
    rgba(255, 200, 152, 0.9) 338deg,
    rgba(255, 126, 31, 0.65) 348deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  filter: blur(1px);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-standard);
  animation: border-glow-spin 3.5s linear infinite;
  animation-play-state: paused;
}

.highlight:hover::before {
  opacity: 1;
  animation-play-state: running;
}

@keyframes border-glow-spin {
  to {
    --border-glow-angle: 360deg;
  }
}

@media (prefers-reduced-motion: reduce), (hover: none) {
  .highlight::before {
    animation: none;
  }
  .highlight:hover::before {
    opacity: 0;
  }
}

/* ==========================================================================
   Decades / proof section
   ========================================================================== */

.decades {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-6);
}

.decades__inner {
  background: var(--color-surface);
  padding: var(--space-12) var(--space-6) var(--space-6) var(--space-12);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-16);
}

.decades__headline {
  font-family: var(--font-display-sans);
  font-size: var(--fs-2xl);
  line-height: 1.08;
  letter-spacing: -0.04em;
  width: 100%;
  margin: 0;
}

.decades__headline span.is-serif {
  font-family: var(--font-display-serif);
  letter-spacing: -0.006em;
}

.proof-cards {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

.proof-card {
  background: var(--color-paper);
  padding: var(--space-6) var(--space-6) var(--space-3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  flex: 0 0 337px;
  height: 408px;
  position: relative;
  overflow: hidden;
}

.proof-card:last-child {
  flex-basis: 338px;
}

.proof-card__label {
  font-weight: 500;
  font-size: var(--fs-md);
  max-width: 17rem;
  position: relative;
  z-index: 1;
}

.proof-card--stat .proof-card__value {
  font-family: var(--font-display-serif);
  font-size: var(--fs-4xl);
  line-height: 1;
  letter-spacing: -0.04em;
}

.proof-card--cert {
  padding: var(--space-6);
}

.proof-card--cert .proof-card__label {
  color: var(--color-paper-muted);
}

.proof-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.proof-card__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark wash — only the clinical-photo card needs it for text contrast.
   The waveform card sits on white, per the Figma spec. */
.proof-card--cert .proof-card__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(12deg, var(--color-overlay-diagonal) 25%, transparent 63%),
    linear-gradient(0deg, var(--color-overlay-flat), var(--color-overlay-flat));
}

/* The waveform illustration is cropped to a band in the middle of the
   card (76px down, 308px tall) so it never runs under the headline or
   the button above/below it — matches the Figma crop. */
.proof-card--location .proof-card__bg {
  top: 76px;
  bottom: 24px;
}

.proof-card--location .proof-card__bg img {
  /* The source illustration is much wider than the card; object-fit:cover's
     default centered crop drifts right of the Figma crop, which frames the
     waveform's peak further left. 39.9% reproduces that exact crop. */
  object-position: 39.9% 50%;
  /* Ripples the raster illustration with an animated turbulence
     displacement (defined in index.html) — reads as the waveform
     gently undulating, rather than the whole image sliding around. */
  filter: url(#wave-ripple);
  transform: scale(1.06); /* hides the displaced edges going transparent */
}

@media (prefers-reduced-motion: reduce) {
  .proof-card--location .proof-card__bg img {
    filter: none;
    transform: none;
  }
}

.proof-card__badges {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-4);
  position: relative;
  z-index: 1;
}

.proof-card__badges img {
  width: 89px;
  height: 89px;
}

.proof-card--location .proof-card__quote {
  font-family: var(--font-display-serif);
  font-size: var(--fs-lg);
  line-height: 1.16;
  position: relative;
  z-index: 1;
}

.proof-card--location .btn {
  position: relative;
  z-index: 1;
  width: auto;
  align-self: flex-start;
}

@media (max-width: 900px) {
  .proof-cards {
    flex-direction: column;
  }
  .proof-card,
  .proof-card:last-child {
    flex-basis: auto;
    width: 100%;
  }
  .decades__inner {
    align-items: stretch;
    padding: var(--space-8) var(--space-4);
  }
}

@media (max-width: 640px) {
  .decades {
    padding: var(--space-4);
  }
  .decades__headline {
    font-size: 2.25rem;
  }
}

/* ==========================================================================
   Brain signals / accordion section
   ========================================================================== */

.brain-signals__heading {
  padding: var(--space-32) var(--space-6) var(--space-12);
}

.brain-signals__heading h2 {
  font-family: var(--font-display-sans);
  font-size: var(--fs-2xl);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

.brain-signals__heading h2 span.is-serif {
  font-family: var(--font-display-serif);
}

.brain-signals__body {
  display: flex;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.accordion {
  width: 388px;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
}

.accordion-item {
  border-bottom: 1px solid var(--color-border);
}

.accordion-item:last-child {
  border-bottom: 0;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  text-align: left;
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.accordion-item:not(.is-open) .accordion-trigger:hover {
  background-color: var(--color-surface-hover);
}

.accordion-trigger__label {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-display-sans);
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
}

.accordion-trigger__dot {
  width: 12px;
  height: 12px;
  border-radius: 1.5px;
  background: var(--color-accent);
  flex-shrink: 0;
}

.accordion-item:not(.is-open) .accordion-trigger__dot {
  display: none;
}

.accordion-toggle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-badge);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.accordion-toggle::before,
.accordion-toggle::after {
  content: "";
  position: absolute;
  background: var(--color-ink);
  border-radius: 1px;
  transition: transform var(--duration-base) var(--ease-standard),
    opacity var(--duration-base) var(--ease-standard);
}

.accordion-toggle::before {
  width: 11px;
  height: 1.25px;
}

.accordion-toggle::after {
  width: 1.25px;
  height: 11px;
}

.accordion-item.is-open .accordion-toggle::after {
  transform: rotate(90deg);
  opacity: 0;
}

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-base) var(--ease-standard);
}

.accordion-item.is-open .accordion-panel {
  grid-template-rows: 1fr;
}

.accordion-panel__inner {
  overflow: hidden;
}

.accordion-panel__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: 0 var(--space-6) var(--space-6);
}

.accordion-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.accordion-details li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-ink-muted);
  font-weight: 500;
}

.accordion-details li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--color-ink-faint);
  flex-shrink: 0;
}

.accordion-panel .btn {
  width: auto;
  align-self: flex-start;
}

/* Per-item illustration inside the accordion panel. On desktop the
   illustration lives once, beside the whole accordion (.brain-signals__media
   below) and stays put regardless of which item is open. Below 1024px the
   layout stacks into a single column, so instead we tuck a copy of the
   illustration under each panel's own "Learn More" button — otherwise a
   single shared image trailing after all five items reads as unrelated to
   any of them. */
.accordion-panel__media.brain-signals__media-frame {
  display: none;
}

.brain-signals__media {
  flex: 1;
  min-width: 0;
  padding: var(--space-6);
  display: flex;
  /* .brain-signals__body stretches its row children to match height by
     default, so without this the accordion's height (which changes with
     whichever item is open) would resize the illustration along with it —
     it'd crop to a different zoom every time you switch tabs. Opting out
     of stretch keeps the illustration's own aspect ratio (below) constant
     no matter which accordion item is open. */
  align-self: flex-start;
}

.brain-signals__media-frame {
  width: 100%;
  aspect-ratio: 954 / 624;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brain-signals__media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1024px) {
  .brain-signals__body {
    flex-direction: column;
  }
  .accordion {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }
  .accordion-panel__media.brain-signals__media-frame {
    display: flex;
  }
  .brain-signals__media {
    display: none;
  }
}

@media (max-width: 640px) {
  .brain-signals__heading {
    padding: var(--space-16) var(--space-4) var(--space-8);
  }
  .brain-signals__heading h2 {
    font-size: 2.25rem;
  }
  .brain-signals__media {
    padding: var(--space-4);
  }
}

/* ==========================================================================
   Video CTA
   ========================================================================== */

.cta-video {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-6);
}

.cta-video__panel {
  position: relative;
  min-height: 476px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-12);
  overflow: hidden;
}

.cta-video__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cta-video__bg img,
.cta-video__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-video__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--color-overlay-video) 0%, transparent 72%);
}

.cta-video__headline {
  position: relative;
  z-index: 1;
  color: var(--color-paper);
  font-family: var(--font-display-sans);
  font-size: var(--fs-3xl);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

.cta-video__headline span.is-serif {
  font-family: var(--font-display-serif);
}

.cta-video__panel .btn {
  position: relative;
  z-index: 1;
  align-self: flex-start;
}

@media (max-width: 640px) {
  .cta-video__panel {
    padding: var(--space-6);
    min-height: 380px;
  }
  .cta-video__headline {
    font-size: 2.25rem;
  }
}

/* ==========================================================================
   Closing statement
   ========================================================================== */

.closing {
  padding: var(--space-32) var(--space-6) var(--space-12);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.closing h2 {
  font-family: var(--font-display-sans);
  font-size: var(--fs-2xl);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0;
}

.closing h2 span.is-serif {
  font-family: var(--font-display-serif);
}

@media (max-width: 640px) {
  .closing {
    padding: var(--space-16) var(--space-4) var(--space-8);
  }
  .closing h2 {
    font-size: 2rem;
  }
}

/* ==========================================================================
   Scroll reveal (fade-in-up)
   Text blocks start hidden and settle into place the first time they cross
   into the viewport. A .reveal-group is the unit script.js observes; its
   direct .reveal children (title, description, button, …) each read their
   own --reveal-index (set by script.js) to space themselves out via
   transition-delay, so a group's content settles in one piece at a time
   instead of all at once. A single-text block (a lone heading with nothing
   else to stagger) just carries both classes itself — see the compound
   selector below, which covers that "group is its own only child" case
   alongside the normal parent/children one. Fires once: script.js
   unobserves a group as soon as it has revealed, so scrolling back up and
   down again doesn't replay it.
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity var(--duration-reveal) var(--ease-reveal),
    transform var(--duration-reveal) var(--ease-reveal);
  transition-delay: calc(var(--reveal-index, 0) * var(--reveal-stagger));
}

.reveal-group.is-visible.reveal,
.reveal-group.is-visible .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
