/* The landing page's own stylesheet.
 *
 * The ten tokens below are copied from public/style.css rather than imported: that file sets
 * `body` to a fixed-height, non-scrolling grid, which is exactly wrong for a page that scrolls.
 * The colours have to stay in step by hand, which is the price of the screenshots on this page
 * sitting on the same background as the app they are of.
 *
 * The type scale is not the app's. 13px is right for a tool being used at arm's length and
 * wrong for prose being read once.
 */
:root {
  --bg: #0f1115; --panel: #151922; --border: #262b36; --text: #e6e9ef; --muted: #8b93a3;
  --accent: #4f8cff; --green: #5fd38d; --red: #ff5f5f; --yellow: #f0b34c; --blue: #9ecbff;
  --control: #1c212c; --hover: #242a37; --selected: #1b2a44; --bg-deep: #12151c;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --page: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
code {
  font-family: var(--mono); font-size: .88em; color: var(--blue);
  background: var(--bg-deep); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- the bar ---------- */
.nav {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 22px;
  background: rgba(15, 17, 21, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: baseline; gap: 9px; text-decoration: none; color: var(--text); }
.brand-mark { width: 22px; height: 22px; align-self: center; flex: none; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-sub { color: var(--muted); font-size: 14px; }
.login {
  margin-left: auto; text-decoration: none; color: var(--text); font-weight: 600; font-size: 15px;
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 6px; background: var(--control);
}
.login:hover { background: var(--hover); border-color: #39404e; }

/* ---------- shared blocks ---------- */
main { display: block; }
section { max-width: var(--page); margin: 0 auto; padding: 0 22px; }
h2 { font-size: clamp(26px, 3.4vw, 34px); }
.section-lede, .lede { color: var(--muted); text-wrap: pretty; }
.cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 26px 0 0; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 11px 26px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--control); color: var(--text);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #3f7bef; }

/* A screenshot is of a dark app on this same background, so a hard frame would be the only
   edge it has. The border is that edge; the shadow lifts it off the page it matches. */
.shot { margin: 0; }
.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-deep);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}

/* ---------- hero ---------- */
/* The mark, tiled: a 2x2 plain weave repeats into cloth, which is the one thing this logo can
   do that a wordmark cannot. Kept under 4% and faded out downward -- at full strength it is a
   texture competing with a screenshot of a waveform, and the waveform has to win. */
.hero {
  position: relative; padding-top: 72px; padding-bottom: 8px; text-align: center;
  max-width: calc(var(--page) + 120px);
}
.hero::before {
  content: ""; position: absolute; inset: -56px 0 auto; height: 620px; z-index: -1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' fill='%234f8cff'><rect x='2' y='7' width='9' height='12' rx='2'/><rect x='2' y='2' width='9' height='4' rx='2'/><rect x='13' y='2' width='12' height='9' rx='2'/><rect x='26' y='2' width='4' height='9' rx='2'/><rect x='21' y='13' width='9' height='12' rx='2'/><rect x='21' y='26' width='9' height='4' rx='2'/><rect x='7' y='21' width='12' height='9' rx='2'/><rect x='2' y='21' width='4' height='9' rx='2'/></svg>");
  background-size: 68px 68px; opacity: .085;
  -webkit-mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, .35) 45%, transparent 100%);
  mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, .35) 45%, transparent 100%);
}
.hero h1 { font-size: clamp(34px, 5.6vw, 58px); max-width: 30ch; margin: 0 auto; }
.hero .lede { font-size: clamp(17px, 2vw, 20px); max-width: 62ch; margin: 22px auto 0; }
.hero .cta { justify-content: center; }
.hero .shot { margin-top: 56px; }

/* ---------- three stages ---------- */
.stages { padding-top: 104px; }
.stages .section-lede { max-width: 66ch; margin: 16px 0 0; }
.cards { list-style: none; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 36px 0 0; }
.cards li { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 22px; }
.cards .ico { width: 22px; height: 22px; color: var(--accent); display: block; }
.cards h3 { font-size: 19px; margin: 14px 0 8px; }
.cards p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- feature rows ---------- */
.feature {
  padding-top: 104px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 46px; align-items: center;
}
.feature.reverse .feature-text { order: 2; }
.feature p { color: var(--muted); margin: 16px 0 0; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 9px; }
.ticks li { position: relative; padding-left: 24px; color: var(--muted); font-size: 15.5px; }
/* A woven bar rather than a check mark: the tick list is the one place on the page a bullet
   can carry the mark without being a logo sitting in the margin. */
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 11px; height: 4px;
  border-radius: 2px; background: var(--accent); opacity: .85;
}

/* ---------- also ---------- */
.also { padding-top: 104px; }
.also-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px 36px; grid-template-columns: repeat(2, 1fr); }
.also-list li { color: var(--muted); font-size: 15.5px; border-top: 1px solid var(--border); padding-top: 14px; }
.also-list b { color: var(--text); font-weight: 600; }

/* ---------- closing ---------- */
.close { padding: 112px 22px 104px; text-align: center; }
.close-mark { width: 44px; height: 44px; color: var(--text); display: block; margin: 0 auto 22px; }
.close h2 { max-width: 20ch; margin: 0 auto; }
.close .cta { justify-content: center; }

/* ---------- the sign-in dialog ---------- */
/* Opened over the page by login.js; the markup does not exist until then, so nothing here is
   on screen for a visitor whose JavaScript never ran. The geometry is the app's dialog
   (style.css `.modal` / `.modal-box`) rather than this page's cards: it is the same question
   the app asks, and it should not be a second-looking thing because it happens to be here. */
.signin {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .58); backdrop-filter: blur(2px);
}
.signin[hidden] { display: none; }
.signin-box {
  position: relative; text-align: center;
  width: min(420px, 100%); padding: 32px 32px 34px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.signin-mark { width: 34px; height: 34px; color: var(--text); display: block; margin: 0 auto 16px; }
.signin-box h2 { font-size: 22px; margin: 0; }
.signin-note { color: var(--muted); font-size: 15px; margin: 10px 0 22px; }
/* Google's button, to Google's recipe: white, pill, their mark at 18px. The /login page draws
   the same one (server/auth.js); it is the one control on this page that is not ours to
   restyle. */
.gbtn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 20px;
  padding: 10px 18px; font-size: 15px; font-weight: 600; text-decoration: none;
}
.gbtn:hover { background: #f2f2f2; }
.gmark { width: 18px; height: 18px; flex: none; }
.signin-x {
  position: absolute; top: 10px; right: 10px;
  display: flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  padding: 0; background: none; border: 1px solid transparent; border-radius: 5px;
  color: var(--muted); cursor: pointer;
}
.signin-x:hover { background: var(--hover); border-color: var(--border); color: var(--text); }

footer {
  border-top: 1px solid var(--border); background: var(--bg-deep);
  padding: 34px 22px; text-align: center;
}
.colophon { max-width: 62ch; margin: 0 auto; color: var(--muted); font-size: 14px; }
.links { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.links a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links .ico { width: 15px; height: 15px; }
.links .dot { margin: 0 8px; }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 30px; padding-top: 80px; }
  .feature.reverse .feature-text { order: 0; }
  .also-list { grid-template-columns: 1fr; }
  .stages, .also { padding-top: 80px; }
  .hero { padding-top: 48px; }
  .hero .shot { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
