@font-face {
  font-family: 'Movement Sora';
  src: url('./fonts/sora.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Movement Space';
  src: url('./fonts/space-grotesk.ttf') format('truetype');
  font-display: swap;
}

body.movement-page {
  color-scheme: dark;
  background: #06142a;
  color: #f6f8fc;
}

html:has(body.movement-page) { scroll-padding-top: calc(var(--site-nav-height, 6rem) + 24px); }

/* Page styles stay inside the shared site navigation and footer. */
.movement {
  --ink: #f6f8fc;
  --muted: #aebed2;
  --blue: #2a8bff;
  --navy: #06142a;
  --panel: #0b1f3a;
  --line: #ffffff1f;
  --gold: var(--mw-accent, #ff7c3b);
  font: 16px/1.65 'Movement Space', sans-serif;
  background: radial-gradient(ellipse at 90% 10%, #106ebc12, transparent 42%);

  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }
  h1, h2, h3, p { margin: 0; }
  h1, h2, h3 {
    color: var(--ink);
    font-family: 'Movement Sora', sans-serif;
    font-weight: 600;
    line-height: 1.13;
    letter-spacing: -.045em;
  }
  em { font-style: normal; color: var(--gold); }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; }
  button { cursor: pointer; }
  a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  :is(a, button, summary):focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
  img, video { display: block; max-width: 100%; height: auto; }
  .shell { width: min(calc(100% - 96px), 1440px); margin-inline: auto; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .skip-link { position: absolute; transform: translateY(-200px); padding: 12px 20px; background: var(--gold); color: var(--navy); z-index: 60; }
  .skip-link:focus { transform: none; }
  .experience { width: 100%; }
  .journey-player { width: 100%; min-width: 0; }

  /* Size the stage itself to the uncropped media so overlays stay inside the image. */
  .scene-stage { --scene-max-height: max(180px, calc(100svh - var(--site-nav-height, 6rem) - 121px)); position: relative; width: min(100%, 1536px, calc(var(--scene-max-height) * 16 / 9)); margin-inline: auto; aspect-ratio: 16/9; overflow: hidden; background: #040d1b; isolation: isolate; container-type: inline-size; }
  .scene-stage picture, .scene-stage video { position: absolute; inset: 0; width: 100%; height: 100%; }
  .scene-stage picture { z-index: 1; will-change: transform; transform-origin: center; }
  .scene-stage picture img { width: 100%; height: 100%; object-fit: contain; }
  .scene-stage video { object-fit: contain; opacity: 0; z-index: 2; }
  .scene-stage.has-video video { opacity: 1; }
  .scene-stage.has-video picture { visibility: hidden; }
  #held-frame { object-fit: contain; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
  .scene-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 43%, rgba(6,20,42,.14) 60%, rgba(6,20,42,.74)); z-index: 3; pointer-events: none; }
  .scene-heading { position: absolute; left: 5%; right: clamp(210px, 25%, 280px); bottom: 9%; z-index: 4; text-align: left; pointer-events: none; color: #eaf2f3; }
  .scene-heading { transition: none; will-change: opacity; }
  .scene-heading h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(11px, 1.4cqw, 15px); color: var(--gold); font-weight: 600; letter-spacing: .22em; line-height: 1.2; text-transform: uppercase; text-shadow: 0 2px 12px #06142a90; }
  .scene-heading h2::before { content: ''; width: 28px; height: 2px; flex-shrink: 0; background: var(--gold); }
  .scene-heading #scene-caption { margin: 14px 0 0; padding: 0; max-width: 24ch; background: transparent; color: #fff; font-family: 'Movement Sora', sans-serif; font-size: clamp(24px, 4cqw, 48px); font-weight: 600; line-height: 1.12; letter-spacing: -.04em; text-wrap: balance; text-shadow: 0 2px 20px #06142a90; }
  .journey-continue { position: absolute; right: 5%; bottom: 9%; z-index: 5; display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 52px; padding: 12px 22px; border: 1px solid var(--mw-accent-hover, #ff965f); border-radius: 32px; background: linear-gradient(135deg, var(--mw-accent-hover, #ff965f), var(--mw-accent, #ff7c3b)); color: var(--navy); box-shadow: 0 8px 28px #02081540; font-size: 14px; font-weight: 600; white-space: nowrap; }
  .journey-continue:not([hidden]) { animation: journey-continue-enter .55s cubic-bezier(.22, 1, .36, 1) both; }
  .journey-continue:hover { background: var(--mw-accent-hover, #ff965f); }
  .journey-continue:focus-visible { outline-color: #fff; }
  .journey-continue svg { flex-shrink: 0; }
  .loading-indicator { position: absolute; top: 20px; right: 20px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 9px 15px; border-radius: 24px; color: white; background: #06142adb; font-size: 12px; }
  .loading-indicator span { height: 14px; width: 14px; border: 2px solid #ffffff45; border-top-color: var(--gold); border-radius: 50%; animation: journey-loading-spin .8s linear infinite; }


  .journey-dock { display: flex; align-items: center; min-height: 96px; padding-inline: max(24px, calc((100vw - 1440px) / 2)); border-bottom: 1px solid var(--line); background: var(--navy); }
  .section-nav { display: flex; flex: 1; min-width: 0; }
  .section-link { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; min-height: 76px; padding: 10px 28px; font-family: 'Movement Sora', sans-serif; font-size: 17px; font-weight: 500; transition: color .2s, background .2s; }
  .section-link + .section-link { border-left: 1px solid var(--line); }
  .section-link small { display: block; margin-top: 7px; color: var(--muted); font-family: 'Movement Space', sans-serif; font-size: 13px; font-weight: 400; line-height: 1.4; }
  .section-link:hover > span { color: var(--gold); }
  .section-link:hover { color: var(--gold); background: #ffffff05; }
  .journey-toolbar { display: flex; align-items: center; gap: 6px; padding-left: 24px; margin-left: 20px; border-left: 1px solid var(--line); }
  .journey-state { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .playback-buttons { display: flex; }
  .journey-toolbar button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: 24px; padding: 8px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; }
  .journey-toolbar #pause-journey { background: var(--gold); color: var(--navy); min-width: 100px; }
  .journey-toolbar #pause-journey:hover { background: var(--mw-accent-hover, #ff965f); }
  .experience:has(.journey-continue:not([hidden])) .journey-toolbar #pause-journey { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
  .experience:has(.journey-continue:not([hidden])) .journey-toolbar #pause-journey:hover { color: #fff; background: #ffffff0a; }
  .journey-toolbar #replay-journey { background: transparent; color: var(--muted); }
  .journey-toolbar #replay-journey:hover { color: #fff; }
  #playback-icon { font-family: Arial, sans-serif; font-size: 14px; min-width: 14px; }
  .motion-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 6px 10px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
  .motion-light { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
  .motion-toggle[aria-pressed=true] .motion-light { background: #98a4ae; }
  .no-script-note { padding: 15px; background: var(--panel); color: var(--muted); font-size: 14px; }

  .practices { padding-block: clamp(24px, 4vw, 64px) clamp(40px, 5vw, 80px); }
  .practice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .practice-card { position: relative; aspect-ratio: 4/5; overflow: hidden; border-radius: 8px; isolation: isolate; background: var(--panel); }
  .practice-card > img { width: 100%; height: 100%; object-fit: cover; }
  .practice-card::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent 35%, #03102050 58%, #031020eb 100%); }
  .practice-card:focus { outline: 2px solid var(--gold); outline-offset: 5px; }
  .practice-copy { position: absolute; inset: auto 28px 30px; z-index: 2; }
  .practice-copy h3 { font-size: clamp(30px, 3vw, 44px); margin-bottom: 12px; }
  .practice-copy h3::before { content: ''; display: block; width: 24px; height: 2px; background: var(--gold); margin-bottom: 20px; }
  .practice-copy p { min-height: 3em; max-width: 28ch; color: #e1e9f3; font-size: 15px; line-height: 1.5; text-wrap: balance; }

}

@keyframes journey-loading-spin { to { transform: rotate(360deg); } }

@keyframes journey-continue-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1800px) {
  .movement .shell { width: min(calc(100% - 128px), 1680px); }
}
@media (max-width: 1199px) {
  .movement {
    .shell { width: calc(100% - 48px); }
    .journey-dock { padding-inline: 16px; }
    .section-link { padding-inline: 16px; }
    .journey-toolbar { padding-left: 12px; margin-left: 12px; }
    .journey-toolbar button { padding-inline: 10px; }
    .practice-grid { gap: 16px; }
    .practice-copy { inset-inline: 20px; bottom: 24px; }
  }
}
@media (max-width: 760px) {
  .movement {
    .shell { width: calc(100% - 32px); }
    .scene-stage { --scene-max-height: max(180px, calc(100svh - var(--site-nav-height, 5rem) - 169px)); }
    .scene-stage picture { will-change: auto; }
    .scene-heading { bottom: 10%; left: 5%; right: 5%; }
    .scene-heading h2 { font-size: 10px; gap: 9px; letter-spacing: .2em; }
    .scene-heading h2::before { width: 20px; }
    .scene-heading #scene-caption { margin-top: 9px; font-size: clamp(20px, 5.8cqw, 32px); }
    .journey-continue { top: 5%; right: 5%; bottom: auto; min-height: 44px; padding: 10px 16px; gap: 12px; font-size: 12px; }
    .journey-continue svg { width: 18px; height: 18px; }
    .loading-indicator { top: 10px; right: 10px; font-size: 11px; padding: 7px 10px; }
    .journey-dock { display: block; padding-inline: 16px; }
    .section-nav { min-height: 92px; align-items: center; }
    .section-link { min-height: 76px; align-items: flex-start; padding: 10px; gap: 0; font-size: 15px; }
    .section-link small { margin-top: 5px; font-size: 12px; max-width: 14ch; text-wrap: balance; }
    .journey-toolbar { justify-content: flex-end; min-height: 52px; gap: 4px; margin: 0; padding: 4px 0; border-left: 0; border-top: 1px solid var(--line); }
    .journey-toolbar button { min-height: 44px; padding: 8px 12px; font-size: 12px; }
    .journey-toolbar #pause-journey { min-width: 88px; }
    .journey-toolbar .motion-toggle { margin-left: auto; padding-right: 0; font-size: 11px; }
    .practice-grid { grid-template-columns: 1fr; gap: 16px; }
    .practice-card { aspect-ratio: 16/11; }
    .practice-copy { inset: auto 24px 26px; }
    .practice-copy h3 { font-size: 32px; margin-bottom: 8px; }
    .practice-copy h3::before { margin-bottom: 14px; }
    .practice-copy p { min-height: 0; font-size: 14px; max-width: none; }
  }
}
/* Compact stages can also occur on wide, short browser windows. */
@container (max-width: 640px) {
  .movement .scene-heading { right: 5%; }
  .movement .journey-continue { top: 5%; bottom: auto; min-height: 44px; padding: 10px 16px; gap: 12px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.movement-page) { scroll-behavior: auto; }
  .movement .journey-continue:not([hidden]), .movement .loading-indicator span { animation: none; }
  .movement *, .movement *::before, .movement *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  body.movement-page { background: white; color: #10253b; }
  .movement {
    --ink: #10253b; --muted: #536478; --gold: #725017; --line: #cbd5e1;
    background: white;
    .shell { width: 100%; }
    .experience { display: block; min-height: 0; }
    .scene-stage video, .journey-toolbar, .motion-toggle, .journey-continue { display: none !important; }
    .scene-stage picture { visibility: visible !important; }
    .scene-heading h2 { color: #f5c542; }
    .experience, .practices { padding-block: 24px; }
    .practice-card { break-inside: avoid; background: white; }
    .journey-dock { background: white; box-shadow: none; }
  }
}
