/* agoralb — single stylesheet, no framework */

:root {
  --bg: #07090d;
  --bg-2: #0b0e14;
  --surface: #0f131b;
  --surface-2: #141924;
  --line: #1d2330;
  --line-2: #2a3242;
  --text: #e8ecf3;
  --muted: #9aa4b5;
  --dim: #6b7487;
  --accent: #5eead4;
  --accent-2: #a78bfa;
  --warm: #fbbf24;
  --danger: #fb7185;
  --ok: #4ade80;

  --radius: 14px;
  --radius-lg: 20px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.025em; font-weight: 650; }
code { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(94, 234, 212, .3); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; background: var(--accent); color: #04110e; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 11px;
  font: 600 15px/1 var(--font); letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 9px; }
.btn--block { width: 100%; }
.btn--primary {
  background: linear-gradient(180deg, #7ff3de, var(--accent));
  color: #04110e;
  box-shadow: 0 0 0 1px rgba(94, 234, 212, .4), 0 8px 24px -8px rgba(94, 234, 212, .55);
}
.btn--primary:hover { box-shadow: 0 0 0 1px rgba(94, 234, 212, .6), 0 10px 32px -6px rgba(94, 234, 212, .7); transform: translateY(-1px); }
.btn--ghost { background: rgba(255, 255, 255, .03); border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, .07); border-color: #3a4558; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 13, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -.03em; }
.brand b { color: var(--accent); font-weight: 700; }
.brand__mark { width: 28px; height: 28px; color: var(--accent); }
.brand--sm { font-size: 17px; }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 14.5px; color: var(--muted); }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; }

@media (max-width: 860px) {
  .nav__toggle {
    display: grid; place-items: center; width: 42px; height: 42px;
    background: transparent; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer;
  }
  .nav__toggle span[aria-hidden], .nav__toggle span[aria-hidden]::before, .nav__toggle span[aria-hidden]::after {
    display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s;
    content: ""; position: relative;
  }
  .nav__toggle span[aria-hidden]::before { position: absolute; top: -6px; }
  .nav__toggle span[aria-hidden]::after { position: absolute; top: 6px; }
  .nav__toggle[aria-expanded="true"] span[aria-hidden] { background: transparent; }
  .nav__toggle[aria-expanded="true"] span[aria-hidden]::before { transform: translateY(6px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span[aria-hidden]::after { transform: translateY(-6px) rotate(-45deg); }

  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px var(--gutter) 20px;
    background: rgba(7, 9, 13, .97); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: 12px; height: 46px; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero__glow {
  position: absolute; top: -260px; left: 50%; width: 1100px; height: 700px; transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(94, 234, 212, .16), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgba(167, 139, 250, .14), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2);
  font-size: 13px; color: var(--muted); margin-bottom: 26px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(94,234,212,.15); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(94,234,212,0); } }
h1 { font-size: clamp(38px, 6vw, 68px); letter-spacing: -.04em; font-weight: 700; }
.grad {
  background: linear-gradient(92deg, var(--accent) 0%, #93c5fd 45%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin-top: 24px; font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 580px; line-height: 1.65; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 34px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--dim); }
.hero__meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: rgba(94,234,212,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%235eead4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat; }

/* hero visual */
.stack { position: relative; display: grid; gap: 14px; }
.card {
  border-radius: var(--radius); border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
  overflow: hidden;
}
.card pre { margin: 0; padding: 16px 18px; font: 12.5px/1.7 var(--mono); color: #c9d2e0; overflow-x: auto; }
.card--legacy { margin-right: 14%; opacity: .92; }
.card--legacy pre { color: #d9c9a3; }
.card--modern { margin-left: 10%; border-color: rgba(94,234,212,.35); box-shadow: 0 30px 70px -30px rgba(94,234,212,.28), 0 0 0 1px rgba(94,234,212,.08); }
.card__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--dim); }
.card__bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a3242; }
.card__bar span { margin-left: 8px; }
.card__foot { padding: 10px 16px; border-top: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.ok { color: var(--ok); margin-right: 6px; }
.rule {
  justify-self: center; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; color: var(--text);
  background: rgba(251,191,36,.07); border: 1px dashed rgba(251,191,36,.45);
}
.rule__tag { flex: none; font: 600 11px/1 var(--mono); padding: 4px 7px; border-radius: 6px; background: rgba(251,191,36,.16); color: var(--warm); }

/* syntax colors */
.k { color: #c4b5fd; } .f { color: #7dd3fc; } .t { color: #5eead4; } .s { color: #fcd34d; } .n { color: #fda4af; } .c { color: #6b7487; font-style: italic; }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section--alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section__head--left { margin-left: 0; text-align: left; }
.eyebrow { font: 500 12.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
h2 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -.035em; }
.sub { margin-top: 18px; color: var(--muted); font-size: 17px; }
.sub strong { color: var(--text); font-weight: 600; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tile {
  padding: 28px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
  border: 1px solid var(--line);
  transition: border-color .3s, transform .3s var(--ease);
}
.tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tile h3 { font-size: 19px; margin-bottom: 10px; }
.tile p { color: var(--muted); font-size: 15.5px; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; position: relative; }
.step { position: relative; padding: 26px 24px 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.step::after {
  content: ""; position: absolute; top: 44px; right: -19px; width: 20px; height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}
.step:last-child::after { display: none; }
.step__n { display: inline-block; font: 500 12px/1 var(--mono); color: var(--accent); padding: 6px 9px; border: 1px solid rgba(94,234,212,.3); border-radius: 8px; background: rgba(94,234,212,.06); margin-bottom: 18px; }
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- demo ---------- */
.demo {
  border-radius: var(--radius-lg); border: 1px solid var(--line-2); overflow: hidden;
  background: var(--surface);
  box-shadow: 0 40px 100px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02) inset;
}
.demo__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.demo__tabs { display: flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 11px; overflow-x: auto; max-width: 100%; }
.demo__tabs button {
  flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--muted); font: 500 13px var(--font); white-space: nowrap;
  transition: background .2s, color .2s;
}
.demo__tabs button:hover { color: var(--text); }
.demo__tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
.demo__actions { display: flex; gap: 8px; }
.demo__progress { height: 2px; background: var(--line); }
.demo__progress span { display: block; height: 100%; width: 25%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s var(--ease); }
.demo__body { min-height: 440px; }
.demo__body [role="tabpanel"] { animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.code { margin: 0; padding: 24px 26px; font: 13px/1.75 var(--mono); color: #c9d2e0; overflow-x: auto; tab-size: 4; }
.rules { list-style: none; margin: 0; padding: 22px; display: grid; gap: 12px; }
.rules li { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.rules strong { color: var(--text); }
.rules em { color: var(--dim); font-style: normal; font-size: 13.5px; }
.rules code { color: var(--warm); }
.flag { display: block; margin-top: 10px; padding: 8px 12px; border-radius: 8px; font-size: 13.5px; color: #fde68a; background: rgba(251,191,36,.07); border-left: 2px solid var(--warm); }
.demo__foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg-2); font: 12.5px var(--mono); color: var(--dim); }

/* ---------- why ---------- */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.split .section__head { margin-bottom: 32px; }
.why { margin: 0; display: grid; gap: 14px; }
.why > div { padding: 24px 26px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.why dt { font-weight: 650; font-size: 18px; margin-bottom: 6px; letter-spacing: -.02em; }
.why dd { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- partner + form ---------- */
.offer { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.offer h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 14px; letter-spacing: 0; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 15px; color: var(--muted); }
.checks li { position: relative; padding-left: 26px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: rgba(94,234,212,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%235eead4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px no-repeat; }
.checks--muted li::before { background-color: rgba(167,139,250,.14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='2.5' fill='%23a78bfa'/%3E%3C/svg%3E"); }

.form {
  padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 80px -40px rgba(94,234,212,.25);
  display: grid; gap: 16px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 500; color: #c8d0dc; }
.opt { color: var(--dim); font-weight: 400; }
input, select, textarea {
  width: 100%; font: 15px/1.4 var(--font); color: var(--text);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 11px 13px; transition: border-color .2s, box-shadow .2s;
}
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%239aa4b5' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
textarea { resize: vertical; min-height: 88px; }
input::placeholder, textarea::placeholder { color: #4d5568; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94,234,212,.15); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--danger); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.consent input { width: 17px; height: 17px; margin: 2px 0 0; flex: none; accent-color: var(--accent); padding: 0; }
.consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.consent.is-invalid span { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { min-height: 1.4em; font-size: 14px; color: var(--muted); }
.form__status.is-ok { color: var(--ok); }
.form__status.is-err { color: var(--danger); }
.form.is-done { place-content: center; text-align: center; min-height: 420px; }
.done h3 { font-size: 24px; margin: 14px 0 8px; }
.done p { color: var(--muted); }
.done__icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(74,222,128,.12); color: var(--ok); font-size: 26px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font-weight: 600; font-size: 16.5px; position: relative; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); font-size: 15.5px; }

/* ---------- CTA + footer ---------- */
.cta { padding: clamp(72px, 10vw, 120px) 0; text-align: center; position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.cta::before { content: ""; position: absolute; left: 50%; bottom: -320px; width: 900px; height: 600px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(94,234,212,.14), transparent); pointer-events: none; }
.cta__inner { position: relative; }
.cta p { color: var(--muted); font-size: 18px; margin-top: 14px; }
.cta .hero__cta { justify-content: center; }

.footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 13.5px; color: var(--dim); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer nav { display: flex; gap: 22px; }
.footer nav a:hover { color: var(--text); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- simple page (privacy / 404) ---------- */
.page { padding: clamp(56px, 8vw, 96px) 0; }
.page h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 12px; }
.page h2 { font-size: 22px; margin: 36px 0 10px; letter-spacing: -.02em; }
.page p, .page li { color: var(--muted); }
.page p + p { margin-top: 12px; }
.page a:not(.btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.page ul { padding-left: 20px; }
.page--center { text-align: center; }
.page--center > p:not(.eyebrow) { margin: 12px 0 28px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero__grid, .split { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
}
@media (max-width: 720px) {
  .grid3, .grid2, .offer, .form__row { grid-template-columns: 1fr; }
  .card--legacy, .card--modern { margin: 0; }
  .demo__bar { flex-direction: column; align-items: stretch; }
  .demo__actions { justify-content: flex-end; }
  .demo__body { min-height: 0; }
  .code { font-size: 12px; padding: 18px; }
  .rules { padding: 14px; }
  .rules li { flex-direction: column; gap: 10px; padding: 16px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
