/* Lens demo page. Tokens first; everything else reads them.
 * Two states: without WebGL the glass is CSS (tinted, blurred boxes over the poster). With
 * WebGL (.l-glass on <body>) the boxes go clear and the canvases draw the real glass.     */
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
:root {
  --bg: #0b0620; --ink: #ffffff; --soft: rgba(255, 255, 255, .84); --line: rgba(255, 255, 255, .16);
  --glass: rgba(16, 9, 34, .52); --solid: #fff7ee; --solid-ink: #1a0f2c; --accent: #ffc978;
  --r: 28px; --gut: clamp(16px, 4vw, 56px); --max: 1180px;
  --display: "Space Grotesk", system-ui, sans-serif; --body: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); padding-bottom: 104px; text-shadow: 0 0 22px rgba(8, 4, 24, .6), 0 1px 3px rgba(8, 4, 24, .55); }
a { color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 20; background: var(--solid); color: var(--solid-ink); padding: 12px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- layers ---------- */
.poster { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: opacity .6s; }
.l-canvas { position: fixed; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .6s; }
.l-page { z-index: 0; }
.l-glass-canvas { z-index: 3; }
.l-live .l-canvas { opacity: 1; }
.l-live .poster { opacity: 0; }
main, .foot { position: relative; z-index: 1; }
.lens-layer { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.lens-handle { position: absolute; left: 0; top: 0; pointer-events: auto; touch-action: none; cursor: grab; border: 0; padding: 0; margin: 0; border-radius: 999px; background: transparent; -webkit-tap-highlight-color: transparent; min-width: 44px; min-height: 44px; }
.lens-handle.is-grabbed { cursor: grabbing; }
.lens-handle:focus-visible { outline: 3px dashed var(--accent); outline-offset: 6px; }

/* ---------- the menu bar ---------- */
.nav { position: fixed; z-index: 5; top: 12px; left: 50%; transform: translateX(-50%); width: min(var(--max), calc(100% - 24px)); height: 64px; display: flex; align-items: center; gap: 24px; padding: 0 10px 0 22px; border-radius: 32px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: inset 0 0 0 1px var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 21px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; min-height: 44px; }
.brand svg { width: 26px; height: 26px; color: var(--accent); }
.nav nav { display: flex; gap: 4px; margin-left: auto; }
.nav nav a { text-decoration: none; padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 22px; font-size: 15px; font-weight: 500; }
.nav nav a:hover { background: rgba(255, 255, 255, .12); }
.nav-cta { background: var(--solid); color: var(--solid-ink); text-shadow: none; text-decoration: none; font-weight: 700; font-size: 15px; padding: 0 18px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 22px; white-space: nowrap; }

/* ---------- content ---------- */
.hero { min-height: 100svh; max-width: var(--max); margin: 0 auto; padding: 120px var(--gut) 112px; display: flex; flex-direction: column; justify-content: center; }
.kicker { margin: 0 0 14px; font: 600 13px/1.3 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.kicker::before { content: ""; display: inline-block; width: 22px; height: 3px; border-radius: 2px; background: var(--accent); vertical-align: middle; margin: -2px 10px 0 0; }
h1 { margin: 0; font-size: clamp(60px, 11.2vw, 164px); line-height: .9; font-weight: 700; letter-spacing: -0.055em; max-width: 9ch; }
.lede { max-width: 46ch; margin: 24px 0 0; font-size: clamp(18px, 1.55vw, 22px); color: var(--soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 26px; font: 700 16px/1 var(--body); text-decoration: none; cursor: pointer; border: 0; }
.btn-solid { background: var(--solid); color: var(--solid-ink); text-shadow: none; }
.btn-line { color: var(--ink); border: 2px solid rgba(255, 255, 255, .7); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 14px; background: var(--solid); color: var(--solid-ink); text-shadow: none; }
.btn-small[aria-pressed="true"] { background: var(--accent); }
.facts { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 14px; }

.card { border-radius: var(--r); background: var(--glass); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); box-shadow: inset 0 0 0 1px var(--line); }
.l-glass .card, .l-glass .nav, .l-glass .dock, .l-glass .panel { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.fact { padding: 18px 20px; }
.fact b { display: block; font: 700 26px/1.1 var(--display); letter-spacing: -0.02em; }
.fact span { font-size: 14px; color: var(--soft); }

.block { max-width: var(--max); margin: 0 auto; padding: 96px var(--gut) 24px; }
.head { max-width: 640px; margin-bottom: 36px; }
.head.wide { max-width: 900px; }
h2 { margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1.02; font-weight: 700; }
.head p:not(.kicker) { margin: 16px 0 0; color: var(--soft); font-size: 19px; }
.grid { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product { padding: 14px 14px 18px; display: flex; flex-direction: column; }
.thumb { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; border-radius: 18px; background: radial-gradient(60% 70% at 50% 70%, rgba(255, 150, 90, .5), transparent), linear-gradient(#2a1840, #110a22); }
.product h3 { margin: 16px 6px 4px; font-size: 22px; }
.product p { margin: 0 6px 16px; font-size: 15px; color: var(--soft); flex: 1; }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 6px; }
.price { font: 700 20px var(--display); }
.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step, .how { padding: 26px 26px 28px; }
.num { font: 700 15px var(--display); color: var(--accent); letter-spacing: .1em; }
.step h3, .how h3 { margin: 10px 0 8px; font-size: 24px; }
.step p, .how p { margin: 0; color: var(--soft); font-size: 16px; }
.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.faq { padding: 8px 28px; max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.l-glass .faq details { border-bottom-color: transparent; background: linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .14)) bottom / 100% 1px no-repeat; }
.faq details:last-child { border-bottom: 0; background: none; }
.faq summary { cursor: pointer; min-height: 60px; display: flex; align-items: center; font: 600 19px/1.3 var(--display); list-style: none; padding-right: 32px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; font-size: 26px; font-weight: 400; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 20px; color: var(--soft); }
.closer-card { padding: clamp(28px, 5vw, 56px); text-align: center; }
.closer-card p { color: var(--soft); margin: 14px auto 26px; max-width: 44ch; font-size: 19px; }
.foot { max-width: var(--max); margin: 0 auto; padding: 56px var(--gut) 40px; text-align: center; font-size: 15px; }
.foot a { font-weight: 600; text-underline-offset: 4px; }
.foot .small { color: var(--soft); font-size: 13px; }

/* ---------- dock and panel ---------- */
.dock { position: fixed; z-index: 5; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 8px; border-radius: 34px; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--line); }
.dock button, .panel button { appearance: none; border: 0; cursor: pointer; min-height: 48px; padding: 0 18px; border-radius: 24px; background: transparent; color: var(--ink); font: 600 15px var(--body); text-shadow: inherit; white-space: nowrap; }
.dock button:hover, .panel button:hover { background: rgba(255, 255, 255, .14); }
.dock .tune { background: var(--solid); color: var(--solid-ink); text-shadow: none; }
.dock .tune[aria-expanded="true"] { background: var(--accent); }
.panel { position: fixed; z-index: 5; bottom: 88px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); padding: 18px 20px 12px; border-radius: 30px; background: rgba(16, 9, 34, .72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--line); }
.panel-title { margin: 0 0 10px; font: 600 13px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.presets button { min-height: 44px; padding: 0 14px; font-size: 14px; background: rgba(255, 255, 255, .1); }
.panel button[aria-pressed="true"] { background: var(--solid); color: var(--solid-ink); text-shadow: none; }
.range { display: block; font-size: 15px; font-weight: 500; }
.range span { display: flex; justify-content: space-between; }
.range output { font-variant-numeric: tabular-nums; color: var(--soft); }
input[type=range] { width: 100%; height: 40px; margin: 0; accent-color: var(--accent); }
.toggles { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.toggles button { background: rgba(255, 255, 255, .1); }
.fps { margin: 0 0 0 auto; font-size: 13px; color: var(--soft); font-variant-numeric: tabular-nums; }

@media (max-width: 1020px) {
  .products, .four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav nav { display: none; }
  .nav-cta { margin-left: auto; }
}
@media (max-width: 720px) {
  body { font-size: 16px; padding-bottom: 96px; }
  .nav { height: 58px; padding: 0 7px 0 16px; top: 10px; }
  .brand { font-size: 19px; }
  .nav-cta { font-size: 14px; padding: 0 14px; }
  .hero { padding-top: 120px; min-height: 92svh; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li:last-child { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; }
  .block { padding-top: 72px; }
  .faq { padding: 4px 18px; }
  .dock { left: 12px; right: 12px; transform: none; bottom: 12px; }
  .dock button { flex: 1; padding: 0 6px; font-size: 14px; }
  .panel { bottom: 84px; }
}
@media (max-width: 460px) {
  .products, .four { grid-template-columns: 1fr; }
}
