/* ============================================================
   PortableVideoCompressor.ca design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* brand */
  --blue:        oklch(0.55 0.20 256);
  --blue-deep:   oklch(0.43 0.17 258);
  --blue-soft:   oklch(0.93 0.045 256);
  --red:         oklch(0.58 0.21 27);
  --red-deep:    oklch(0.49 0.20 27);
  --red-soft:    oklch(0.93 0.05 27);
  --yellow:      oklch(0.84 0.16 92);

  /* neutrals (cool, slightly blue-tinted) - light mode tuned for clear hierarchy */
  --ink:         oklch(0.21 0.022 262);
  --ink-2:       oklch(0.40 0.022 260);
  --ink-3:       oklch(0.53 0.018 258);
  --line:        oklch(0.865 0.014 258);
  --line-2:      oklch(0.905 0.011 258);
  --paper:       oklch(0.965 0.008 256);
  --paper-2:     oklch(0.935 0.011 256);
  --paper-3:     oklch(0.900 0.014 256);
  --surface:     #ffffff;
  --panel-ink:   oklch(0.21 0.022 262);

  --shadow-sm: 0 1px 2px oklch(0.30 0.04 262 / 0.10), 0 2px 6px oklch(0.30 0.04 262 / 0.08);
  --shadow-md: 0 4px 12px oklch(0.30 0.04 262 / 0.12), 0 14px 34px oklch(0.30 0.04 262 / 0.13);
  --shadow-lg: 0 10px 28px oklch(0.28 0.04 262 / 0.16), 0 34px 76px oklch(0.26 0.05 262 / 0.22);

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1140px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Open Sans', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--red); border-radius: 2px; }
.eyebrow.center::after { content: ""; width: 22px; height: 2px; background: var(--red); border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 15.5px;
  padding: 13px 22px; border-radius: 11px; cursor: pointer;
  border: 1px solid transparent; transition: transform .14s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--blue); color: white; box-shadow: 0 1px 0 oklch(0.62 0.2 256), var(--shadow-sm); }
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-red { background: var(--red); color: white; }
.btn-red:hover { background: var(--red-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn-lg { padding: 16px 28px; font-size: 16.5px; border-radius: 12px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand .dot-ca { color: var(--red); }
.logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, var(--blue), var(--blue-deep));
  display: grid; place-content: center; gap: 3px; padding: 8px 7px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 oklch(1 0 0 / 0.25);
}
.logo i { display: block; height: 3px; border-radius: 3px; background: var(--surface); }
.logo i:nth-child(1) { width: 18px; }
.logo i:nth-child(2) { width: 13px; }
.logo i:nth-child(3) { width: 8px; background: var(--yellow); }
.logo-img {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: block;
  box-shadow: var(--shadow-sm);
}
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { font-size: 14.5px; font-weight: 600; color: var(--ink-2); transition: color .15s; }
.nav-links a:hover { color: var(--blue); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: 72px; padding-bottom: 96px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 66px); font-weight: 700; }
.hero h1 .b { color: var(--blue); }
.hero h1 .r { color: var(--red); }
.hero .lead { font-size: 19px; color: var(--ink-2); margin-top: 22px; max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; font-size: 13.5px; color: var(--ink-3); font-family: var(--font-mono); }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta b { color: var(--blue); }
.tick { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex: none; }
.tick.r { background: var(--red); }

.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg::before {
  content: ""; position: absolute; top: -240px; right: -180px; width: 620px; height: 620px;
  background: radial-gradient(circle, var(--blue-soft), transparent 62%); opacity: 0.85;
}
.hero-bg::after {
  content: ""; position: absolute; bottom: -260px; left: -160px; width: 540px; height: 540px;
  background: radial-gradient(circle, var(--red-soft), transparent 64%); opacity: 0.7;
}

/* ---------- app window mockup ---------- */
.app-window {
  background: var(--surface); border-radius: 14px; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); overflow: hidden; width: 100%;
  transform: perspective(1600px) rotateY(-7deg) rotateX(2deg); transform-origin: center;
}
.aw-bar { height: 38px; background: linear-gradient(180deg, #fbfcfe, #f1f4f9); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 14px; gap: 9px; }
.aw-title { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.aw-title .mini-logo { width: 15px; height: 15px; border-radius: 4px; background: var(--blue); }
.aw-ctrls { margin-left: auto; display: flex; gap: 16px; color: var(--ink-3); font-size: 13px; }
.aw-ctrls span { width: 13px; height: 2px; background: var(--ink-3); display: block; }
.aw-ctrls .x { transform: rotate(45deg); }
.aw-ctrls .x2 { transform: rotate(-45deg); margin-left: -13px; }
.aw-body { padding: 18px; display: grid; gap: 14px; background: #fcfdff; }

.drop {
  border: 2px dashed var(--line); border-radius: 11px; padding: 18px; text-align: center;
  background: var(--paper-2); position: relative;
}
.drop .film { width: 44px; height: 30px; border-radius: 6px; margin: 0 auto 9px; background: var(--blue-soft); border: 1.5px solid var(--blue); position: relative; display: grid; place-items: center; }
.drop .film::before { content: ""; width: 0; height: 0; border-left: 11px solid var(--blue); border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.drop .fname { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink); font-weight: 700; }
.drop .fmeta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

.aw-tabs { display: flex; gap: 6px; background: var(--paper-3); padding: 4px; border-radius: 9px; }
.aw-tab { flex: 1; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 13px; padding: 7px; border-radius: 6px; color: var(--ink-2); }
.aw-tab.on { background: var(--surface); color: var(--blue); box-shadow: var(--shadow-sm); }

.aw-target { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.aw-target .lab { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.aw-target .val { font-family: var(--font-mono); font-weight: 700; font-size: 17px; color: var(--ink); }
.aw-target .val small { color: var(--blue); }

.aw-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.aw-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.aw-cell .k { font-size: 10.5px; color: var(--ink-3); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.aw-cell .v { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-top: 2px; }

.aw-prog { display: grid; gap: 7px; }
.aw-prog .ptop { display: flex; justify-content: space-between; font-size: 11.5px; font-family: var(--font-mono); color: var(--ink-3); }
.aw-prog .ptop b { color: var(--blue); }
.aw-track { height: 8px; border-radius: 6px; background: var(--paper-3); overflow: hidden; }
.aw-fill { height: 100%; width: 72%; border-radius: 6px; background: linear-gradient(90deg, var(--blue), var(--blue-deep)); }
.aw-go { background: var(--blue); color: white; text-align: center; padding: 12px; border-radius: 9px; font-family: var(--font-display); font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-sm); }

/* ---------- sections ---------- */
section { position: relative; }
.band { padding: 92px 0; }
.band.alt { background: var(--paper-2); border-block: 1px solid var(--line-2); }
.band.ink { background: var(--panel-ink); color: var(--paper); }
.sec-head { max-width: 40rem; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 42px); margin-top: 16px; }
.sec-head p { color: var(--ink-2); font-size: 17.5px; margin-top: 16px; }
.band.ink .sec-head p { color: oklch(0.82 0.01 256); }

/* problem strip */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.strip .cell { background: var(--surface); padding: 26px 24px; }
.strip .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px,3.2vw,34px); color: var(--blue); letter-spacing: -0.03em; line-height: 1.1; }
.strip .num.r { color: var(--red); }
.strip .cap { font-size: 14.5px; color: var(--ink-2); margin-top: 6px; }

/* features */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; grid-auto-rows: 1fr; }
.feat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-soft); }
.feat .ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-content: center; margin-bottom: 16px; background: var(--blue-soft); color: var(--blue); }
.feat:nth-child(3n+2) .ic { background: var(--red-soft); color: var(--red); }
.feat .ic svg { width: 22px; height: 22px; }
.feat h3 { font-size: 19px; }
.feat p { color: var(--ink-2); font-size: 15px; margin-top: 9px; flex: 1; }

/* how it works */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
.mode { border-radius: var(--radius); padding: 32px; border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.mode.auto { background: linear-gradient(160deg, var(--blue), var(--blue-deep)); color: white; border-color: transparent; }
.mode.adv { background: var(--surface); }
.mode .tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.mode.auto .tag { color: var(--yellow); }
.mode.adv .tag { color: var(--red); }
.mode h3 { font-size: 26px; margin-top: 12px; }
.mode.auto h3 { color: white; }
.mode > p { margin-top: 12px; font-size: 15.5px; }
.mode.auto > p { color: oklch(0.92 0.03 256); }
.mode.adv > p { color: var(--ink-2); }
.mode ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 11px; }
.mode li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; }
.mode li .ck { width: 19px; height: 19px; border-radius: 50%; flex: none; display: grid; place-content: center; margin-top: 1px; }
.mode.auto li .ck { background: oklch(1 0 0 / 0.18); color: white; }
.mode.adv li .ck { background: var(--red-soft); color: var(--red); }
.mode.auto li { color: oklch(0.94 0.02 256); }
.mode li .ck svg { width: 11px; height: 11px; }

/* story */
.story-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.story-aside { position: sticky; top: 96px; }
.story-aside .big { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.02em; line-height: 1.1; }
.story-aside .big em { font-style: normal; color: var(--blue); }
.story-aside .by { margin-top: 22px; display: flex; align-items: center; gap: 12px; }
.story-aside .ava { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(150deg, var(--red), var(--red-deep)); color: white; display: grid; place-content: center; font-family: var(--font-display); font-weight: 700; }
.story-aside .by .n { font-weight: 700; font-size: 15px; }
.story-aside .by .h { font-size: 13px; color: var(--ink-3); font-family: var(--font-mono); }
.story-sub { margin-top: 16px; color: var(--ink-2); font-size: 15px; max-width: 26em; }
.story-facts { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.sf { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface); gap: 16px; }
.sf:first-child { border-top: 0; }
.sk { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; flex: none; }
.sv { font-weight: 600; font-size: 13.5px; color: var(--ink); text-align: right; font-family: var(--font-display); }
.story-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sstep { border: 1px solid var(--line); border-radius: 12px; padding: 17px 18px; background: var(--surface); transition: border-color .18s ease, transform .18s ease; }
.sstep:hover { border-color: var(--blue-soft); transform: translateY(-3px); }
.sstep .stage { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.08em; }
.sstep h4 { font-size: 15.5px; margin-top: 7px; line-height: 1.2; }
.sstep p { color: var(--ink-2); font-size: 13.5px; margin-top: 7px; line-height: 1.5; }
.sstep .kb { font-family: var(--font-mono); font-size: 11.5px; background: var(--paper-3); color: var(--ink-2); padding: 1px 6px; border-radius: 5px; }

/* downloads */
.dl-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; margin-top: 44px; }
.dl-hero {
  grid-row: span 2; background: linear-gradient(165deg, var(--panel-ink), oklch(0.27 0.04 262));
  color: white; border-radius: var(--radius); padding: 34px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.dl-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; background: radial-gradient(circle, oklch(0.55 0.2 256 / 0.5), transparent 64%); }
.dl-hero .pill { align-self: flex-start; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: oklch(1 0 0 / 0.12); padding: 6px 12px; border-radius: 20px; }
.dl-hero h3 { color: white; font-size: 27px; margin-top: 18px; }
.dl-hero p { color: oklch(0.82 0.02 256); font-size: 15px; margin-top: 10px; }
.dl-hero .specs { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--font-mono); font-size: 12.5px; color: oklch(0.78 0.03 256); }
.dl-hero .specs b { color: var(--yellow); }
.dl-hero .actions { margin-top: auto; padding-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.dl-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  display: flex; align-items: center; gap: 16px; transition: transform .15s, box-shadow .2s, border-color .2s;
}
.dl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--blue-soft); }
.dl-ic { width: 46px; height: 46px; border-radius: 11px; flex: none; display: grid; place-content: center; background: var(--blue-soft); color: var(--blue); }
.dl-ic.r { background: var(--red-soft); color: var(--red); }
.dl-ic svg { width: 22px; height: 22px; }
.dl-card .meta { flex: 1; min-width: 0; }
.dl-card .meta h4 { font-size: 16px; }
.dl-card .meta p { font-size: 13px; color: var(--ink-3); margin-top: 3px; font-family: var(--font-mono); }
.dl-card .arrow { color: var(--ink-3); transition: color .15s, transform .15s; flex: none; }
.dl-card:hover .arrow { color: var(--blue); transform: translateX(3px); }

.dl-docs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px; }

/* v2 teaser */
.v2 { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; background: linear-gradient(120deg, var(--blue-deep), var(--blue)); color: white; border-radius: 20px; padding: 44px 48px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.v2::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, oklch(0.84 0.16 92 / 0.35), transparent 45%); }
.v2 .badge { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: var(--yellow); padding: 6px 13px; border-radius: 20px; display: inline-block; }
.v2 h3 { color: white; font-size: clamp(26px, 3vw, 36px); margin-top: 16px; }
.v2 p { color: oklch(0.9 0.03 256); font-size: 16px; margin-top: 12px; max-width: 34em; }
.v2 .big-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(60px, 9vw, 120px); line-height: 0.8; letter-spacing: -0.04em; color: oklch(1 0 0 / 0.16); position: relative; }

/* footer */
.foot { background: var(--panel-ink); color: oklch(0.78 0.02 256); padding: 64px 0 32px; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid oklch(1 0 0 / 0.08); }
.foot .brand { color: white; }
.foot .brand .dot-ca { color: var(--red); }
.foot-blurb { margin-top: 16px; font-size: 14.5px; max-width: 28em; color: oklch(0.72 0.02 256); }
.foot-col h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: oklch(0.62 0.02 256); margin: 0 0 16px; font-weight: 700; }
.foot-col a { display: block; font-size: 14.5px; padding: 5px 0; color: oklch(0.82 0.02 256); transition: color .15s; }
.foot-col a:hover { color: var(--yellow); }
.foot-bot { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding-top: 28px; font-size: 13px; color: oklch(0.6 0.02 256); font-family: var(--font-mono); }
.foot-bot a { color: oklch(0.72 0.02 256); }
.foot-bot a:hover { color: var(--yellow); }
.foot-bot .sp { margin-left: auto; }

/* license page */
.lic-wrap { max-width: 820px; }
.lic-head { padding: 64px 0 36px; }
.lic-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 44px; box-shadow: var(--shadow-sm); margin-bottom: 80px; }
.lic-body h3 { font-size: 19px; margin: 32px 0 12px; color: var(--blue); }
.lic-body h3:first-child { margin-top: 0; }
.lic-body p { color: var(--ink-2); font-size: 15px; margin-bottom: 12px; }
.lic-body .pre { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 20px; white-space: pre-wrap; }
.lic-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); margin-top: 18px; }
.lic-meta b { color: var(--ink); }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; color: var(--blue); font-size: 14.5px; }

/* reveal animation: opacity is ALWAYS 1 so content can never be stuck hidden
   (even where a paused compositor freezes the animation); .in just slides it up. */
.rv.in { animation: rv-in .6s ease both; }
@keyframes rv-in { from { transform: translateY(16px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .rv.in { animation: none; } html { scroll-behavior: auto; } }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .app-window { transform: none; max-width: 480px; }
  .story-grid { grid-template-columns: 1fr; gap: 32px; }
  .story-aside { position: static; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-hero { grid-row: auto; }
  .modes { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .v2 { grid-template-columns: 1fr; }
  .v2 .big-num { display: none; }
  .foot-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 20px; }
  .nav-links { display: none; }
  .strip { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .dl-docs { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .band { padding: 64px 0; }
}


/* ============================================================
   DARK THEME
   ============================================================ */
:root[data-theme="dark"] {
  --ink:       oklch(0.95 0.01 256);
  --ink-2:     oklch(0.78 0.015 256);
  --ink-3:     oklch(0.60 0.015 256);
  --line:      oklch(0.36 0.015 262);
  --line-2:    oklch(0.30 0.012 262);
  --paper:     oklch(0.175 0.018 264);
  --paper-2:   oklch(0.205 0.020 264);
  --paper-3:   oklch(0.255 0.022 264);
  --blue:      oklch(0.66 0.17 256);
  --blue-soft: oklch(0.30 0.07 256);
  --red:       oklch(0.66 0.19 27);
  --red-soft:  oklch(0.30 0.08 27);
  --surface:   oklch(0.225 0.020 264);
  --panel-ink: oklch(0.135 0.014 264);
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.40), 0 2px 6px oklch(0 0 0 / 0.30);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.45), 0 14px 34px oklch(0 0 0 / 0.40);
  --shadow-lg: 0 10px 30px oklch(0 0 0 / 0.50), 0 34px 80px oklch(0 0 0 / 0.55);
}
:root[data-theme="dark"] .aw-bar { background: linear-gradient(180deg, oklch(0.27 0.02 264), oklch(0.21 0.018 264)); }
:root[data-theme="dark"] .aw-body { background: oklch(0.20 0.018 264); }
:root[data-theme="dark"] .aw-ctrls span { background: var(--ink-3); }
:root[data-theme="dark"] .logo { box-shadow: var(--shadow-sm), inset 0 1px 0 oklch(1 0 0 / 0.18); }
:root[data-theme="dark"] body.tinted .band.alt { background: oklch(0.22 0.035 256); }

/* theme toggle button */
.theme-btn {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-content: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  transition: color .15s, border-color .15s, transform .14s, background .15s;
}
.theme-btn:hover { color: var(--blue); border-color: var(--blue); transform: translateY(-2px); }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }

/* ============================================================
   MOBILE NAV + RESPONSIVE REFINEMENTS
   ============================================================ */
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 11px; flex: none; cursor: pointer;
  align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  transition: border-color .15s, color .15s; }
.nav-toggle:hover { border-color: var(--blue); color: var(--blue); }
.nav-toggle .bars { position: relative; width: 18px; height: 13px; }
.nav-toggle .bars span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .26s ease, opacity .18s ease, top .26s ease; }
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 5.5px; }
.nav-toggle .bars span:nth-child(3) { top: 11px; }
.nav.menu-open .nav-toggle .bars span:nth-child(1) { top: 5.5px; transform: rotate(45deg); }
.nav.menu-open .nav-toggle .bars span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-toggle .bars span:nth-child(3) { top: 5.5px; transform: rotate(-45deg); }

.mobile-menu { display: none; }

@media (max-width: 860px) {
  .nav-inner { gap: 14px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu {
    display: block; overflow: hidden; max-height: 0;
    background: var(--paper); border-top: 0 solid var(--line-2);
    transition: max-height .34s ease, border-top-width .34s ease;
  }
  .nav.menu-open .mobile-menu { max-height: 70vh; border-top-width: 1px; box-shadow: var(--shadow-md); }
  .mobile-menu .mm-inner { display: flex; flex-direction: column; padding: 10px 28px 22px; }
  .mobile-menu a:not(.btn) { padding: 14px 2px; font-family: var(--font-display); font-weight: 600; font-size: 16.5px;
    color: var(--ink); border-bottom: 1px solid var(--line-2); }
  .mobile-menu a:not(.btn):hover { color: var(--blue); }
  .mobile-menu .btn { margin-top: 16px; justify-content: center; }
}

@media (max-width: 560px) {
  .nav-inner { height: 60px; gap: 10px; }
  .nav-cta { gap: 9px; }
  .nav-cta > .btn-primary { display: none; }   /* download lives in the drawer on phones */
  .brand { font-size: 15px; gap: 9px; }
  .logo-img { width: 30px; height: 30px; }
  .theme-btn, .nav-toggle { width: 38px; height: 38px; }
}

/* tighten section padding / cards on phones */
@media (max-width: 640px) {
  .hero { padding-top: 48px; padding-bottom: 64px; }
  .hero h1 { font-size: clamp(34px, 9vw, 46px); }
  .hero .lead { font-size: 17px; }
  .v2 { padding: 32px 26px; border-radius: 16px; }
  .lic-body { padding: 26px 22px; }
  .lic-body .pre { padding: 16px; font-size: 11.5px; }
  .mode { padding: 26px 22px; }
  .dl-hero { padding: 28px 24px; }
  .strip .num { font-size: 30px; }
  .sec-head h2 { font-size: clamp(25px, 7vw, 34px); }
}

/* tablet: 2-up docs, comfortable type */
@media (min-width: 641px) and (max-width: 920px) {
  .feat-grid { gap: 16px; }
}

/* guard against any horizontal overflow */
html, body { overflow-x: hidden; }
img, svg, video { max-width: 100%; }
.app-window { max-width: 100%; }

/* ============================================================
   REAL SCREENSHOTS (hero + gallery)
   ============================================================ */
.shot {
  margin: 0; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.shot img { display: block; width: 100%; height: auto; }

.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.shot-stage { width: 100%; perspective: 1300px; }
.shot-hero {
  width: 100%;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-origin: center; transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.22,.61,.36,1), box-shadow .55s ease;
  will-change: transform;
}
.shot-note {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3);
  text-align: center; letter-spacing: 0.01em; max-width: 30em;
}

.gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px;
  grid-auto-rows: 1fr;
}
.gcard {
  display: flex; flex-direction: column; position: relative;
  box-shadow: var(--shadow-md);
  transition: transform .38s cubic-bezier(.22,.61,.36,1), box-shadow .38s ease, border-color .25s ease;
}
.gcard::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--red));
  transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.gcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--blue-soft); }
.gcard:hover::after { transform: scaleX(1); }
.gcard img { display: block; width: 100%; height: auto; flex: none; border-bottom: 1px solid var(--line); }
.gcard figcaption {
  flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 5px;
  padding: 16px 20px; background: var(--surface);
}
.fc-title {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  color: var(--blue); letter-spacing: -0.01em;
  display: block;
}
.fc-desc {
  font-size: 13.5px; color: var(--ink-2); line-height: 1.55;
  display: block; transition: color .25s ease;
}
.gcard:hover .fc-desc { color: var(--ink); }

@media (max-width: 920px) {
  .shot-hero { max-width: 480px; }
  .shot-stage { perspective: 1200px; }
}
/* Mobile-only: the hero screenshot presents itself with a slow 3D sway (no cursor on touch) */
@media (max-width: 920px) and (prefers-reduced-motion: no-preference) {
  .shot-hero { animation: hero-present 7s ease-in-out infinite; transform-origin: center; }
}
@keyframes hero-present {
  0%, 100% { transform: rotateY(-8deg) rotateX(2.5deg) translateY(0); }
  50%      { transform: rotateY(8deg)  rotateX(-2deg) translateY(-10px); }
}
@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr; gap: 16px; }
  .story-steps { grid-template-columns: 1fr; }
}
