:root {
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #5f6368;
  --line: #e4e3ec;
  --card: #f7f6fb;
  --accent: #5b4bd1;
  --accent-ink: #4a3ab8;
  --accent-soft: rgba(91, 75, 209, 0.10);
  --glow: rgba(120, 104, 240, 0.24);
  --moon: #b07d00;
  --code-bg: #f1f0f6;
  --header-bg: rgba(255, 255, 255, 0.8);
  --shadow: 0 1px 2px rgba(20, 15, 50, 0.06), 0 24px 48px -28px rgba(50, 35, 150, 0.35);
  --term-bg: #121126;
  --term-fg: #e6e4f2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --fg: #ececef;
    --muted: #a0a3a9;
    --line: #2a2b2e;
    --card: #19191b;
    --accent: #a99cff;
    --accent-ink: #a99cff;
    --accent-soft: rgba(169, 156, 255, 0.12);
    --glow: rgba(169, 156, 255, 0.16);
    --moon: #ffd76a;
    --code-bg: #1f2024;
    --header-bg: rgba(17, 18, 20, 0.78);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 28px 56px -30px rgba(0, 0, 0, 0.9);
    --term-bg: #0b0b0c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow-x: clip;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em; }
code { background: var(--code-bg); padding: 0.12em 0.38em; border-radius: 5px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
section.wrap { padding: 88px 16px 0; }

/* Header: sticks to the top over a blurred bar. */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
nav a { color: var(--muted); }
nav a:hover { color: var(--fg); text-decoration: none; }
nav .nav-cta {
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
}
nav .nav-cta:hover { border-color: var(--muted); }

/* Type */
h1 {
  font-size: clamp(36px, 6.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 750;
  margin: 0 0 24px;
  text-wrap: balance;
}
h1 span { color: var(--muted); }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 14px; text-wrap: balance; }
h3 { font-size: 17px; letter-spacing: -0.01em; margin: 0 0 6px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lede { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--muted); max-width: 660px; margin: 0 auto; }
.sub { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 0 36px; }
.meta { font-size: 14px; color: var(--muted); margin: 0; }

/* Hero */
.hero { position: relative; text-align: center; padding: 88px 0 0; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 900px;
  background: radial-gradient(ellipse 60% 50% at 50% 62%, var(--glow), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 36px 0 20px; }
.button {
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  font-weight: 600;
  transition: border-color 0.15s, transform 0.15s, filter 0.15s;
}
.button:hover { text-decoration: none; border-color: var(--muted); transform: translateY(-1px); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 22px -10px var(--accent); }
.button.primary:hover { filter: brightness(1.07); border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .button.primary { color: #120f2b; } }

figure { margin: 0; }
img { max-width: 100%; height: auto; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 14px; text-align: center; }

/* The hero's notification: what a relayed code looks like when it lands. */
.hero-shot { margin: 56px auto 0; max-width: 520px; }
.notif {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 14px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.notif img { grid-row: span 3; border-radius: 9px; }
.notif-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.notif-title { font-weight: 650; font-size: 17px; letter-spacing: -0.01em; }
.notif-title .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent-ink); letter-spacing: 0.04em; }
.notif-body { margin: 0; font-size: 15px; color: var(--muted); }
.notif-body mark { background: none; color: var(--fg); font-weight: 600; text-decoration: underline wavy var(--moon); text-underline-offset: 4px; }

/* Three-point summary under the hero */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.pillars > div { border-top: 2px solid var(--accent); padding-top: 18px; }
.pillars h2 { font-size: 19px; letter-spacing: -0.01em; margin: 0 0 6px; }
.pillars p { margin: 0; color: var(--muted); font-size: 16px; }

/* The confession: why this exists at all */
.confession {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.confession blockquote {
  margin: 0;
  padding: 28px 30px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 90% at 0% 0%, var(--glow), transparent 70%),
    var(--card);
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.confession blockquote p { margin: 0 0 14px; }
.confession blockquote footer { font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.confession .points { margin-top: 0; }
.aside {
  margin: 40px 0 0;
  max-width: 760px;
  padding-left: 18px;
  border-left: 2px dashed var(--line);
  color: var(--muted);
  font-size: 15.5px;
  font-style: italic;
}

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid article { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
.grid p, .timeline p { margin: 0; color: var(--muted); font-size: 15.5px; }
.grid article.nope { background: none; border-style: dashed; }
.grid article.nope h3 { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); }

/* The path a code takes, left to right when there's room */
.flow {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.flow li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; }
.flow li.arrow { background: none; border: 0; padding: 0; color: var(--muted); }
.flow li.end { border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* Numbered steps, side by side when there's room */
.timeline {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.timeline li { counter-increment: step; position: relative; padding-top: 52px; }
.timeline li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 15px;
}
.timeline li::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 48px;
  right: 0;
  border-top: 1px dashed var(--line);
}
.timeline li:last-child::after { display: none; }

.points { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 14px; max-width: 760px; }
.points li { position: relative; padding-left: 22px; color: var(--muted); }
.points li strong { color: var(--fg); }
.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Terminal: dark in both themes, with a title bar */
pre.terminal {
  position: relative;
  background: var(--term-bg);
  color: var(--term-fg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 44px 20px 18px;
  overflow-x: auto;
  margin: 40px 0 0;
  line-height: 1.6;
  box-shadow: var(--shadow);
}
pre.terminal::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
}
pre code { background: none; padding: 0; font-size: 1em; }
.prompt { color: #a99cff; user-select: none; }
.dim { color: #8d8aa6; }

/* Closing notes */
.note > * { max-width: 720px; }
.note h2 { font-size: 22px; }
.note p { color: var(--muted); margin: 0 0 12px; }

section.wrap.closing {
  text-align: center;
  margin-top: 88px;
  padding: 64px 24px;
  border-radius: 24px;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, var(--glow), transparent 70%),
    var(--card);
  border: 1px solid var(--line);
  max-width: 1008px;
}
.closing img { display: block; margin: 0 auto 20px; }
.closing p { color: var(--muted); margin: 0; }
.closing .actions { margin-bottom: 0; }

footer.wrap { padding: 40px 16px 56px; font-size: 14px; color: var(--muted); text-align: center; }
footer p { margin: 0; }

@media (max-width: 720px) {
  .section-link { display: none; }
  section.wrap { padding-top: 64px; }
  .hero { padding-top: 56px; }
  .confession { grid-template-columns: 1fr; gap: 28px; }
  section.wrap.closing { margin: 64px 16px 0; padding: 48px 20px; }
}
