/* The page: layout, type, sections. Colors, sizes and speeds come from tokens.css. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink-text); font: 16px/1.6 var(--font-body); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 300; letter-spacing: -0.02em; margin: 0; color: var(--ink-value); }
a { color: inherit; }
p { margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px; background: var(--bg); color: var(--ink-value); border-radius: 6px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--mid); outline-offset: 3px; }

/* the sky: a soft Daylight glow that rises as you scroll */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sky::before {
  content: ""; position: absolute; left: -20%; right: -20%; height: 700px; top: calc(100% - 200px);
  transform: translateY(calc(var(--sun, 0) * -55vh)); will-change: transform, opacity;
  filter: blur(80px); opacity: calc(0.3 + var(--sun, 0) * 0.25);
  background: radial-gradient(ellipse at 35% 50%, var(--lo), transparent 55%), radial-gradient(ellipse at 65% 50%, var(--hi), transparent 55%);
}

/* nav */
nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(20, 20, 23, 0.72); border-bottom: 1px solid var(--line); }
nav .wrap { display: flex; align-items: center; height: 64px; gap: 26px; }
.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; font: 600 17px var(--font-head); color: var(--ink-value); text-decoration: none; }
.logo img { width: 32px; height: 24px; filter: drop-shadow(0 0 10px rgba(230, 90, 114, 0.35)); }
nav .tabs { display: flex; gap: 26px; }

/* hero */
.hero { position: relative; padding: 84px 0 0; text-align: center; }
.hero .spot { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--lo) 16%, transparent), transparent 60%); }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.04; }
.hero h1 .g { background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.js .hero h1 .w { display: inline-block; opacity: 0; transform: translateY(8px); animation: rise var(--slow) var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.lead { color: var(--ink-label); font-size: 18px; max-width: 520px; margin: 20px auto 28px; }
.ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.picker { margin: 4px auto 18px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; max-width: 440px; }
.picker .lbl { color: var(--ink-label); font-size: 13px; margin-right: 6px; }
.stage { margin: 46px auto 0; max-width: 1000px; }
.hint { margin-top: 14px; color: var(--ink-label); font-size: 13px; }
.hint .touch { display: none; }
@media (hover: none) { .hint .mouse { display: none; } .hint .touch { display: inline; } }

/* sections */
section { padding: 120px 0 0; }
.head { max-width: 600px; margin-bottom: 40px; }
.head h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.1; }
.head p { color: var(--ink-label); margin-top: 14px; }

/* Win.Feel: a section opens like our windows (fade on a sine, rise 8 px, 0.22 s); pieces lift 4 px, 0.02 s apart */
.js .feel { opacity: 0; transform: translateY(8px); }
.js .feel.in { opacity: 1; transform: none; transition: opacity var(--open) var(--ease-sine), transform var(--open) var(--ease); }
.js .feel .piece { opacity: 0; transform: translateY(4px); }
.js .feel.in .piece { opacity: 1; transform: none; transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease); }
/* if the page script never runs (a file failed to load), show everything after 3 s anyway */
.js .feel:not(.in), .js .feel:not(.in) .piece { animation: feel-fallback 0s 3s forwards; }
.js.ready .feel:not(.in), .js.ready .feel:not(.in) .piece { animation: none; }
@keyframes feel-fallback { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .feel, .js .feel .piece, .js .hero h1 .w { opacity: 1; transform: none; animation: none; }
  html { scroll-behavior: auto; }
}

/* cards that size to their text: the inside sits in the flow, inset by the border */
.card > .in, .site > .in, .support > .in, .bench > .in { position: relative; inset: auto; margin: var(--t, 0); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { display: flex; cursor: default; outline: none; }
.card > .in { flex: 1; padding: 20px 22px 22px; }
.card h3 { font-size: 18px; font-weight: 400; line-height: 1.3; }
.card p { margin-top: 8px; font-size: 14px; line-height: 1.55; }
.card.lit > .sh.b, .card:focus-visible > .sh.b { border-image: linear-gradient(90deg, var(--lo), var(--hi)) 1; }
.more { margin-top: 26px; color: var(--ink-label); font-size: 15px; }

/* the player frame demo */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .head { margin: 0; }
.bench > .in { min-height: 244px; display: grid; place-items: center; padding: 44px 20px 24px; }
.bench .note { position: absolute; top: 12px; left: 16px; font-size: 12px; color: var(--ink-label); }
.bench .zoom { position: relative; width: 187px; height: 43px; margin: 44px 0 48px; transform: scale(2); }
.bench .zoom > .uf { left: 0; top: 0; }
.bench .ctl { display: flex; gap: 12px; justify-content: center; }

/* downloads */
.sites { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.site > .in { padding: 24px 28px 26px; display: flex; flex-direction: column; align-items: flex-start; }
.site h3 { font-size: 24px; }
.site p { font-size: 14px; line-height: 1.55; margin: 8px 0 20px; }

/* support */
#support { padding-bottom: 40px; }
.support > .in { padding: 48px 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.support h2 { font-size: 36px; line-height: 1.1; }
.support p { margin-top: 14px; }
.support .two { display: flex; flex-direction: column; gap: 12px; }

footer { padding: 32px 0 56px; color: var(--ink-label); font-size: 13px; border-top: 1px solid var(--line); margin-top: 60px; }

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .split, .sites { grid-template-columns: 1fr; }
  .support > .in { grid-template-columns: 1fr; padding: 32px 28px; }
}
@media (max-width: 640px) {
  nav .tabs { display: none; }
  .hero { padding-top: 56px; }
  .cards { grid-template-columns: 1fr; }
  section { padding-top: 88px; }
  .bench .zoom { transform: scale(1.5); margin: 30px 0 26px; }
}
