/* Griddler landing page.
   Dark only, on purpose: the product is a dark terminal grid and the logo lockup
   is drawn for near-black. A light mode here would be a different brand.
   Palette is the app's own Tokyo Night default (renderer/style.css) so a
   screenshot dropped anywhere on the page sits in its own colours. */

:root {
  --bg:        #0b0b12;
  --bg-1:      #131320;
  --bg-2:      #16161e;
  --panel:     #1a1b26;
  --line:      #262a3d;
  --line-soft: rgba(192, 202, 245, .09);

  --fg:        #c0caf5;
  --fg-strong: #e6ebff;
  --muted:     #7a83a8;

  --cy:        #7dcfff;
  --vi:        #9d7cd8;
  --accent:    #7aa2f7;
  --ok:        #9ece6a;
  --warn:      #e0af68;
  --claude:    #bb6b3b;
  --codex:     #2e8b7f;

  --ui:   "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Inter, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --r: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.62 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* One ambient wash behind everything, keyed to the lockup's violet→cyan. */
body::before {
  content: "";
  position: fixed;
  inset: -20% -20% auto -20%;
  height: 70vh;
  background:
    radial-gradient(50% 60% at 22% 0%, rgba(157, 124, 216, .16), transparent 70%),
    radial-gradient(45% 55% at 78% 8%, rgba(125, 207, 255, .12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--cy); text-decoration: none; }
a:hover { color: var(--fg-strong); }

h1, h2, h3 { color: var(--fg-strong); line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 650; }
h3 { font-size: 1.02rem; font-weight: 650; letter-spacing: -.01em; }
p  { margin: 1em 0 0; }

.grad {
  background: linear-gradient(100deg, var(--vi), var(--cy) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--panel); color: var(--fg-strong);
  padding: 10px 16px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 16px; top: 16px; }

:focus-visible { outline: 2px solid var(--cy); outline-offset: 3px; border-radius: 6px; }

/* ---------- chrome ---------- */

.topbar {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin: 0 auto;
  padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
/* Transparent because build-assets.sh luma-keys the shipped lockup's black
   plate away. A CSS blend mode can't do this job: .topbar is a stacking context,
   so mix-blend-mode never reaches the page background behind it. */
.brand img { width: 190px; height: auto; }
.topbar nav { display: flex; align-items: center; gap: 26px; }
.topbar nav a { color: var(--muted); font-size: .92rem; }
.topbar nav a:hover { color: var(--fg-strong); }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 9px;
  font-size: .95rem; font-weight: 600;
  border: 1px solid transparent;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(100deg, var(--vi), var(--cy));
  color: #0a0a10;
}
.btn-primary:hover { color: #0a0a10; }
.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, .02);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--cy); color: var(--fg-strong); }
.topbar .btn-ghost { padding: 8px 14px; }

/* ---------- hero ---------- */

.hero {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(40px, 7vw, 84px) 24px clamp(48px, 6vw, 80px);
  text-align: center;
}
.hero-copy { max-width: 760px; margin: 0 auto; }
.lede { font-size: clamp(1.02rem, 1.7vw, 1.18rem); color: var(--fg); margin-top: 20px; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.platforms {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: .78rem; letter-spacing: .04em;
  color: var(--muted);
}

/* ---------- screenshots ---------- */

.shot { margin: 0; }
.shot video, .shot img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .55);
}
.shot figcaption {
  margin-top: 14px;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .03em;
  color: var(--muted); text-align: center;
}
.shot-hero { margin-top: clamp(40px, 5vw, 64px); }
.shot-hero video {
  border-radius: 14px;
  box-shadow: 0 40px 110px rgba(0, 0, 0, .62), 0 0 0 1px rgba(125, 207, 255, .08);
}

/* ---------- bands ---------- */

.band {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 24px;
  border-top: 1px solid var(--line-soft);
}
.band.alt { background: linear-gradient(180deg, rgba(26, 27, 38, .5), transparent 60%); }
.band-title { text-align: center; }
.band-title + .band-lede { text-align: center; max-width: 62ch; margin: 16px auto 0; opacity: .86; }
.band-title, .band-lede { margin-bottom: 0; }

.eyebrow {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--vi);
}

.aside {
  font-size: .9rem;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
/* Reversing swaps which column the media lands in, so the track sizes have to
   swap with it — otherwise the screenshot inherits the narrow copy column and
   shrinks by a third every other section. */
.split.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.reverse .split-copy { order: 2; }
/* …except where the copy is the long side and the figure is a small diagram. */
.split.reverse.copy-lead { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split-copy p { color: var(--fg); opacity: .88; max-width: 46ch; }

/* ---------- the amber/green explainer (CSS, not video) ---------- */

.states { display: grid; gap: 14px; }

.pane {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 10px;
  padding: 12px 14px 14px;
  position: relative;
  overflow: hidden;
}
.pane-head {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: .74rem; color: var(--muted);
}
.tag {
  font-size: .6rem; font-weight: 700; letter-spacing: .08em;
  padding: 2px 6px; border-radius: 4px; color: #0d0d13;
}
.tag.claude { background: var(--claude); }
.tag.codex  { background: var(--codex); }

.pane-body { margin-top: 12px; display: grid; gap: 7px; }
.line { display: block; height: 7px; border-radius: 3px; background: rgba(192, 202, 245, .13); width: 100%; }
.w80 { width: 80%; } .w70 { width: 70%; } .w60 { width: 60%; }
.w50 { width: 50%; } .w40 { width: 40%; } .w30 { width: 30%; }

.pane-state {
  position: absolute; right: 12px; bottom: 11px;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

.pane.working { border-left-color: var(--warn); }
.pane.working .pane-state { color: var(--warn); }
.pane.working .line:last-child { animation: type 1.7s steps(14) infinite; }

.pane.needs {
  border-color: var(--ok); border-left-color: var(--ok);
  animation: needs 1.6s ease-in-out infinite;
}
.pane.needs .pane-state { color: var(--ok); }

.pane.idle { opacity: .62; }

@keyframes type { from { width: 8%; } to { width: 58%; } }
@keyframes needs {
  0%, 100% { box-shadow: 0 0 0 0 rgba(158, 206, 106, .30); }
  50%      { box-shadow: 0 0 22px 2px rgba(158, 206, 106, .22); }
}

/* ---------- the assistant ring ----------
   The app lays its ring on an arc, because the brain lives in a screen corner
   and a full circle would push half the entries off-screen. Here it has the
   middle of a section to itself, so it gets the circle the arc is standing in
   for. Positions are hand-placed on the 5 points rather than computed — five is
   what ships, and a trig helper for five constants earns nothing. */

.ring-demo {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 420px;
  /* justify-self, NOT `margin: 0 auto`: an auto margin cancels a grid item's
     stretch, so the box shrink-wrapped to the 84px core and every satellite
     landed on top of it. */
  justify-self: center;
  display: grid;
  place-items: center;
}
.ring-demo::before {
  content: "";
  position: absolute;
  /* Sized so the dashed orbit passes through the satellites' centres, not
     inside them — an orbit the moons miss reads as two unrelated rings. */
  inset: 9%;
  border-radius: 50%;
  border: 1px dashed var(--line);
  opacity: .8;
}
.ring-core {
  width: 84px; height: 84px;
  display: grid; place-items: center;
  font-size: 2.1rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(157, 124, 216, .35), rgba(19, 19, 32, .95));
  border: 1px solid var(--line);
  box-shadow: 0 0 46px rgba(157, 124, 216, .28);
  animation: breathe 4.5s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 40px rgba(157, 124, 216, .22); }
  50%      { box-shadow: 0 0 62px rgba(125, 207, 255, .30); }
}

.ring-item {
  position: absolute;
  display: grid; place-items: center; gap: 2px;
  width: 92px;
  text-align: center;
  animation: rise .5s var(--ease, ease) both;
}
.ring-item i {
  font-style: normal; font-size: 1.35rem;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
}
.ring-item b {
  font-family: var(--mono);
  font-size: .68rem; font-weight: 500; letter-spacing: .06em;
  color: var(--muted);
}
/* Five points, clockwise from the top. */
.ring-item.i0 { top: 2%;  left: 50%; transform: translateX(-50%); animation-delay: .00s; }
.ring-item.i1 { top: 32%; right: -2%;                             animation-delay: .06s; }
.ring-item.i2 { bottom: 4%; right: 8%;                            animation-delay: .12s; }
.ring-item.i3 { bottom: 4%; left: 8%;                             animation-delay: .18s; }
.ring-item.i4 { top: 32%; left: -2%;                              animation-delay: .24s; }

@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.ring-item.i0 { animation-name: rise-c; }
@keyframes rise-c { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.9); } }

/* ---------- the browser-cell policy table ---------- */

.mini {
  background: linear-gradient(180deg, rgba(31, 35, 53, .7), rgba(22, 22, 30, .7));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 20px 18px;
  font-family: var(--mono);
  font-size: .84rem;
}
.mini-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.mini-k { color: var(--fg-dim, var(--fg)); opacity: .85; }
.mini-v { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; }
.mini-v.ok   { color: var(--ok); }
.mini-v.no   { color: var(--muted); }
.mini-v.warn { color: var(--warn); }
.mini-foot {
  padding-top: 14px;
  font-size: .74rem; line-height: 1.6;
  color: var(--muted);
}

/* ---------- the game's numbers ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.stat {
  background: linear-gradient(180deg, rgba(31, 35, 53, .7), rgba(22, 22, 30, .7));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 20px;
  text-align: center;
}
.stat-n {
  display: block;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 700;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--vi), var(--cy) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-l {
  display: block; margin-top: 8px;
  font-family: var(--mono); font-size: .72rem; line-height: 1.5;
  color: var(--muted);
}

/* ---------- cards ---------- */

.cards {
  list-style: none; margin: 44px 0 0; padding: 0;
  display: grid; gap: 16px;
  /* 320 rather than 268 so the six cards land 3+3 at full width instead of 4+2. */
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.cards li {
  background: linear-gradient(180deg, rgba(31, 35, 53, .7), rgba(22, 22, 30, .7));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
}
.cards p { color: var(--fg); opacity: .82; font-size: .94rem; margin-top: 8px; }
.cards code {
  font-family: var(--mono); font-size: .84em;
  background: rgba(125, 207, 255, .08);
  color: var(--cy);
  padding: 1px 5px; border-radius: 4px;
  overflow-wrap: anywhere;
}

/* ---------- closer + footer ---------- */

.closer {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto;
  padding: clamp(64px, 9vw, 116px) 24px;
  text-align: center;
}
.closer h2 { font-size: clamp(1.4rem, 3vw, 2rem); }

footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line-soft);
  max-width: var(--wrap); margin: 0 auto;
  padding: 28px 24px 56px;
  display: flex; align-items: center; gap: 12px;
  font-size: .88rem; color: var(--muted);
}
footer a { margin-left: auto; }

/* ---------- responsive ---------- */

/* The section links go before the layout does. Five of them plus the handle
   plus the lockup stop fitting on one line around 1020px, and a wrapped topbar
   drops the handle onto its own row under the logo, reading as a mistake. */
@media (max-width: 1024px) {
  .topbar nav a:not(.btn) { display: none; }
}

@media (max-width: 860px) {
  /* All three selectors spelled out: .split.reverse.copy-lead outranks a bare
     .split.reverse, so a shorter list here would leave that one section in two
     columns on a phone. */
  .split, .split.reverse, .split.reverse.copy-lead { grid-template-columns: 1fr; }
  .split.reverse .split-copy { order: 0; }
  .split-copy p { max-width: none; }
  .topbar { gap: 14px; }
  .brand img { width: 148px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
