/* ==========================================================================
   Shorts Pilot — product site.
   Same tokens as the application itself, so the two read as one thing.
   ========================================================================== */
:root {
  --bg:        #0b0d10;
  --surface:   #14171c;
  --surface-2: #1b1f26;
  --line:      #262b33;
  --line-soft: #1e232a;
  --text:      #e7ebf0;
  --muted:     #8b95a3;
  --dim:       #5b6472;

  --accent:    #ff5c39;
  --accent-2:  #ff9a3d;
  --accent-dim:#ff5c3922;
  --good:      #3ddc91;
  --warn:      #ffc75a;
  --bad:       #ff7a7a;
  --busy:      #5aa9ff;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --pad: clamp(20px, 5vw, 40px);
  --section: clamp(72px, 11vw, 140px);
  --wide: 1160px;

  --font: ui-sans-serif, system-ui, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.025em; font-weight: 650; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }

::selection { background: var(--accent); color: #1a0d08; }

/* --- scrollbars, matching the app -------------------------------------- */
* { scrollbar-width: thin; scrollbar-color: #2b313a transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #2b313a; border-radius: 999px;
  border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #3d4552; background-clip: padding-box; }

/* --- shared ------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--pad); }
section { padding-block: var(--section); }
section + section { border-top: 1px solid var(--line-soft); }

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px;
  font-weight: 700; color: var(--accent);
}
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin-top: 12px; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 16.5px; }

.mark { width: 34px; height: 34px; flex: none; display: block; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  background: var(--accent); color: #1a0d08;
  transition: filter .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--surface); border-color: #39414d; filter: none; }

code, .mono { font-family: var(--mono); }
:not(pre) > code {
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px; font-size: .89em; color: var(--text);
}

/* --- header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #0b0d10e8; backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px; height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand strong { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.brand .mark { filter: drop-shadow(0 4px 12px #ff5c3955); }

.site-nav { margin-left: auto; display: flex; gap: 4px; }
.site-nav a {
  padding: 8px 13px; border-radius: var(--r-sm); text-decoration: none;
  color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color .15s ease, background .15s ease;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.version-pill {
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent); white-space: nowrap;
}
@media (max-width: 860px) { .site-nav { display: none; } }

/* --- hero --------------------------------------------------------------- */
.hero { padding-top: clamp(56px, 9vw, 104px); padding-bottom: 0; }
.hero h1 {
  font-size: clamp(40px, 7vw, 74px); margin-top: 16px; letter-spacing: -.04em;
}
.hero .lede {
  font-size: clamp(17px, 2vw, 20px); color: var(--muted);
  max-width: 620px; margin-top: 20px;
}
.hero .lede strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px;
  color: var(--dim); font-size: 13.5px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--good); flex: none;
}

/* --- screenshot frames -------------------------------------------------- */
.shot {
  margin-top: clamp(44px, 6vw, 72px);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--surface); padding: 8px;
  box-shadow: 0 40px 90px -30px #000c, 0 0 0 1px #ffffff06 inset;
}
.shot img { width: 100%; height: auto; display: block; border-radius: 20px; }
.shot.clickable { cursor: zoom-in; }
.shot.clickable:hover { border-color: #39414d; }

.shot-caption {
  margin-top: 14px; color: var(--dim); font-size: 13px; text-align: center;
}

/* --- flow --------------------------------------------------------------- */
.flow { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.flow-step {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; position: relative;
}
.flow-step .n {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--accent); letter-spacing: .1em;
}
.flow-step h3 { font-size: 16.5px; margin-top: 12px; }
.flow-step p { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* --- features ----------------------------------------------------------- */
.features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px;
  transition: border-color .18s ease, transform .18s ease;
}
.feature:hover { border-color: #39414d; transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .feature:hover { transform: none; } }
.feature .ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-dim); color: var(--accent); margin-bottom: 16px;
}
.feature .ico svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.feature h3 { font-size: 16.5px; }
.feature p { color: var(--muted); font-size: 14.2px; margin-top: 9px; }

/* --- gallery ------------------------------------------------------------ */
.gallery { display: grid; gap: clamp(28px, 4vw, 44px); }
.gallery-item { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .gallery-item { grid-template-columns: 1fr 1.35fr; }
  .gallery-item:nth-child(even) .gallery-copy { order: 2; }
}
.gallery-copy h3 { font-size: clamp(20px, 2.4vw, 25px); }
.gallery-copy p { color: var(--muted); margin-top: 12px; font-size: 15px; }
.gallery-copy .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }

/* A figure in a gallery row is a column beside its copy, not a hero shot: the
   leading margin belongs to the hero alone. The screenshots also differ wildly
   in shape -- a tall settings form next to three short paragraphs left one
   column towering over the other -- so the image height is capped to keep every
   row on the same rhythm, whatever shape the next screenshot turns out to be. */
.gallery-item .shot { margin-top: 0; }
.gallery-item .shot img {
  max-height: clamp(250px, 34vh, 340px);
  width: auto; max-width: 100%; margin-inline: auto;
}

.tag {
  font-size: 11.5px; font-weight: 650; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}

/* --- steps (install / usage) -------------------------------------------- */
.steps { display: grid; gap: 14px; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 34px 1fr; gap: 18px; align-items: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 20px 22px;
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-dim); color: var(--accent);
  font-size: 13px; font-weight: 700; font-family: var(--mono);
}
.step h3 { font-size: 15.5px; }
.step p { color: var(--muted); font-size: 14.2px; margin-top: 7px; }
.step p + p { margin-top: 10px; }

pre {
  background: #0e1116; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 14px 16px; margin: 14px 0 0; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; color: var(--text); line-height: 1.7;
}
pre .c { color: var(--dim); }

/* --- two-column info ---------------------------------------------------- */
.split { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.note {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--warn); border-radius: var(--r-md); padding: 22px 24px;
}
.note.info { border-left-color: var(--busy); }
.note.good { border-left-color: var(--good); }
.note h3 { font-size: 15.5px; }
.note p { color: var(--muted); font-size: 14.2px; margin-top: 9px; }
.note ul { color: var(--muted); font-size: 14.2px; margin: 9px 0 0; padding-left: 18px; }
.note li + li { margin-top: 6px; }

/* --- requirements list -------------------------------------------------- */
.reqs { display: grid; gap: 10px; margin-top: 6px; }
.req {
  display: flex; align-items: baseline; gap: 12px;
  padding: 13px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 14.2px;
}
.req b { font-weight: 600; min-width: 148px; }
.req span { color: var(--muted); }

/* --- source unlock ------------------------------------------------------- */
/* --- download rows ------------------------------------------------------- */
.dl-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 14px; margin-top: 20px;
}
.dl-meta { color: var(--dim); font-size: 13.5px; font-family: var(--mono); }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.unlock {
  margin-top: 22px; padding: 26px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  display: grid; gap: 12px; align-items: center;
  grid-template-columns: auto 1fr auto;
}
.unlock label { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.unlock input {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 14.5px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--text);
}
.unlock input:focus { outline: none; border-color: var(--accent); }
.unlock input::placeholder { color: var(--dim); }
.unlock-msg {
  grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); margin: 0;
}
.unlock-msg.good { color: var(--good); }
.unlock-msg.bad  { color: var(--bad); }

@media (max-width: 680px) {
  .unlock { grid-template-columns: 1fr; }
  .unlock label { margin-bottom: -4px; }
}

/* --- about -------------------------------------------------------------- */
.about-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(28px, 4vw, 44px);
  display: grid; gap: 26px;
}
@media (min-width: 780px) { .about-card { grid-template-columns: auto 1fr; align-items: start; } }
.avatar {
  width: 78px; height: 78px; border-radius: 24px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  color: #1a0d08; font-size: 26px; font-weight: 700; letter-spacing: -.02em;
  box-shadow: 0 12px 30px #ff5c3944;
}
.about-card h3 { font-size: 21px; }
.about-card .role { color: var(--accent); font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.about-card p { color: var(--muted); margin-top: 14px; font-size: 15px; }

/* --- licence ------------------------------------------------------------ */
.licence {
  display: grid; gap: 24px; align-items: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(26px, 4vw, 38px);
}
@media (min-width: 720px) { .licence { grid-template-columns: auto 1fr; } }
.licence-badge {
  display: grid; place-items: center; gap: 8px;
  width: 132px; min-height: 92px; padding: 18px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line);
}
.licence-badge b { font-size: 26px; line-height: 1; }
.licence-badge span {
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); text-align: center; line-height: 1.6;
  /* letter-spacing appends a gap after the last glyph of every line, which
     drags centred text visibly left. Pull that trailing space back. */
  margin-right: -.16em;
  text-wrap: balance;
}
.licence p { color: var(--muted); font-size: 14.5px; }
.licence p + p { margin-top: 10px; }

/* --- footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line-soft); padding-block: 44px;
  color: var(--dim); font-size: 13.5px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
.site-footer .spacer { flex: 1 1 auto; }

/* --- lightbox ----------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: #05070ceb; padding: clamp(16px, 4vw, 48px);
  place-items: center; cursor: zoom-out;
}
.lightbox[open] { display: grid; }
.lightbox img {
  /* Against the grid row -- which the full-size image stretches itself --
     max-height:100% never clamps. Measure the viewport instead. */
  max-width: 100%; max-height: 88vh; width: auto; height: auto;
  border-radius: var(--r-md); border: 1px solid var(--line);
  box-shadow: 0 40px 120px #000;
}
.lightbox-close {
  position: absolute; top: clamp(12px, 3vw, 28px); right: clamp(12px, 3vw, 28px);
  background: none; border: none; color: var(--muted);
  font-size: 30px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { color: var(--text); }

/* --- reveal on scroll --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .reveal.in { transition: none; }
}
