:root {
  color-scheme: dark;
  --background: #0f0d0a;
  --background-soft: #17130e;
  --surface: rgba(35, 30, 22, 0.74);
  --surface-raised: rgba(43, 36, 25, 0.9);
  --text: #f5efe4;
  --muted: #b9ad98;
  --quiet: #817664;
  --line: rgba(244, 232, 207, 0.13);
  --line-strong: rgba(217, 180, 91, 0.33);
  --glass: rgba(24, 20, 15, 0.68);
  --accent: #d9b45b;
  --accent-deep: #8c6a1f;
  --accent-soft: rgba(217, 180, 91, 0.14);
  --scene: #eb3838;
  /* The app icon's night (Tip card, tvOS icon): navy sky, coral emblem, foil from the painting. */
  --night: #263d61;
  --night-deep: #0d1429;
  --coral: #e07059;
  --coral-glow: #f08c66;
  --teal: #4f9ea3;
  --violet: #735cb3;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
  --display: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --display-leading: 1.01;
  --display-tracking: -.045em;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --content: 1180px;
  --radius-sm: 16px;
  --radius-md: 26px;
  --radius-lg: 42px;
  --section: clamp(92px, 13vw, 176px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--background); }
body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 4%, rgba(140, 106, 31, .16), transparent 27rem),
    radial-gradient(circle at 95% 28%, rgba(38, 61, 97, .22), transparent 34rem),
    radial-gradient(circle at 50% 100%, rgba(13, 20, 41, .55), transparent 60rem),
    var(--background);
  color: var(--text);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img, video { display: block; max-width: 100%; }

.shell { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--accent); color: #17120a; }
.skip-link:focus { top: 16px; }

.site-nav {
  position: fixed;
  inset: 18px 0 auto;
  z-index: 50;
  width: min(calc(100% - 28px), 1080px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  padding: 8px 10px 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  box-shadow: 0 14px 46px rgba(0, 0, 0, .25);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}

.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-weight: 680; letter-spacing: -.02em; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: 13px; transition: color .2s ease, background .2s ease; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.langbar { display: flex; justify-content: flex-end; gap: 2px; }
.langbar button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
}
.langbar button:hover { color: var(--text); }
.langbar button.on { color: #17120a; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.hero { position: relative; min-height: 100svh; padding: 158px 0 80px; display: grid; align-items: center; }
.hero-copy { position: relative; z-index: 2; width: min(100%, 1000px); margin-inline: auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px; color: var(--accent); font-size: 12px; font-weight: 720; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero h1, .display-title, .final-title {
  font-family: var(--display);
  font-weight: 520;
  line-height: var(--display-leading);
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
}
.hero h1 { width: 100%; margin: 0; font-size: clamp(58px, 8.6vw, 120px); }
.hero h1 em { display: block; color: var(--accent); font-weight: 480; }
.hero .sub { max-width: 720px; margin: 28px auto 0; color: var(--muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; text-wrap: balance; }
.hero .sub strong { color: var(--text); font-weight: 650; }
.hero .sub em { color: #dcd0ba; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 9px; padding: 0 21px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 680; transition: transform .25s var(--ease), background .25s ease, border-color .25s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.primary, .btn.soon { color: #181207; background: var(--accent); border-color: var(--accent); box-shadow: 0 12px 36px rgba(217, 180, 91, .18); }
.btn.ghost { background: rgba(255,255,255,.035); }
.btn.ghost:hover { border-color: var(--line-strong); background: var(--accent-soft); }
.btn-arrow { font-size: 18px; line-height: 1; }
.fineprint { margin: 14px 0 0; color: var(--quiet); font-size: 12px; }

.hero-media { position: relative; margin-top: 72px; }
.hero-media::before { content: ""; position: absolute; inset: 5% 8% -9%; z-index: -1; border-radius: 50%; background: var(--accent); filter: blur(90px); opacity: .13; }
.museum-frame { position: relative; padding: 10px; border: 1px solid rgba(217, 180, 91, .3); border-radius: 12px; background: linear-gradient(135deg, #725524, #d9b45b 22%, #65491c 48%, #c79e47 70%, #4c3514); box-shadow: var(--shadow); }
.museum-frame::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 4px; pointer-events: none; }
.slot[hidden] { display: none; }
.slot { width: 100%; border: 0; object-fit: cover; background: var(--background-soft); }
.hero-media .slot { aspect-ratio: 16 / 9; border-radius: 4px; }

/* Hero triptych. Fractions of the 7793-px scan: Eden 0–1803, Garden 1860–5917, Hell 6021–7793.
   Shut, each wing grows to reach the garden's centre (x = 3888.5), as in ARModeView. */
.triptych {
  --eden: calc(1803 / 7793 * 100%);
  --hell: calc(1772 / 7793 * 100%);
  --fold: 2.2s;
  position: relative;
  aspect-ratio: 7793 / 4409;
  border-radius: 4px;
  background: #0b0907;
  perspective: 2600px;
  cursor: pointer;
}
.tp-panel, .tp-face { position: absolute; inset: 0; background-image: url("assets/hero.jpg"); background-repeat: no-repeat; }
.tp-garden { left: calc(1860 / 7793 * 100%); width: calc(4057 / 7793 * 100%); background-size: calc(7793 / 4057 * 100%) 100%; background-position: calc(1860 / 3736 * 100%) 0; }
.tp-wing { position: absolute; top: 0; bottom: 0; transform-style: preserve-3d; transition: transform var(--fold) cubic-bezier(.45, 0, .55, 1); }
.tp-left { left: 0; width: var(--eden); transform-origin: 100% 50%; }
.tp-right { right: 0; width: var(--hell); transform-origin: 0 50%; }
.tp-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tp-left .tp-front { background-size: calc(7793 / 1803 * 100%) 100%; background-position: 0 0; }
.tp-right .tp-front { background-size: calc(7793 / 1772 * 100%) 100%; background-position: 100% 0; }
.tp-back { background-image: url("assets/exterior.jpg"); background-size: 200% 100%; transform: rotateY(180deg); }
.tp-left .tp-back { background-position: 0 0; }
.tp-right .tp-back { background-position: 100% 0; }
/* Shading: a wing darkens as it turns away from the light, like oak on its hinge. */
.tp-face::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity var(--fold) ease; }
.triptych.closed .tp-front::after { opacity: .55; }
.triptych:not(.closed) .tp-back::after { opacity: .55; }
.triptych.closed .tp-left { transform: rotateY(179.3deg) scaleX(calc(2085.5 / 1803)); }
.triptych.closed .tp-right { transform: rotateY(-179.3deg) scaleX(calc(2132.5 / 1772)); }
.triptych.still .tp-wing, .triptych.still .tp-face::after { transition: none; }
.media-caption { display: flex; justify-content: space-between; gap: 20px; padding: 13px 3px 0; color: var(--quiet); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

.proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.proof { padding: 32px clamp(16px, 3vw, 38px); border-right: 1px solid var(--line); }
.proof:first-child { padding-left: 0; }
.proof:last-child { border: 0; }
.proof strong { display: block; color: var(--accent); font-family: var(--display); font-size: clamp(30px, 4vw, 48px); font-weight: 520; line-height: 1; }
.proof span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.section { padding-top: var(--section); scroll-margin-top: 110px; }
.section-heading { max-width: 820px; }
.display-title { max-width: 18ch; margin: 0; font-size: clamp(42px, 6.5vw, 76px); }
.lead { max-width: 690px; margin: 20px 0 0; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.6; }

.story-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(420px, 1.2fr); gap: clamp(48px, 8vw, 120px); align-items: start; }
.story-sticky { position: sticky; top: 120px; }
.story-copy { padding-top: 48px; }
.story-copy p { margin: 0 0 32px; font-family: var(--display); font-size: clamp(23px, 3vw, 34px); line-height: 1.35; letter-spacing: -.02em; }
.signature { color: var(--quiet); font-size: 13px !important; font-family: var(--body) !important; }

.journey-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-top: 50px; }
.feature-card { position: relative; min-height: 290px; overflow: hidden; padding: clamp(24px, 3vw, 38px); border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.018)); box-shadow: inset 0 1px rgba(255,255,255,.04); }
.feature-card:nth-child(1) { grid-column: span 7; }
.feature-card:nth-child(2) { grid-column: span 5; }
.feature-card:nth-child(3) { grid-column: span 4; }
.feature-card:nth-child(4) { grid-column: span 8; }
.card-number { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); font-size: 12px; }
.feature-card h3 { max-width: 530px; margin: 56px 0 10px; font-family: var(--display); font-size: clamp(28px, 4vw, 46px); font-weight: 520; line-height: 1.07; letter-spacing: -.03em; text-wrap: balance; }
.feature-card p { max-width: 520px; margin: 0; color: var(--muted); }
.feature-card.has-image { min-height: 480px; display: flex; flex-direction: column; justify-content: flex-end; }
.feature-card.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 15%, rgba(15,13,10,.22) 45%, rgba(15,13,10,.96) 88%), var(--card-image) center / cover; transition: transform .8s var(--ease); }
.feature-card.has-image:hover::before { transform: scale(1.025); }
.feature-card.has-image > * { position: relative; z-index: 1; }
.feature-card.has-image h3 { margin-top: 0; }
/* Card 01: a cut-out lifts off the painting with scroll (--lift 0 → 1, set by script). */
.lift-card { --lift: 0; padding: 0; display: flex; flex-direction: column; }
.lift-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); }
.lift-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(15,13,10,.65)); }
.lift-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(calc(1 - var(--lift) * .55)) saturate(calc(1 - var(--lift) * .45)) blur(calc(var(--lift) * 2px));
  transform: scale(calc(1.04 - var(--lift) * .04)); }
.lift-figure { position: absolute; left: 11.91%; top: 11.8%; width: 17.39%; z-index: 1; transform-origin: 50% 30%;
  transform: translate(calc(var(--lift) * 14%), calc(var(--lift) * 2%)) scale(calc(1 + var(--lift) * .12)) rotate(calc(var(--lift) * -2deg));
  filter: drop-shadow(0 calc(var(--lift) * 26px) calc(var(--lift) * 24px) rgba(0,0,0,calc(var(--lift) * .8))); will-change: transform; }
.lift-copy { padding: clamp(24px, 3vw, 38px); }
.lift-copy h3 { margin-top: 28px; }

/* Inside the app: real captures in device frames, gently staggered. */
.shot-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2.4vw, 32px); margin-top: 48px; align-items: start; }
.shot { margin: 0; }
.shot:nth-child(even) { margin-top: 56px; }
.phone-frame, .tablet-frame { position: relative; overflow: hidden; padding: 7px; background: linear-gradient(160deg, #3a3228, #120f0b 60%); border: 1px solid rgba(217,180,91,.22); box-shadow: 0 40px 80px -36px rgba(0,0,0,.9), inset 0 1px rgba(255,255,255,.08); }
.phone-frame { border-radius: 38px; }
.phone-frame img { display: block; width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover; border-radius: 31px; background: var(--background-soft); }
.tablet-frame { border-radius: 30px; padding: 9px; }
.tablet-frame img { display: block; width: 100%; height: auto; border-radius: 22px; background: var(--background-soft); }
.shot figcaption { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.45; text-align: center; }
.shot-ipad { margin-top: 64px; }
.shot-ipad figcaption { font-size: 15px; }
@media (max-width: 760px) {
  .shot-rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; margin-inline: -4px; }
  .shot-rail .shot { flex: 0 0 62%; scroll-snap-align: center; margin-top: 0; }
  .shot-ipad { margin-top: 40px; }
}
.feature-card.gold-wash { background: radial-gradient(circle at 90% 5%, rgba(217,180,91,.2), transparent 45%), linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.018)); }

.scene-rail { display: grid; grid-template-columns: 1fr 1.08fr 1fr; gap: 14px; margin-top: 16px; counter-reset: scene; }
/* Each scene as a museum plate: portrait crop, a gold hairline mount, a numbered serif label. */
.scene-tile { position: relative; overflow: hidden; margin: 0; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--background-soft); counter-increment: scene; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.scene-tile img, .scene-tile video { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transform: scale(1.08); transition: transform .9s var(--ease), filter .7s ease; }
.scene-tile:hover img, .scene-tile:hover video { transform: scale(1.13); filter: saturate(1.1); }
.scene-tile::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(15,13,10,0) 48%, rgba(15,13,10,.55) 72%, rgba(15,13,10,.94) 100%); }
.scene-tile::after { content: ""; position: absolute; inset: 10px; z-index: 1; pointer-events: none; border: 1px solid rgba(217,180,91,.32); border-radius: calc(var(--radius-md) - 8px); }
.scene-tile figcaption { position: absolute; inset: auto 26px 24px; z-index: 2; color: var(--text); font-family: var(--display); font-size: clamp(22px, 2.3vw, 28px); line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
.scene-tile figcaption::before { content: counter(scene, upper-roman); display: block; margin-bottom: 8px; color: var(--accent); font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .24em; }

.ar-stage { position: relative; margin-top: 54px; padding: clamp(22px, 4vw, 52px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: radial-gradient(circle at 50% 0, rgba(217,180,91,.13), transparent 42%), rgba(255,255,255,.025); overflow: hidden; }
.beats { display: grid; gap: 18px; }
.beat { display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(26px, 5vw, 70px); align-items: center; padding: 32px 0; border-bottom: 1px solid var(--line); }
.beat:last-child { border-bottom: 0; }
.beat:nth-child(even) .beat-text { order: 2; }
.beat-text { padding: 12px; }
.beat .step { color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .16em; text-transform: uppercase; }
.beat h3 { max-width: 14ch; margin: 12px 0; font-family: var(--display); font-size: clamp(31px, 4vw, 52px); font-weight: 520; line-height: 1.07; letter-spacing: -.03em; text-wrap: balance; }
.beat p { margin: 0; color: var(--muted); }
.beat .slot { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); box-shadow: 0 20px 54px rgba(0,0,0,.34); }
.beat.vertical .slot { aspect-ratio: 4 / 5; max-height: 570px; justify-self: center; object-position: center; }

.tvos-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
  gap: clamp(46px, 8vw, 112px);
  align-items: center;
  min-height: 680px;
  padding: clamp(38px, 6vw, 76px);
  overflow: hidden;
  border: 1px solid rgba(94, 169, 178, .3);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 76% 48%, rgba(214, 104, 78, .17), transparent 32%),
    radial-gradient(circle at 88% 14%, rgba(61, 130, 145, .14), transparent 28%),
    linear-gradient(145deg, rgba(13, 38, 50, .72), rgba(15, 13, 10, .96) 58%);
}
.tvos-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E"); }
.tvos-copy { position: relative; z-index: 2; }
.tvos-copy .display-title { max-width: 12ch; font-size: clamp(42px, 5.4vw, 68px); }
.tvos-facts { display: grid; gap: 0; margin: 34px 0 0; padding: 0; border-top: 1px solid var(--line); }
.tvos-facts li { display: grid; grid-template-columns: minmax(150px, .72fr) 1.28fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); list-style: none; }
.tvos-facts strong { color: var(--text); font-size: 13px; }
.tvos-facts span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.tvos-icon-card { position: relative; z-index: 2; margin: 0; perspective: 1200px; }
.tvos-icon {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 3;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: clamp(24px, 3vw, 40px);
  background: #07131b;
  box-shadow: 0 42px 100px rgba(0,0,0,.58), 0 0 80px rgba(210, 102, 76, .09);
  transform: rotateY(-7deg) rotateX(2deg);
  transition: transform .55s var(--ease), box-shadow .55s var(--ease);
}
.tvos-icon img, .tvos-icon-sheen { position: absolute; inset: 0; width: 100%; height: 100%; }
.tvos-icon img { object-fit: cover; }
.tvos-icon-back { transform: scale(1.015); transition: transform .65s var(--ease), filter .65s ease; }
.tvos-icon-front { transform: scale(1.025); transition: transform .65s var(--ease), filter .65s ease; }
.tvos-icon-sheen { pointer-events: none; opacity: 0; background: linear-gradient(112deg, transparent 28%, rgba(255,255,255,.28) 47%, transparent 64%); transform: translateX(-54%); transition: opacity .45s ease, transform .65s var(--ease); }
.tvos-icon-card:hover .tvos-icon { transform: rotateY(0) rotateX(0) scale(1.035); box-shadow: 0 48px 120px rgba(0,0,0,.64), 0 0 100px rgba(210, 102, 76, .13); }
.tvos-icon-card:hover .tvos-icon-back { transform: scale(1.05); filter: brightness(1.05); }
.tvos-icon-card:hover .tvos-icon-front { transform: scale(1.1); filter: drop-shadow(0 18px 12px rgba(0,0,0,.3)); }
.tvos-icon-card:hover .tvos-icon-sheen { opacity: .72; transform: translateX(54%); }
.tvos-icon-card figcaption { display: flex; justify-content: space-between; gap: 22px; margin-top: 18px; padding-inline: 4px; color: var(--text); font-size: 12px; }
.tvos-icon-card small { color: var(--quiet); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }


.road { display: grid; margin: 50px 0 0; padding: 0; border-top: 1px solid var(--line); }
.road li { list-style: none; display: grid; grid-template-columns: 145px 1fr auto; gap: 22px; align-items: start; padding: 28px 0; border-bottom: 1px solid var(--line); }
.road .status { padding-top: 4px; color: var(--quiet); font-size: 10px; font-weight: 780; letter-spacing: .14em; text-transform: uppercase; }
.road .status.now { color: var(--accent); }
.road .status.wip { color: var(--text); }
.road h3 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 520; }
.road p { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.road-index { color: var(--quiet); font-family: var(--display); font-size: 18px; }


/* Closing card: the in-app tip card's face — the icon's night, a foil sheen, the emblem lit from behind. */
.final-cta { position: relative; isolation: isolate; margin-top: var(--section); padding: clamp(56px, 9vw, 112px) clamp(24px, 7vw, 90px); overflow: hidden; border: 1px solid rgba(240, 140, 102, .22); border-radius: var(--radius-lg); text-align: center; background: radial-gradient(circle at 82% 45%, var(--night) 0, var(--night-deep) 62%); box-shadow: var(--shadow); }
.final-foil { position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from 0deg at 30% 20%, var(--accent), var(--coral), var(--teal), var(--violet), var(--accent)); mix-blend-mode: soft-light; opacity: .55; animation: foil-turn 48s linear infinite; pointer-events: none; }
.final-emblem { position: absolute; z-index: -1; right: clamp(-110px, -6vw, -40px); top: 50%; width: clamp(220px, 30vw, 380px); transform: translateY(-50%); filter: drop-shadow(0 0 28px rgba(240, 140, 102, .5)); opacity: .9; pointer-events: none; }
.final-cta > :not(.final-foil):not(.final-emblem) { position: relative; }
.final-cta .lead { color: #c9cfdc; }
@keyframes foil-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .final-foil { animation: none; } }
.final-title { max-width: 760px; margin: 0 auto; font-size: clamp(42px, 6.2vw, 76px); }
.final-cta .lead { margin-inline: auto; }

.site-footer { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; margin-top: 46px; padding: 42px 0 54px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 12px; }
.footer-brand { color: var(--text); font-family: var(--display); font-size: 24px; }
.footer-credit { max-width: 650px; margin: 10px 0 0; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 20px; text-align: right; }
.footer-status { color: var(--muted); }
.footer-directory { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.footer-screen-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--accent); font-weight: 700; transition: background .2s ease, transform .2s var(--ease); }
.footer-screen-link:hover { transform: translateY(-2px); background: var(--accent-soft); }

/* Find the figure — a playable round of the app's game. The controls sit above the
   painting, never on it; only the round's read-outs (found figures, the miss ripple,
   the hint's light) are drawn over the board. */
.hunt-stage { position: relative; margin-top: 54px; padding: clamp(18px, 3vw, 34px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: radial-gradient(circle at 50% 0, rgba(217,180,91,.13), transparent 42%), rgba(255,255,255,.025); }
.hunt-hud, .hunt-done { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; min-height: 104px; margin-bottom: clamp(16px, 2.4vw, 26px); }
.hunt-hud[hidden], .hunt-done[hidden] { display: none; }
.hunt-target { display: flex; align-items: center; gap: 18px; min-width: 0; }
.hunt-thumb { flex: none; display: grid; place-items: center; width: 104px; height: 104px; padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: radial-gradient(circle at 50% 35%, rgba(217,180,91,.2), rgba(217,180,91,.05) 70%), var(--glass); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 14px 34px rgba(0,0,0,.3); }
.hunt-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.hunt-brief .step { color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .16em; text-transform: uppercase; }
.hunt-status { margin: 6px 0 0; font-family: var(--display); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.hunt-actions { display: flex; flex: none; align-items: center; gap: 14px; }
.hunt-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.btn.compact { min-height: 44px; padding: 0 18px; cursor: pointer; }
button.btn.ghost { color: var(--text); }
button.btn:disabled { opacity: .45; cursor: default; transform: none; }
.hunt-done h3 { margin: 0; font-family: var(--display); font-size: clamp(26px, 3vw, 36px); font-weight: 520; line-height: 1.1; letter-spacing: -.03em; }
.hunt-done p { max-width: 620px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.hunt-done .hunt-stats { color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.hunt-scroll { overflow-x: auto; border-radius: var(--radius-sm); box-shadow: 0 20px 54px rgba(0,0,0,.34); scrollbar-width: none; }
.hunt-scroll::-webkit-scrollbar { display: none; }
.hunt-board { position: relative; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.hunt-board > img { width: 100%; height: auto; background: var(--background-soft); }
.hunt-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* Gold reads weakly against the panel's yellow-green grass, so the halo starts
   near white and a dark shadow lifts the figure off the paint. */
.hunt-found { position: absolute; max-width: none; filter: drop-shadow(0 0 1.5px #fff6d6) drop-shadow(0 0 6px #ffd35a) drop-shadow(0 0 18px rgba(255,196,60,.95)) drop-shadow(0 10px 14px rgba(0,0,0,.5)); animation: hunt-pop .7s var(--ease) both; }
.hunt-miss { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 2px solid rgba(245,239,228,.85); border-radius: 50%; animation: hunt-ripple .6s ease-out both; }
/* An ellipse sized in percentages of the box is a circle here, and stays one when
   the board resizes: the second radius is the first times the board's aspect. */
.hunt-spot { position: absolute; inset: 0; background: radial-gradient(ellipse var(--hint-radius) calc(var(--hint-radius) * var(--aspect)) at var(--sx) var(--sy), transparent 98.5%, rgba(10,8,6,.74) 100%); animation: hunt-fade .35s ease both; }
.hunt-ring { position: absolute; left: var(--sx); top: var(--sy); width: calc(var(--hint-radius) * 2); aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid var(--accent); border-radius: 50%; box-shadow: 0 0 24px rgba(217,180,91,.5), inset 0 0 18px rgba(217,180,91,.25); animation: hunt-fade .35s ease both; }
.hunt-caption { margin: 14px 2px 0; color: var(--quiet); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
@keyframes hunt-pop { from { transform: scale(1.35); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes hunt-ripple { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes hunt-fade { from { opacity: 0; } }


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

@media (max-width: 900px) {
  :root { --display-leading: 1.06; --display-tracking: -.032em; }
  .site-nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .hero h1 { font-size: clamp(56px, 10.5vw, 82px); }
  .display-title { font-size: clamp(44px, 7vw, 58px); }
  .tvos-copy .display-title { font-size: clamp(44px, 7vw, 58px); }
  .final-title { font-size: clamp(44px, 7vw, 58px); }
  .feature-card:nth-child(n) { grid-column: span 6; }
  .beat { grid-template-columns: 1fr; }
  .beat:nth-child(even) .beat-text { order: 0; }
  .tvos-stage { grid-template-columns: 1fr; }
  .tvos-icon-card { width: min(100%, 720px); justify-self: center; }
}

@media (max-width: 680px) {
  :root { --display-leading: 1.08; --display-tracking: -.018em; }
  .shell { width: min(calc(100% - 28px), var(--content)); }
  .site-nav { inset: 10px 0 auto; width: calc(100% - 20px); min-height: 54px; padding-left: 14px; }
  .brand-mark { width: 22px; height: 22px; }
  .langbar button { width: 29px; height: 29px; font-size: 9px; }
  .hero { padding-top: 128px; }
  .hero h1 { font-size: clamp(48px, 15vw, 64px); }
  .display-title,
  .tvos-copy .display-title,
  .final-title { max-width: 100%; font-size: clamp(36px, 11.5vw, 44px); }
  .feature-card h3 { font-size: clamp(27px, 8.4vw, 32px); line-height: 1.1; letter-spacing: -.015em; }
  .beat h3 { font-size: clamp(29px, 9vw, 34px); line-height: 1.1; letter-spacing: -.015em; }
  .story-layout { grid-template-columns: 1fr; }
  .story-sticky { position: static; }
  .story-copy { padding-top: 0; }
  .hero-media { margin-top: 52px; }
  .museum-frame { padding: 6px; }
  .museum-frame::after { inset: 6px; }
  .media-caption { display: none; }
  .proof-strip { grid-template-columns: 1fr 1fr; }
  .proof { padding: 24px 18px; border-bottom: 1px solid var(--line); }
  .proof:nth-child(2) { border-right: 0; }
  .proof:nth-child(3), .proof:nth-child(4) { border-bottom: 0; }
  .feature-card:nth-child(n) { grid-column: 1 / -1; min-height: 270px; }
  .feature-card.has-image { min-height: 430px; }
  .scene-rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .scene-tile { flex: 0 0 78%; scroll-snap-align: center; }
  .ar-stage { padding: 18px; border-radius: var(--radius-md); }
  .beat { padding: 24px 0; }
  .beat-text { padding: 4px; }
  .tvos-stage { min-height: auto; padding: 34px 24px; }
  .tvos-facts li { grid-template-columns: 1fr; gap: 4px; }
  .tvos-icon { transform: none; }
  .tvos-icon-card figcaption { flex-direction: column; gap: 4px; }
  .road li { grid-template-columns: 105px 1fr; }
  .road-index { display: none; }
  .hunt-stage { padding: 14px; border-radius: var(--radius-md); }
  .hunt-hud, .hunt-done { flex-wrap: wrap; min-height: 0; }
  .hunt-thumb { width: 76px; height: 76px; padding: 8px; }
  .hunt-status { font-size: 20px; }
  .hunt-actions { width: 100%; justify-content: space-between; }
  .hunt-board { width: 640px; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-meta { align-items: flex-start; text-align: left; }
  .footer-directory { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Phones: the emblem moves above the title instead of behind it. */
@media (max-width: 640px) {
  .final-emblem { position: relative; right: auto; top: auto; display: block; width: 150px; margin: -12px auto 18px; transform: none; z-index: 0; }
}

/* The triptych carries its own frames, panel by panel, so they fold with the wings:
   shut, only the closed altarpiece is framed; no outer frame around empty space. */
.museum-frame.is-triptych { padding: 0; border: 0; background: none; box-shadow: none; }
.museum-frame.is-triptych::after { display: none; }
.triptych { background: none; --frame: clamp(3px, .45vw, 6px); }
.tp-garden, .tp-face {
  border: var(--frame) solid #a07d36;
  border-image: linear-gradient(135deg, #725524, #d9b45b 22%, #65491c 48%, #c79e47 70%, #4c3514) 1;
  background-origin: border-box;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.tp-face::after { inset: calc(-1 * var(--frame)); }


/* Find the figure, autoplay: the gold pointer that plays until the visitor taps. */
.hunt-ghost {
  position: absolute; z-index: 3; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  left: 50%; top: 50%;
  border: 2px solid var(--accent); border-radius: 50%;
  background: rgba(217, 180, 91, .22);
  box-shadow: 0 0 0 6px rgba(217, 180, 91, .12), 0 8px 20px rgba(0, 0, 0, .4);
  pointer-events: none;
  transition: left 1.2s var(--ease), top 1.2s var(--ease), transform .25s ease;
}
.hunt-ghost.tap { transform: scale(.7); }
