/* ---------- tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --tile: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #d2d2d7;
  --link: #0066cc;
  --pill: #0071e3;
  --pill-hover: #0077ed;
  --nav: rgba(255, 255, 255, .72);
  --code-bg: #f5f5f7;
  --code-text: #1d1d1f;
  --shadow: 0 2px 8px rgba(0, 0, 0, .04), 0 12px 40px rgba(0, 0, 0, .08);
  --glow-a: #ff9f0a;
  --glow-b: #ff6b2c;
  --glow-c: #ffcc66;
  --radius: 28px;
  --max: 1024px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #101012;
  --tile: #1c1c1e;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #86868b;
  --line: #38383a;
  --link: #2997ff;
  --pill: #0071e3;
  --pill-hover: #0077ed;
  --nav: rgba(22, 22, 23, .72);
  --code-bg: #1c1c1e;
  --code-text: #f5f5f7;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.022em; -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", system-ui, sans-serif; margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
code { font: 14px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0; }
p code { background: var(--bg-alt); padding: 1px 6px; border-radius: 6px; font-size: .86em; }
.muted { color: var(--faint); }
.center { text-align: center; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }
.glow {
  background: linear-gradient(100deg, var(--glow-c), var(--glow-a) 40%, var(--glow-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }

/* ---------- buttons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border-radius: 980px;
  background: var(--pill); color: #fff; font-size: 17px; font-weight: 500; letter-spacing: -.01em;
  transition: background .2s;
}
.pill:hover { background: var(--pill-hover); text-decoration: none; }
.pill-sm { min-height: 28px; padding: 0 12px; font-size: 12px; }
.more { font-size: 17px; font-weight: 500; }
.pill-ghost { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.pill-ghost:hover { background: color-mix(in srgb, var(--link) 10%, transparent); }
.more span { display: inline-block; transition: transform .2s; }
.more:hover span { transform: translateX(3px); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20; background: var(--nav);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav-in { max-width: var(--max); margin: 0 auto; padding: 0 22px; height: 52px; display: flex; align-items: center; gap: 28px; }
.nav-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--text); opacity: .8; font-size: 12px; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.theme-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.theme-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; display: none; }
:root[data-theme-pref="system"] .i-auto, :root[data-theme-pref="light"] .i-light, :root[data-theme-pref="dark"] .i-dark { display: block; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 72px 22px 40px; }
.hero-kicker { font-size: 21px; font-weight: 600; margin: 0; color: var(--glow-b); letter-spacing: .01em; }
.byline { font-size: 14px; color: var(--faint); margin: 2px 0 14px; letter-spacing: -.01em; }
.byline a { color: var(--muted); }
h1 { font-size: clamp(48px, 9vw, 96px); line-height: 1.05; font-weight: 700; letter-spacing: -.035em; }
.hero-sub { font-size: clamp(19px, 2.4vw, 28px); line-height: 1.25; font-weight: 500; color: var(--text); max-width: 760px; margin: 18px auto 0; letter-spacing: -.02em; }
.hero-cta { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px 28px; margin-top: 30px; }

/* download card */
.dl { max-width: 760px; margin: 36px auto 0; }
.dl-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 16px 16px 16px 20px; border-radius: 22px; background: var(--bg-alt); text-align: left; }
.dl-info { display: flex; align-items: center; gap: 14px; }
.dl-info img { width: 44px; height: 44px; }
.dl-info b { display: block; font-size: 17px; font-weight: 600; }
.dl-info span { display: block; font-size: 13px; color: var(--muted); }
.dl-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-btn { gap: 8px; min-height: 40px; padding: 0 18px; font-size: 15px; }
.dl-btn small { font-size: 12px; opacity: .75; font-weight: 500; }
.dl-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl-note { margin-top: 10px; }
.build-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.build-links .more { margin-top: 0 !important; }
.stage { max-width: 1100px; margin: 56px auto 0; }
.stage-img { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #201812; box-shadow: var(--shadow); }
.stage-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-img::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); border-radius: inherit; }
.lamp-bar { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 22px auto 0; max-width: 480px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; font-weight: 500; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.track { width: 51px; height: 31px; border-radius: 31px; background: color-mix(in srgb, var(--text) 16%, transparent); position: relative; transition: background .25s; }
.knob { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .25s; }
.switch input:checked + .track { background: #ff9f0a; }
.switch input:checked + .track .knob { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--link); outline-offset: 2px; }
input[type="range"] { flex: 1; accent-color: #ff9f0a; cursor: pointer; }
.fine { font-size: 12px; color: var(--faint); margin: 16px auto 0; max-width: 680px; letter-spacing: -.01em; }

/* ---------- sections ---------- */
.section { padding: 110px 0; }
.section.alt { background: var(--bg-alt); }
.headline { font-size: clamp(36px, 6vw, 64px); line-height: 1.06; font-weight: 700; letter-spacing: -.03em; text-align: center; }
.lede { font-size: clamp(17px, 2vw, 21px); line-height: 1.4; color: var(--muted); text-align: center; max-width: 720px; margin: 22px auto 0; font-weight: 400; }
.lede a { font-weight: 500; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--glow-b); margin: 0 0 8px; letter-spacing: -.01em; }

.tile { background: var(--tile); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.section.alt .tile { box-shadow: none; }
.tile h3 { font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: -.02em; margin-bottom: 10px; }
.tile p { color: var(--muted); margin: 0; font-size: 17px; }
.tile-photo { margin: 0; padding: 0; overflow: hidden; position: relative; }
.tile-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tile-photo figcaption { position: absolute; left: 18px; bottom: 16px; padding: 6px 12px; border-radius: 980px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }

/* film */
.film { padding-top: 90px; }
.film-frame { position: relative; max-width: 1200px; margin: 48px auto 0; padding: 0 22px; }
.film-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #000; box-shadow: var(--shadow); }
.film-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 12px; padding: 14px 24px 14px 18px; border: 0; border-radius: 980px;
  background: rgba(255, 255, 255, .16); color: #fff; font: 600 17px/1 inherit; letter-spacing: -.01em; cursor: pointer;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); transition: transform .2s, background .2s;
}
.film-play:hover { background: rgba(255, 255, 255, .24); transform: translate(-50%, -50%) scale(1.03); }
.film-play svg { width: 26px; height: 26px; fill: #fff; }
.film-play small { font-size: 13px; opacity: .75; font-weight: 500; }
.film-frame.playing .film-play { opacity: 0; pointer-events: none; }

/* app embed */
.device { max-width: 1200px; margin: 56px auto 0; padding: 0 22px; }
.device > * { box-shadow: none; }
.device-bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 16px; background: var(--bg-alt); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.device-title { color: var(--faint); font-size: 13px; font-weight: 500; }
.device-full { margin-left: auto; font-size: 13px; font-weight: 500; }
.device iframe { display: block; width: 100%; height: min(860px, 86vh); min-height: 560px; border: 1px solid var(--line); border-radius: 0 0 18px 18px; background: var(--bg-alt); box-shadow: var(--shadow); }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 4px; }
.steps li::before { content: counter(s); font-size: 13px; font-weight: 600; color: var(--glow-b); }
.steps b { font-size: 19px; font-weight: 600; }
.steps span { color: var(--muted); font-size: 15px; }

/* features */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.b-wide { grid-column: span 2; }
.big { font-size: clamp(48px, 6vw, 72px) !important; line-height: 1 !important; font-weight: 700; letter-spacing: -.04em; margin: 8px 0 12px !important; color: var(--text) !important; }
.big small { font-size: .4em; letter-spacing: -.01em; margin-left: 4px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips span { font-size: 14px; font-weight: 500; padding: 6px 14px; border-radius: 980px; background: var(--bg-alt); color: var(--text); }
.section.alt .chips span { background: var(--bg-alt); border: 1px solid var(--line); }

/* full 3D */
.dark-band { background: radial-gradient(900px 500px at 50% 0%, color-mix(in srgb, var(--glow-a) 10%, transparent), transparent 70%), var(--bg); }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; text-align: center; }
.specs b { display: block; font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; letter-spacing: -.03em; }
.specs span { color: var(--muted); font-size: 15px; }

/* desktop showcase: one screenshot at a time, segmented control */
.showcase { margin-top: 48px; text-align: center; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 980px; background: var(--bg-alt); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--muted); font: 500 14px/1 inherit; letter-spacing: -.01em; padding: 9px 18px; border-radius: 980px; cursor: pointer; transition: background .2s, color .2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--tile); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .06); }
:root[data-theme="dark"] .seg button[aria-selected="true"] { background: #3a3a3c; }
.show-frame { position: relative; margin: 28px 0 0; aspect-ratio: 1480 / 920; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: #0e1014; cursor: zoom-in; }
.show-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.show-frame img.on { opacity: 1; }
.show-cap { color: var(--muted); font-size: 15px; margin: 16px 0 0; min-height: 1.4em; }
.build { display: grid; grid-template-columns: 1fr 1.15fr; gap: 36px; align-items: center; margin-top: 36px; }
.build .more { display: inline-block; margin-top: 16px; }
.code { position: relative; background: var(--code-bg); border-radius: 18px; }
.section:not(.alt) .code { background: var(--bg-alt); }
.code pre { margin: 0; padding: 22px 24px; overflow-x: auto; color: var(--code-text); }
.code .c { color: var(--faint); }
.copy { position: absolute; top: 12px; right: 12px; border: 0; border-radius: 980px; padding: 5px 12px; background: var(--tile); color: var(--link); font: 500 13px inherit; cursor: pointer; box-shadow: var(--shadow); }

/* tips */
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 28px; margin-top: 56px; }
.tips div { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 18px; }
.tips b { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.tips span { color: var(--muted); font-size: 15px; }

/* footer */
.foot { background: var(--bg-alt); color: var(--faint); font-size: 12px; line-height: 1.5; padding: 22px 0 36px; letter-spacing: -.005em; }
.foot p { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.foot a { color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* lightbox */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .8); backdrop-filter: blur(6px); }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 14px; }
.lightbox button { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 22px; cursor: pointer; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .bento { grid-template-columns: 1fr 1fr; }
  .b-wide { grid-column: span 2; }
  .steps { grid-template-columns: 1fr 1fr; }
  .build { grid-template-columns: 1fr; }
  .tips { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .dl-card { justify-content: center; text-align: center; padding: 18px; }
  .dl-info { flex-direction: column; gap: 8px; }
  .dl-btns { width: 100%; }
  .dl-btn { flex: 1; }
  .hero { padding-top: 48px; }
  .section { padding: 76px 0; }
  .stage { margin-top: 36px; }
  .stage-img { border-radius: 18px; }
  .duo, .bento, .specs, .tips { grid-template-columns: 1fr; }
  .b-wide { grid-column: auto; }
  .tile { padding: 26px; border-radius: 22px; }
  .device { padding: 0 12px; }
  .device iframe { height: 88vh; }
  .steps { grid-template-columns: 1fr 1fr; gap: 22px; }
}
