/* Hyrise — site styles */
@font-face { font-family: "Geist"; src: url("../fonts/geist-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --black: #0C0B09;          /* APEX matte black */
  --stage: #060504;
  --ink: #15120F;
  --line: rgba(227, 197, 152, .16);
  --line-strong: rgba(227, 197, 152, .34);
  --champagne: #E3C598;
  --cream: #FDF3E1;
  --muted: rgba(253, 243, 225, .68);
  --faint: rgba(253, 243, 225, .46);
  --copper: #A97F5C;
  --signal: #F47136;
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
html.gate-open { overflow: hidden; }
body {
  margin: 0; background: var(--black); color: var(--cream);
  font: 400 17px/1.6 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 62ch; }
h1, h2, h3 { margin: 0; font-weight: 300; letter-spacing: -.03em; line-height: 1.02; }
h3 { font-weight: 500; letter-spacing: -.01em; font-size: 20px; line-height: 1.25; }
:focus-visible { outline: 2px solid var(--champagne); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--champagne); color: var(--black); padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 500; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--champagne); font: 500 16px/1 "Geist", sans-serif;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--champagne); color: var(--black); }
.btn-solid:hover { background: var(--cream); border-color: var(--cream); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--champagne); color: var(--champagne); }
.link { color: var(--champagne); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.link:hover { color: var(--cream); }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 40; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.site-header.is-solid, .site-header.menu-open { background: rgba(12, 11, 9, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; width: 118px; }
.brand img { width: 100%; height: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; transition: color .2s; }
.nav a:hover, .nav a:focus-visible { color: var(--cream); }
.nav .btn { color: var(--black); min-height: 40px; padding: 0 18px; font-size: 15px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: var(--cream); border-radius: 999px; height: 40px; padding: 0 16px; font: 500 15px "Geist", sans-serif; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; background: var(--stage); }
.hero::before { /* finish-reactive glow behind the device */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(42% 52% at 70% 50%, rgba(var(--glow, 227,197,152), .22), transparent 70%), radial-gradient(70% 60% at 20% 110%, rgba(169,127,92,.12), transparent 70%);
  transition: background .6s;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: center; padding-block: 120px 64px; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(52px, 7.3vw, 122px); line-height: .94; letter-spacing: -.045em; color: var(--cream); }
.hero h1 .line { white-space: nowrap; }
.hero h1 .line { display: block; }
.hero .lede { margin-top: 32px; font-size: 18px; color: var(--muted); max-width: 46ch; }
.hero .lede strong { color: var(--cream); font-weight: 500; }
.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 30px; }
.price { font-size: 22px; font-weight: 300; color: var(--champagne); margin-right: 6px; font-variant-numeric: tabular-nums; }
.rise-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: .6; }
.rise-line path { stroke: var(--champagne); stroke-width: 1.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rise-line .draw { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.4s .35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.stage-wrap { position: relative; z-index: 2; height: min(78svh, 760px); }
#apex-stage { position: absolute; inset: 0; cursor: grab; touch-action: pan-y; }
#apex-stage:active { cursor: grabbing; }
#apex-stage canvas { width: 100% !important; height: 100% !important; opacity: 0; transition: opacity 1s var(--ease); }
#apex-stage.is-ready canvas { opacity: 1; }
#apex-stage .fallback { position: absolute; inset: 8% 14%; width: 72%; height: 84%; object-fit: contain; opacity: 0; transition: opacity .6s; border-radius: 24px; }
#apex-stage.no-webgl .fallback { opacity: 1; }
.finish-picker { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(12,11,9,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 3; white-space: nowrap; }
.finish-picker legend { float: left; padding: 0; font-size: 14px; color: var(--muted); }
.finish-picker fieldset { border: 0; margin: 0; padding: 0; display: flex; align-items: center; gap: 14px; }
.swatches { display: flex; gap: 10px; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch .dot { display: block; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 2px rgba(255,255,255,.35); transition: transform .2s var(--ease); }
.swatch input:checked + .dot { outline: 1.5px solid var(--champagne); outline-offset: 3px; }
.swatch input:focus-visible + .dot { outline: 2px solid var(--cream); outline-offset: 3px; }
.swatch:hover .dot { transform: scale(1.08); }
.sw-gold .dot { background: linear-gradient(145deg, #F1D48A, #C59A3F 55%, #8E6A22); }
.sw-amber .dot { background: linear-gradient(180deg, #D99A2B, #F06A2C 70%); }
.sw-black .dot { background: linear-gradient(145deg, #2a2827, #0b0b0a); }
.sw-gunmetal .dot { background: linear-gradient(145deg, #9AA0A7, #5c6168 60%, #3c4045); }
#finish-name { min-width: 72px; font-size: 14px; color: var(--cream); }
.drag-hint { position: absolute; right: 2%; bottom: 22px; margin: 0; font-size: 13px; color: var(--faint); z-index: 3; }

/* Sections */
section { position: relative; }
.section { padding-block: clamp(72px, 9vw, 136px); }
.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: end; margin-bottom: clamp(48px, 6vw, 84px); }
.section-head h2 { font-size: clamp(42px, 6vw, 92px); }
.section-head p { color: var(--muted); margin: 0; }

/* Lineup — rises from pocket to peak */
.stairs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); align-items: start; }
.step { --rise: 0px; padding-top: calc(176px - var(--rise)); display: flex; flex-direction: column; height: 100%; }
.step:nth-child(2) { --rise: 44px; } .step:nth-child(3) { --rise: 88px; } .step:nth-child(4) { --rise: 132px; } .step:nth-child(5) { --rise: 176px; }
.step figure { margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; background: #d9d9d9; aspect-ratio: 4 / 5; }
.step figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.step:hover figure img { transform: scale(1.04); }
.step h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.step h3 .p { font-weight: 300; color: var(--champagne); font-size: 18px; font-variant-numeric: tabular-nums; }
.step p { font-size: 15px; color: var(--muted); margin: 8px 0 14px; }
.step a { margin-top: auto; align-self: flex-start; }
.step.is-peak figure { box-shadow: 0 0 0 1px var(--line-strong), 0 30px 80px -30px rgba(227,197,152,.45); }
.stairs-base { margin-top: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--champagne) 92%, transparent); }

/* APEX detail */
.apex-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.film { position: relative; border-radius: 28px; overflow: hidden; background: #000; aspect-ratio: 9 / 16; max-height: 82svh; box-shadow: 0 0 0 1px var(--line); }
.film video { width: 100%; height: 100%; object-fit: cover; }
.sound { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(253,243,225,.3); background: rgba(6,5,4,.55); color: var(--cream); font: 500 14px "Geist", sans-serif; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sound svg { width: 16px; height: 16px; }
.specs { margin: 0 0 40px; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; color: var(--cream); }
.apex-copy h2 { font-size: clamp(42px, 5.4vw, 84px); margin-bottom: 26px; }
.apex-copy > p { color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 40px 0 34px; }
.thumbs img { border-radius: 14px; aspect-ratio: 1; object-fit: cover; width: 100%; background: #d9d9d9; }

/* Finishes */
.finishes { background: linear-gradient(180deg, var(--black), var(--ink) 30%, var(--black)); }
.finish-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.finish-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.finish-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.finish-card img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; background: #d9d9d9; }
.finish-card h3 { margin-bottom: 6px; }
.finish-card button { background: none; border: 0; padding: 0; color: var(--champagne); font: 400 15px "Geist", sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.finish-card button:hover { color: var(--cream); }

/* Details */
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.detail-grid figure { margin: 0; }
.detail-grid img { width: 100%; border-radius: var(--radius); aspect-ratio: 716 / 360; object-fit: cover; background: #111; }
.detail-grid figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; }

/* Move with you */
.move-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; gap: clamp(16px, 2vw, 28px); }
.move-grid figure { margin: 0; position: relative; border-radius: 22px; overflow: hidden; }
.move-grid figure:first-child { grid-row: span 2; }
.move-grid img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.move-grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 24px 22px; background: linear-gradient(transparent, rgba(6,5,4,.85)); }
.move-grid figcaption span { display: block; color: var(--muted); font-size: 15px; }

/* Where to buy */
.where { overflow: hidden; }
.where-bg { position: absolute; inset: 0; background: url("../img/banner-gold.webp") center / cover no-repeat; opacity: .32; }
.where::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--black) 18%, rgba(12,11,9,.55) 60%, rgba(12,11,9,.2)); }
.where .wrap { position: relative; z-index: 1; }
.where h2 { font-size: clamp(42px, 6vw, 96px); max-width: 11ch; margin-bottom: 26px; }
.where p { color: var(--muted); }
.where .actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 22px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 40px; font-size: 15px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr)); gap: 32px; }
.footer-grid img { width: 132px; margin-bottom: 18px; }
.footer-grid h3 { font-size: 15px; color: var(--cream); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--cream); text-decoration: underline; text-underline-offset: 4px; }
.warning { margin-top: 48px; padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--cream); max-width: none; }
.warning strong { font-weight: 600; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; font-size: 13px; color: var(--faint); }

/* Age gate */
.age-gate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: radial-gradient(60% 60% at 50% 40%, rgba(227,197,152,.14), transparent 70%), rgba(6,5,4,.97); transition: opacity .45s var(--ease); }
.age-gate[hidden] { display: none; }
html.gate-open .age-gate[hidden] { display: grid; } /* shown before scripts run when age is not yet confirmed */
.age-gate.is-leaving { opacity: 0; }
.gate-card { width: min(100%, 460px); text-align: center; }
.gate-card img { width: 190px; margin: 0 auto 30px; }
.gate-card h2 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 14px; }
.gate-card p { color: var(--muted); margin-inline: auto; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
.gate-denied { display: none; margin-top: 22px; color: var(--cream); }
.age-gate.is-denied .gate-actions { display: none; }
.age-gate.is-denied .gate-denied { display: block; }
.gate-fine { font-size: 13px; color: var(--faint); margin-top: 28px; }

/* Policy pages */
.doc { padding-block: 150px 100px; }
.doc h1 { font-size: clamp(44px, 6vw, 84px); margin-bottom: 14px; }
.doc .updated { color: var(--faint); margin-bottom: 48px; }
.doc h2 { font-size: 26px; font-weight: 500; letter-spacing: -.01em; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--muted); max-width: 70ch; }
.doc ul { padding-left: 20px; }

/* Responsive */
@media (max-width: 1080px) {
  .stairs { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 48px; }
  .step, .step:nth-child(n) { --rise: 176px; }
  .apex-grid, .finish-grid { grid-template-columns: 1fr; }
  .film { max-width: 420px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .nav { position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px var(--gutter) 24px; background: rgba(12,11,9,.97); border-bottom: 1px solid var(--line); display: none; }
  .menu-open .nav { display: flex; }
  .nav a { width: 100%; padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 16px; width: auto; border-bottom: 0; padding: 0 22px; min-height: 46px; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .hero-grid { grid-template-columns: 1fr; padding-block: 108px 40px; }
  .stage-wrap { height: 62svh; min-height: 420px; order: 2; }
  .hero-copy { order: 1; }
  .drag-hint { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .stairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .move-grid { grid-template-columns: 1fr; }
  .move-grid figure:first-child { grid-row: auto; }
  .finish-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .finish-picker { gap: 10px; padding: 8px 10px 8px 14px; }
  .finish-picker legend { display: none; }
  .swatch .dot { width: 28px; height: 28px; }
  .specs div { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rise-line .draw { stroke-dashoffset: 0; }
}
