/* ═══════════════════════════════════════════════════════════════════
   arions.dev — developer hub
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #09090b;
  --bg-1: #0d0d12;
  --bg-2: #121219;
  --surface: #15151c;
  --surface-hi: #1b1b24;
  --border: #25252f;
  --border-hi: #32323e;
  --fg: #ededf0;
  --fg-2: #b8b8c2;
  --fg-3: #85858f;
  --fg-4: #55555f;
  --accent: oklch(75% 0.18 295);
  --accent-2: oklch(68% 0.22 295);
  --ok: oklch(78% 0.15 155);
  --warn: oklch(80% 0.17 75);
  --err: oklch(72% 0.21 27);
  --f-sans: "Inter var", Inter, system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --page: 70rem;
  --gutter: clamp(1rem, 3vw, 2rem);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--f-sans); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--f-mono); font-size: 0.92em; }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in oklch, var(--accent) 45%, transparent); color: #fff; }

/* ambient */
.ambient {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.ambient__mesh {
  position: absolute; inset: -20%;
  background:
    radial-gradient(45% 35% at 15% 10%, color-mix(in oklch, var(--accent) 30%, transparent) 0%, transparent 65%),
    radial-gradient(38% 30% at 85% 90%, color-mix(in oklch, #0ea5e9 22%, transparent) 0%, transparent 70%);
  filter: blur(60px);
  opacity: 0.45;
}
.ambient__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(75% 65% at 50% 25%, #000 25%, transparent 100%);
}

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem max(1rem, calc((100vw - var(--page)) / 2 + 1rem));
  backdrop-filter: blur(14px) saturate(1.3);
  background: color-mix(in oklch, var(--bg) 75%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--border) 80%, transparent);
}
.nav__brand {
  display: inline-flex; align-items: baseline; gap: 0.55rem;
  font-weight: 650; letter-spacing: -0.01em; font-size: 1rem;
}
.nav__brand svg { transform: translateY(2px); }
.nav__tld { color: var(--accent); font-weight: 550; }
.nav__links {
  display: flex; gap: 1.35rem; margin: 0 auto;
  font-size: 0.92rem; color: var(--fg-2);
}
.nav__links a { transition: color 0.18s var(--ease-out); }
.nav__links a:hover { color: var(--fg); }
@media (max-width: 780px) { .nav__links { display: none; } .nav { gap: 0.8rem; } }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1rem; border-radius: var(--r);
  font-weight: 550; font-size: 0.9rem; border: 1px solid transparent;
  transition: all 0.22s var(--ease-out);
}
.btn--primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #0a0a10;
  box-shadow: 0 10px 30px -10px color-mix(in oklch, var(--accent) 50%, transparent);
}
.btn--primary:hover { filter: brightness(1.05); }
.btn--secondary { background: var(--surface); border-color: var(--border-hi); }
.btn--secondary:hover { background: var(--surface-hi); }
.btn--ghost { border-color: var(--border); color: var(--fg-2); }
.btn--ghost:hover { color: var(--fg); border-color: var(--fg-4); }

main > section {
  max-width: var(--page); margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
}
.section__head { max-width: 46rem; margin: 0 auto 2.25rem; text-align: center; }
.eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--f-mono); font-size: 0.72rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); opacity: 0.9;
}
.section__head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 680; letter-spacing: -0.025em; line-height: 1.12;
}
.section__head h2 em, .grad {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), #f0abfc 60%, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section__lead {
  max-width: 40rem; margin: 0 auto; color: var(--fg-2); font-size: 0.98rem;
}

/* HERO */
.hero { text-align: center; padding-top: clamp(4rem, 8vw, 6.5rem) !important; }
.hero h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.05;
}
.hero__sub {
  max-width: 44rem; margin: 0 auto 1.5rem;
  color: var(--fg-2); font-size: 1.05rem;
}
.hero__chips {
  display: flex; gap: 0.5rem; justify-content: center;
  flex-wrap: wrap; margin-top: 1.2rem;
}
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--fg-2); font-size: 0.88rem;
  transition: all 0.2s var(--ease-out);
}
.chip:hover { border-color: var(--accent); color: var(--fg); transform: translateY(-1px); }
.chip__ix { font-family: var(--f-mono); font-size: 0.72rem; color: var(--fg-4); }
.chip:hover .chip__ix { color: var(--accent); }

/* ARCHITECTURE */
.arch-diagram {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.5rem; margin: 0 auto 1.75rem; max-width: 56rem;
}
.arch-col { display: flex; flex-direction: column; gap: 0.6rem; }
.arch-layer {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r);
  padding: 0.9rem 1.1rem;
}
.arch-layer__title {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 0.55rem;
}
.arch-row { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.arch-chip {
  display: inline-flex; align-items: center;
  padding: 0.3rem 0.75rem; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--border);
  font-family: var(--f-mono); font-size: 0.8rem; color: var(--fg-2);
}
.arch-chip--acc {
  background: color-mix(in oklch, var(--accent) 12%, var(--bg-2));
  border-color: color-mix(in oklch, var(--accent) 35%, var(--border));
  color: color-mix(in oklch, var(--accent) 70%, white);
}
.arch-layer--ui      { border-left: 2px solid oklch(76% 0.14 220); }
.arch-layer--runtime { border-left: 2px solid oklch(80% 0.17 75); }
.arch-layer--brain   { border-left: 2px solid var(--accent); }
.arch-layer--mesh    { border-left: 2px solid oklch(78% 0.15 155); }

.kpi-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.8rem;
  max-width: 56rem; margin: 0 auto;
}
@media (max-width: 720px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1rem 1.1rem; text-align: center;
}
.kpi__n {
  font-family: var(--f-mono); font-weight: 700; font-size: 1.6rem;
  color: var(--fg); letter-spacing: -0.02em; line-height: 1;
}
.kpi__n small { font-size: 0.85rem; color: var(--accent); font-weight: 550; margin-left: 2px; }
.kpi__l {
  margin-top: 0.4rem; font-family: var(--f-mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3);
}

/* HOOKS */
.hook-events {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.5rem; margin: 0 auto 1.25rem; max-width: 56rem;
}
.hook-event {
  text-align: left; padding: 0.7rem 0.95rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--fg-2);
  transition: all 0.22s var(--ease-out);
  display: flex; flex-direction: column; gap: 0.25rem;
}
.hook-event:hover { border-color: var(--fg-4); color: var(--fg); }
.hook-event.is-active {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--accent) 10%, var(--surface));
  color: var(--fg);
}
.hook-event__name { font-family: var(--f-mono); font-size: 0.88rem; font-weight: 550; }
.hook-event__doc { font-size: 0.78rem; color: var(--fg-3); line-height: 1.4; }

/* SANDBOX */
.mode-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem;
  max-width: 58rem; margin: 0 auto 1.5rem;
}
@media (max-width: 860px) { .mode-cards { grid-template-columns: 1fr; } }
.mode-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.3rem;
  position: relative; overflow: hidden;
  transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}
.mode-card:hover { transform: translateY(-2px); }
.mode-card--ro:hover { border-color: oklch(76% 0.14 220); }
.mode-card--ws:hover { border-color: var(--ok); }
.mode-card--full:hover { border-color: var(--warn); }
.mode-card__icon { font-size: 1.6rem; margin-bottom: 0.7rem; }
.mode-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; letter-spacing: -0.01em; font-weight: 650; }
.mode-card__lead { color: var(--fg-2); font-size: 0.92rem; margin: 0 0 1rem; }
.mode-card__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.mode-card__list li { font-size: 0.86rem; color: var(--fg-2); display: flex; gap: 0.5rem; align-items: baseline; }
.mode-card__list code {
  background: var(--bg-1); padding: 0.05rem 0.35rem; border-radius: 3px;
  font-size: 0.8em; color: var(--fg);
}
.mode-card__list .ok   { color: var(--ok);   font-family: var(--f-mono); }
.mode-card__list .no   { color: var(--err);  font-family: var(--f-mono); }
.mode-card__list .warn { color: var(--warn); font-family: var(--f-mono); }

/* SKILLS */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.7rem; max-width: 56rem; margin: 0 auto 1.5rem;
}
.skill-source {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.85rem 1rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  position: relative;
}
.skill-source__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c, var(--accent));
  box-shadow: 0 0 10px 2px color-mix(in oklch, var(--c) 50%, transparent);
  margin-bottom: 0.15rem;
}
.skill-source__name { font-family: var(--f-mono); font-size: 0.88rem; font-weight: 550; color: var(--fg); }
.skill-source__desc { font-size: 0.78rem; color: var(--fg-3); }

.cta-inline {
  display: flex; gap: 1rem; align-items: center; justify-content: center;
  flex-wrap: wrap; margin-top: 0.5rem;
}
.cta-inline__num {
  font-family: var(--f-mono); font-size: 0.82rem; color: var(--fg-3);
}

/* MESH */
.mesh-diagram {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1rem 0.5rem; max-width: 58rem; margin: 0 auto 1.5rem;
}
.mesh-diagram svg { width: 100%; height: auto; display: block; }

/* GATEWAY refs */
.refs {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem; max-width: 52rem; margin: 1.25rem auto 0;
}
@media (max-width: 680px) { .refs { grid-template-columns: 1fr; } }
.ref-link {
  display: block; padding: 1rem 1.1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); transition: border-color 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}
.ref-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.ref-link__k { font-family: var(--f-mono); font-size: 0.92rem; color: var(--fg); }
.ref-link__v { margin-top: 0.3rem; font-size: 0.84rem; color: var(--fg-3); }

/* CODE BLOCKS */
.code-block {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1rem 1.15rem;
  font-family: var(--f-mono); font-size: 0.86rem; line-height: 1.65;
  color: var(--fg); overflow-x: auto;
  max-width: 52rem; margin: 0 auto;
}
.code-block--wide { max-width: 56rem; }
.tok-prompt { color: var(--accent); user-select: none; margin-right: 0.45rem; }
.tok-ok { color: var(--ok); }
.tok-c { color: var(--fg-4); font-style: italic; }
.tok-str { color: #fbbf77; }
.tok-kw { color: var(--accent); }
.tok-key { color: #93c5fd; }
.tok-fn { color: #f0abfc; }
.tok-type { color: #67e8f9; }

/* CTA */
.cta__inner {
  max-width: 42rem; margin: 0 auto; text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  background:
    radial-gradient(60% 70% at 50% 0%, color-mix(in oklch, var(--accent) 22%, transparent), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg-1));
  border: 1px solid var(--border); border-radius: var(--r-xl);
}
.cta__inner h2 {
  margin: 0 0 0.3rem; font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700; letter-spacing: -0.025em;
}
.cta__inner > p { color: var(--fg-2); margin: 0 0 1.5rem; }
.cta__row { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* FOOTER */
.footer {
  max-width: var(--page); margin: 2rem auto 0;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--border);
  color: var(--fg-3); font-size: 0.88rem;
}
.footer__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.footer__brand { font-family: var(--f-mono); color: var(--fg); }
.footer__links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.footer__links a { transition: color 0.2s var(--ease-out); }
.footer__links a:hover { color: var(--fg); }
.footer__note { margin: 0; color: var(--fg-4); font-size: 0.82rem; }
.footer__note a { color: var(--fg-2); }
.footer__note a:hover { color: var(--accent); }

/* reveal */
.reveal { opacity: 0; transform: translateY(10px); transition: all 0.6s var(--ease-out) var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
