/* AgentFX: brand tokens from the logo draft (Ink, Volt, Plasma, Ion, Paper). */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --ink: #0b0b12;
  --ink-2: #15151f;
  --ink-3: #1e1e2b;
  --line: #2c2c3d;
  --paper: #f5f5f0;
  --muted: #b4b4c4;
  --volt: #c8ff2e;
  --plasma: #ff3da5;
  --ion: #3dd8ff;
  --font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 1.25rem;
  --radius-s: 0.75rem;
  --wrap: 75rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--volt); text-underline-offset: 0.2em; }
a:hover { color: var(--paper); }
:focus-visible { outline: 3px solid var(--ion); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 1rem; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 6.5vw, 5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
code, pre { font-family: var(--font-mono); }
code { font-size: 0.92em; color: var(--ion); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 50; padding: 0.75rem 1rem; background: var(--volt); color: var(--ink); font-weight: 700; border-radius: var(--radius-s); }
.skip-link:focus { top: 1rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(11 11 18 / 0.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--paper); text-decoration: none; font-size: 1.5rem; font-weight: 500; letter-spacing: -0.04em; }
.brand__fx { color: var(--volt); font-weight: 700; }
.brand svg { width: 2rem; height: 2rem; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav__list { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav__link { color: var(--paper); text-decoration: none; font-size: 0.98rem; }
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--volt); }
.nav__toggle { display: none; min-width: 2.75rem; min-height: 2.75rem; background: none; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--paper); font: inherit; cursor: pointer; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.9rem; padding: 0.7rem 1.35rem; border-radius: 999px; background: var(--volt); color: var(--ink); font-weight: 700; text-decoration: none; border: 2px solid var(--volt); }
.button:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.button--ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.button--ghost:hover { background: transparent; border-color: var(--paper); color: var(--paper); }
.button--small { min-height: 2.6rem; padding: 0.45rem 1.1rem; font-size: 0.95rem; }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 var(--section); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow { display: inline-block; margin-bottom: 1.25rem; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ion); }
.hero__title em { font-style: normal; color: var(--volt); }
.hero__lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 36rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero__media { position: relative; }
.hero__media .clip { box-shadow: 0 0 0 1px var(--line), 0 40px 120px -40px rgb(255 61 165 / 0.45); }
.agents { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-top: 2.5rem; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.agents__item { padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; }

/* Clip */
.clip { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); aspect-ratio: 16 / 9; }
.clip--portrait { aspect-ratio: 9 / 16; }
.clip video { width: 100%; height: 100%; object-fit: cover; }
.clip__play { position: absolute; right: 0.75rem; bottom: 0.75rem; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.9rem; border: 0; border-radius: 999px; background: rgb(11 11 18 / 0.8); color: var(--paper); font: 600 0.85rem var(--font-sans); cursor: pointer; }
.clip__play:hover { background: var(--volt); color: var(--ink); }

/* Sections */
.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head p { color: var(--muted); font-size: 1.15rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps__item { padding: 1.75rem; background: var(--ink-2); border-radius: var(--radius); counter-increment: step; }
.steps__item::before { content: "0" counter(step); display: block; margin-bottom: 1rem; font-family: var(--font-mono); color: var(--plasma); font-weight: 700; }
.steps__item p { color: var(--muted); margin: 0; }

/* Code */
.code { position: relative; margin: 0; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.code__bar { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.code pre { margin: 0; padding: 1.25rem; overflow-x: auto; font-size: 0.88rem; line-height: 1.65; color: var(--paper); }
.code__copy { min-height: 2.75rem; min-width: 2.75rem; padding: 0 0.8rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: none; color: var(--paper); font: 500 0.8rem var(--font-mono); cursor: pointer; }
.code__copy:hover { border-color: var(--volt); color: var(--volt); }
.code .c { color: #8a8aa3; }
.code .k { color: var(--plasma); }
.code .i { color: var(--ion); }
.code .s { color: var(--volt); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }

/* Effect grid */
.fx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.fx-card { display: flex; flex-direction: column; gap: 0.9rem; }
.fx-card h3 { margin: 0; }
.fx-card h3 a { color: var(--paper); text-decoration: none; }
.fx-card h3 a:hover { color: var(--volt); }
.fx-card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.tag { display: inline-block; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ion); }

/* Feature list */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.features__item { padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); }
.features__item h3 { color: var(--volt); }
.features__item p { color: var(--muted); margin: 0; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 40rem; font-size: 0.98rem; }
caption { text-align: left; padding: 1rem 1.25rem; color: var(--muted); caption-side: bottom; font-size: 0.9rem; }
th, td { padding: 0.9rem 1.25rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--ink-2); font-size: 0.85rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tbody th { font-weight: 600; }
td.yes { color: var(--volt); }

/* Prose */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 3rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose p, .prose li { color: #dcdce4; }
.lead { font-size: 1.25rem; color: var(--muted); }
.note { padding: 1.25rem 1.5rem; border-left: 0; background: var(--ink-2); border-radius: var(--radius-s); color: var(--muted); }

/* Page head */
.page-head { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-head h1 { font-size: clamp(2.3rem, 5.5vw, 4.25rem); max-width: 20ch; }
.page-head .lead { max-width: 44rem; }
.crumbs { margin-bottom: 1.5rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line); }
.crumbs a { color: var(--muted); }

/* FAQ */
.faq { max-width: 50rem; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; cursor: pointer; font-size: 1.15rem; font-weight: 600; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--volt); font-family: var(--font-mono); }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { color: var(--muted); padding-bottom: 1.25rem; margin: 0; }

/* CTA */
.cta { padding: clamp(2.5rem, 6vw, 4.5rem); border-radius: calc(var(--radius) * 1.5); background: var(--ink-2); border: 1px solid var(--line); background-image: radial-gradient(ellipse at 100% 0%, rgb(255 61 165 / 0.18), transparent 55%), radial-gradient(ellipse at 0% 100%, rgb(61 216 255 / 0.14), transparent 55%); }
.cta h2 { max-width: 22ch; }
.cta p { color: var(--muted); max-width: 40rem; font-size: 1.15rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Footer */
.site-footer { margin-top: var(--section); padding: 3.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 2rem; }
.site-footer h2 { font-size: 0.85rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--paper); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--volt); }
.site-footer__legal { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.85rem; }

@media (max-width: 992px) {
  .hero__grid, .split { grid-template-columns: 1fr; }
  .fx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; padding: 0 0.9rem; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1.25rem var(--gutter) 1.5rem; background: var(--ink); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: 0.25rem; }
  .nav__link { display: block; padding: 0.7rem 0; font-size: 1.1rem; }
  .steps, .features { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .fx-grid, .site-footer__grid { grid-template-columns: 1fr; }
  .hero__actions .button, .cta__actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.fx-grid + p, .features + p { margin: 2.25rem 0 0; }
.showreel__player { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); aspect-ratio: 16 / 9; box-shadow: 0 0 0 1px var(--line), 0 40px 120px -50px rgb(200 255 46 / 0.35); }
.showreel__player video { width: 100%; height: 100%; display: block; }
.clip--contain video { object-fit: contain; }
.showreel__credit { margin: 1rem 0 0; font-size: 0.85rem; color: var(--muted); }

/* GitHub bar above the header */
.ghbar { background: var(--volt); color: var(--ink); font-size: 0.92rem; }
.ghbar__inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1rem; min-height: 2.75rem; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.ghbar__text { margin: 0; font-weight: 500; }
.ghbar__link { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.25rem; padding: 0.2rem 0.85rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.ghbar__link:hover { background: var(--ink-3); color: var(--volt); }
.ghbar__link svg { flex: none; }
.ghbar__stars { padding-left: 0.55rem; border-left: 1px solid var(--line); font-family: var(--font-mono); font-weight: 500; }
.ghbar__link:focus-visible { outline-color: var(--ink); }
@media (max-width: 480px) { .ghbar__text { display: none; } }
