/* goakt.dev
   Plain CSS, no build step. Mobile first: the base rules lay out a single
   column, and min-width media queries add columns as the viewport grows.
   Dark is the default, matching docs.goakt.dev. The header button sets
   data-theme="light" on <html> and localStorage remembers the choice. */

:root {
  --bg: #0A0F1C;
  --surface: #0F1626;
  --surface-2: #141D30;
  --border: #1F2B42;
  --border-strong: #2C3A55;
  --text: #E6EBF4;
  --muted: #9AA7BD;
  --accent: #3B82F6;
  --accent-hover: #60A5FA;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --grid: rgba(96, 165, 250, 0.22);
  --edge: #2C3A55;
  --glow: rgba(59, 130, 246, 0.16);
  --code-bg: #011627;
  --code-border: #13304B;
  --code-text: #D6DEEB;
  --code-kw: #C792EA;
  --code-str: #ECC48D;
  --code-fn: #82AAFF;
  --code-ty: #FFCB8B;
  --code-cm: #7A8B99;
  --code-op: #7FDBCA;
  --code-num: #F78C6C;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
  --wrap: 1120px;
  --gutter: 1.25rem;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F6F8FC;
  --surface: #FFFFFF;
  --surface-2: #EEF2F9;
  --border: #D9E0EC;
  --border-strong: #C3CCDC;
  --text: #0F172A;
  --muted: #55627A;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --grid: rgba(37, 99, 235, 0.18);
  --edge: #C3CCDC;
  --glow: rgba(37, 99, 235, 0.10);
  --code-border: #0B2942;
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; }

code, pre, kbd { font-family: var(--font-mono); }

svg { max-width: 100%; }

section[id] { scroll-margin-top: 72px; }

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- header ----------
   Phones: brand, theme button, and a menu button. The menu opens a full-width
   panel under the header. Without JavaScript the links render as a plain row.
   From 760px the links sit inline in one sticky row. */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.top-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-height: 56px;
  padding-block: 0.5rem;
}
.brand { display: inline-flex; align-items: center; color: var(--text); }
.brand svg { height: 26px; width: auto; display: block; }
.brand .go { fill: currentColor; }
.brand .akt { fill: var(--accent); }

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.theme-btn, .menu-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.theme-btn:hover, .menu-btn:hover { color: var(--text); border-color: var(--border-strong); }
.theme-btn svg, .menu-btn svg { width: 16px; height: 16px; }
.menu-btn .icon-close { display: none; }
.top.open .menu-btn .icon-open { display: none; }
.top.open .menu-btn .icon-close { display: block; }
html:not(.js) .menu-btn { display: none; }

/* No JavaScript: links wrap into a row under the brand. */
.sections {
  order: 3;
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}
.sections a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}
.sections a:hover { color: var(--text); }

/* JavaScript: links collapse into a panel the menu button opens. */
:where(html.js) .sections {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  order: 0;
  flex-basis: auto;
  flex-direction: column;
  gap: 0;
  padding: 0.25rem var(--gutter) 0.75rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.45);
}
:where(html.js .top:not(.open)) .sections { display: none; }
:where(html.js) .sections a { border-top: 1px solid var(--border); font-size: 1rem; }
:where(html.js) .sections a:first-child { border-top: 0; }
:where(html.js) .sections a.ext::after { content: "\2197"; margin-left: 0.4rem; font-size: 0.8em; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding-block: 3rem 2.5rem;
}
.hero-copy { display: grid; gap: 1.25rem; }
.hero h1 {
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 16ch;
}
.lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 52ch;
}

.install {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 100%;
}
.install code {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.install code::before { content: "$ "; color: var(--muted); }
.copy {
  appearance: none;
  flex: 0 0 auto;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0 0.9rem;
  min-width: 44px;
  cursor: pointer;
}
.copy:hover { color: var(--text); }

.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--surface);
}
.btn:hover { border-color: var(--muted); color: var(--text); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn svg { width: 16px; height: 16px; }

.prod { font-size: 0.9rem; color: var(--muted); }
.prod a { color: var(--text); border-bottom: 1px solid var(--border-strong); }
.prod a:hover { border-color: var(--accent); }

.hero-art {
  display: grid;
  gap: 0.6rem;
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    radial-gradient(60% 50% at 50% 30%, var(--glow), transparent 70%),
    var(--surface);
  padding: 1rem 1rem 0.9rem;
}
.cluster { width: 100%; height: auto; display: block; }
.cluster .node-ring { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.cluster .node-core { fill: var(--accent); }
.cluster .nlabel {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--muted);
  text-anchor: middle;
}
.cluster .mail-body { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }
.cluster .mail-flap { fill: none; stroke: var(--surface); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Two messages per edge, one each way, at different speeds so they do not
   mirror each other. Negative delays start every message mid-flight. */
.msg.m1 { animation: m1 2.6s linear -1.0s infinite; }
.msg.m2 { animation: m2 3.1s linear -1.9s infinite; }
.msg.m3 { animation: m3 2.2s linear -0.7s infinite; }
.msg.m4 { animation: m4 2.9s linear -2.2s infinite; }
.msg.m5 { animation: m5 2.4s linear -0.4s infinite; }
.msg.m6 { animation: m6 3.3s linear -2.6s infinite; }
@keyframes m1 { from { transform: translate(220px, 70px); } to { transform: translate(90px, 300px); } }
@keyframes m2 { from { transform: translate(350px, 300px); } to { transform: translate(220px, 70px); } }
@keyframes m3 { from { transform: translate(90px, 300px); } to { transform: translate(350px, 300px); } }
@keyframes m4 { from { transform: translate(90px, 300px); } to { transform: translate(220px, 70px); } }
@keyframes m5 { from { transform: translate(220px, 70px); } to { transform: translate(350px, 300px); } }
@keyframes m6 { from { transform: translate(350px, 300px); } to { transform: translate(90px, 300px); } }
.art-caption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  /* Same specificity as the .msg.mN rules above, later in the file, so it wins. */
  .cluster .msg { animation: none; }
  .msg.m1 { transform: translate(177px, 147px); }
  .msg.m4 { transform: translate(133px, 223px); }
  .msg.m5 { transform: translate(263px, 147px); }
  .msg.m2 { transform: translate(307px, 223px); }
  .msg.m3 { transform: translate(177px, 300px); }
  .msg.m6 { transform: translate(263px, 300px); }
  html { scroll-behavior: auto; }
}

/* ---------- sections ---------- */
.section { padding-block: 3rem; border-top: 1px solid var(--border); }
.section-head { display: grid; gap: 0.75rem; max-width: 60ch; margin-bottom: 1.75rem; }
.section-head h2 { font-size: clamp(1.45rem, 5vw, 2rem); line-height: 1.2; }
.section-head p { color: var(--muted); }

/* code */
.code-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.annot { display: grid; gap: 1.25rem; }
.annot h3 { font-size: 1rem; font-weight: 600; }
.annot p { color: var(--muted); font-size: 0.95rem; }
.annot code {
  font-size: 0.85em;
  background: var(--accent-soft);
  color: var(--text);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.code {
  margin: 0;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  color: var(--code-text);
  overflow: hidden;
}
.code figcaption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #8FA3B8;
  border-bottom: 1px solid var(--code-border);
}
.code figcaption .dot { width: 8px; height: 8px; border-radius: 50%; background: #3B82F6; display: inline-block; }
.code pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.6;
  tab-size: 4;
}
.k { color: var(--code-kw); }
.s { color: var(--code-str); }
.c { color: var(--code-cm); font-style: italic; }
.f { color: var(--code-fn); }
.t { color: var(--code-ty); }
.o { color: var(--code-op); }
.n { color: var(--code-num); }

/* pillars */
.pillars {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
.pillar { display: grid; gap: 0.6rem; padding-top: 1.1rem; border-top: 2px solid var(--accent); align-content: start; }
.pillar h3 { font-size: 1.05rem; }
.pillar p { color: var(--muted); font-size: 0.95rem; }

/* production */
.prod-more { white-space: nowrap; }
.proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.quote {
  margin: 0;
  padding: 1.3rem 1.25rem 1.2rem 1.4rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.quote blockquote { margin: 0; }
.quote blockquote p { font-size: 1.02rem; line-height: 1.65; }
.quote strong { font-weight: 600; }
.quote figcaption { margin-top: 1rem; font-size: 0.88rem; color: var(--muted); }
.quote figcaption a { color: var(--text); border-bottom: 1px solid var(--border-strong); }
.adopters { display: grid; gap: 1rem; align-content: start; }
.adopter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.adopter-list li {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}
.adopter-list li:last-child { border-bottom: 1px solid var(--border); }
.adopter-list a { font-weight: 600; color: var(--text); }
.adopter-list a:hover { color: var(--accent); }
.adopter-list span { font-size: 0.9rem; color: var(--muted); }
.adopt-cta { font-size: 0.9rem; color: var(--muted); }

/* box */
.box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cell {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem;
  background: var(--surface);
  color: var(--text);
  align-content: start;
}
.cell:hover { background: var(--surface-2); color: var(--text); }
.cell .name { font-weight: 600; font-size: 0.98rem; display: flex; align-items: center; gap: 0.5rem; }
.cell .name::after { content: "\2197"; color: var(--muted); font-size: 0.8em; opacity: 0; transition: opacity 120ms; }
.cell:hover .name::after { opacity: 1; }
.cell .desc { color: var(--muted); font-size: 0.9rem; }
.providers { margin-top: 1.25rem; font-size: 0.9rem; color: var(--muted); }
.providers a { color: var(--text); border-bottom: 1px solid var(--border-strong); }

/* benchmarks */
.tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
.tile {
  display: grid;
  gap: 0.5rem;
  padding: 1.4rem 1.3rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tile .value {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.tile .value small { font-size: 0.42em; font-weight: 400; color: var(--muted); margin-left: 0.25em; letter-spacing: 0; }
.tile .label { font-weight: 500; }
.tile .scenario { color: var(--muted); font-size: 0.9rem; }
.bench-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.run {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
}
.run div { display: grid; gap: 0.15rem; align-content: start; }
.run dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.run dd { margin: 0; font-family: var(--font-mono); font-size: 0.88rem; color: var(--text); white-space: nowrap; }
.run dd a { color: var(--text); border-bottom: 1px solid var(--border-strong); }
.run dd a:hover { color: var(--accent); border-color: var(--accent); }
.bench-note {
  font-size: 0.85rem;
  color: var(--muted);
}

/* use cases */
.cases {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
}
.case {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.case h3 { font-size: 1.05rem; }
.case > p { color: var(--muted); font-size: 0.95rem; }
.case ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.case li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.case li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.case strong { color: var(--text); font-weight: 600; }
.case a, .cases-note a { color: var(--text); border-bottom: 1px solid var(--border-strong); }
.case a:hover, .cases-note a:hover { color: var(--accent); border-color: var(--accent); }
.cases-note { margin-top: 1.75rem; font-size: 0.9rem; color: var(--muted); }

/* close */
.close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}
.close-grid h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.15; }
.close-grid .section-head { margin-bottom: 0; }
.terminal {
  margin: 0;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  color: var(--code-text);
  padding: 1rem 1.1rem;
  font-size: 0.88rem;
  line-height: 1.9;
  overflow-x: auto;
}
.terminal .p { color: #8FA3B8; }
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.links a { padding-block: 0.3rem; }

/* footer */
.foot {
  border-top: 1px solid var(--border);
  padding-block: 2rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.foot .brand svg { height: 20px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; }
.foot nav a { color: var(--muted); padding-block: 0.3rem; }
.foot nav a:hover { color: var(--text); }

/* ---------- wider viewports ---------- */
@media (min-width: 560px) {
  :root { --gutter: 1.5rem; }

  .hero { padding-block: 4rem 3.5rem; }
  .install { display: inline-flex; justify-self: start; }
  .install code { white-space: nowrap; overflow-x: auto; font-size: 0.92rem; padding: 0.7rem 1rem; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
  .box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { gap: 1.25rem; }
}

@media (min-width: 760px) {
  .top-inner { flex-wrap: nowrap; gap: 1.5rem; min-height: 60px; padding-block: 0; }
  .sections,
  :where(html.js) .sections,
  :where(html.js .top:not(.open)) .sections {
    display: flex;
    position: static;
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    margin-left: 0.5rem;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .sections a, :where(html.js) .sections a { min-height: 0; font-size: 0.9rem; border: 0; }
  .sections a:not(.ext) + a.ext { margin-left: auto; }
  :where(html.js) .sections a.ext::after { content: none; }
  .top-actions { margin-left: 0; }
  .menu-btn { display: none; }
  .theme-btn { width: 34px; height: 34px; }

  .section { padding-block: 4.5rem; }
  .section-head { margin-bottom: 2.5rem; }
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 2.5rem; }
  .foot nav { margin-left: auto; }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 3rem;
    align-items: center;
    padding-block: 5.5rem 4.5rem;
  }
  .hero-copy { gap: 1.5rem; }
  .hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
  .lede { font-size: 1.125rem; }
  .hero-art { max-width: none; }

  .code-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 3rem; }
  .proof { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; }
  .quote { padding: 1.6rem 1.6rem 1.4rem 1.8rem; }
  .quote blockquote p { font-size: 1.1rem; }
  .annot { position: sticky; top: 84px; gap: 1.5rem; }
  .code pre { padding: 1.1rem 1.25rem 1.25rem; font-size: 0.82rem; }

  .pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .box { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cell { padding: 1.2rem 1.3rem; }
  .cases { gap: 2.5rem 4rem; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bench-meta { grid-template-columns: max-content minmax(0, 1fr); gap: 3rem; align-items: start; }
  .tile { padding: 1.5rem 1.5rem 1.25rem; }
  .close-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: center; }
  .terminal { padding: 1.1rem 1.25rem; font-size: 0.9rem; }
}
