/* Axyndra AI — axyndra.ai
   Fonts: Hanken Grotesk and IBM Plex Mono, SIL Open Font License 1.1, self-hosted (see /fonts/LICENSE.txt).
   Dark-only identity: blue-black field, fine grid, one ice-cyan accent. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --void: #05090f;
  --deep: #08101a;
  --panel: rgba(12, 22, 34, 0.72);
  --panel-solid: #0b1520;
  --line: #1b2b3b;
  --line-strong: #2a4157;
  --ink: #e6f1f7;
  --muted: #93a7b8;
  --faint: #6f8496;
  --ice: #7fe3ff;
  --ice-ink: #03141b;
  --ice-soft: rgba(127, 227, 255, 0.14);
  --ice-glow: 0 0 18px rgba(127, 227, 255, 0.35);
  --focus: #b8f0ff;

  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: 16px;
  --maxw: 1200px;
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--void); }

body {
  margin: 0;
  position: relative;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* fixed field: fine grid with a vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 70% 18%, rgba(127, 227, 255, 0.06), transparent 60%),
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(rgba(127, 227, 255, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(127, 227, 255, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--void);
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 10px 14px;
  background: var(--ice);
  color: var(--ice-ink);
  z-index: 10;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- shared HUD pieces ---------- */

/* Panel: 1px frame with corner brackets in the accent. */
.panel {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--ice), var(--ice)) top left / 14px 1px no-repeat,
    linear-gradient(var(--ice), var(--ice)) top left / 1px 14px no-repeat,
    linear-gradient(var(--ice), var(--ice)) top right / 14px 1px no-repeat,
    linear-gradient(var(--ice), var(--ice)) top right / 1px 14px no-repeat,
    linear-gradient(var(--ice), var(--ice)) bottom left / 14px 1px no-repeat,
    linear-gradient(var(--ice), var(--ice)) bottom left / 1px 14px no-repeat,
    linear-gradient(var(--ice), var(--ice)) bottom right / 14px 1px no-repeat,
    linear-gradient(var(--ice), var(--ice)) bottom right / 1px 14px no-repeat,
    var(--panel);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.label, .tag, .console__bar, .gov__tag, .src__id, .console__who, .t {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- header ---------- */

.top { border-bottom: 1px solid var(--line); }
.top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 28px; height: 28px; flex: none; }
.mk-ring { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.mk-arc { fill: none; stroke: var(--ice); stroke-width: 2; stroke-dasharray: 20 8 6 8 14 100; stroke-linecap: round; }
.mk-core { fill: var(--ice); }
.brand__word { font-weight: 600; font-size: 1.2rem; letter-spacing: 0.01em; }
.brand__ai { margin-left: 0.3em; font-weight: 300; color: var(--muted); }

.top__nav { display: flex; align-items: center; gap: 20px; }

.langs { list-style: none; display: flex; gap: 2px; padding: 0; margin: 0; }
.langs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 7px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--faint);
  text-decoration: none;
}
.langs a:hover { color: var(--ink); }
.langs a[aria-current="page"] { color: var(--ice); box-shadow: inset 0 -1px 0 var(--ice); }

/* ---------- buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  background: var(--ice);
  color: var(--ice-ink);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  box-shadow: var(--ice-glow);
  transition: filter .15s ease;
}
.btn:hover { filter: brightness(1.12); }
.btn:focus-visible { outline-offset: 4px; }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }
.btn--light { }

.link-quiet {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
}
.link-quiet:hover { text-decoration-color: var(--ice); }
.link-quiet--light { color: var(--ink); }

@media (max-width: 560px) { .top__nav .btn--small { display: none; } .top__nav { gap: 12px; } }

/* ---------- hero ---------- */

.hero { padding-block: 48px 72px; }
.hero__grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 980px) {
  .hero { padding-block: 72px 104px; }
  .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ice);
  margin-bottom: 28px;
}
.tag__dot {
  width: 6px;
  height: 6px;
  background: var(--ice);
  box-shadow: var(--ice-glow);
}

.hero__title {
  font-weight: 300;
  font-size: clamp(2.7rem, 1.5rem + 4.8vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 12ch;
  text-wrap: balance;
}
.hero__lede {
  margin-top: 28px;
  max-width: 34em;
  font-size: 1.1875rem;
  color: var(--muted);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 36px;
}
.hero__say { margin-top: 32px; font-size: 0.9375rem; color: var(--faint); }
.say { font-family: var(--mono); font-size: 0.875rem; color: var(--ink); letter-spacing: 0.06em; }

/* ---------- the core ---------- */

.core {
  position: relative;
  width: min(100%, 520px);
  margin-inline: auto;
  aspect-ratio: 1;
}
.core__svg { width: 100%; height: 100%; display: block; overflow: visible; }

.c-hair { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.c-hair--dim { stroke: var(--line); }
.c-major line { stroke: var(--muted); stroke-width: 1.2; }
.c-ticks { fill: none; stroke: var(--line-strong); stroke-width: 7; stroke-dasharray: 1 10.205; }
.c-arc {
  fill: none;
  stroke: var(--ice);
  stroke-width: 1.5;
  stroke-dasharray: 150 26 40 26 220 60 18 60 90 503.8;
  opacity: 0.85;
  filter: drop-shadow(0 0 4px rgba(127, 227, 255, 0.5));
}
.c-arc--b {
  stroke-width: 3;
  stroke-dasharray: 6 10 6 10 6 220 90 40 12 595;
  opacity: 0.55;
  filter: none;
}
.c-cross { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; }
.c-core { fill: var(--ice); filter: drop-shadow(0 0 10px rgba(127, 227, 255, 0.8)); }
.c-glow { transform-origin: 250px 250px; }

/* Continuous motion on screen: the two counter-rotating arcs and the slow pulse of the core glow,
   all part of one object. Nothing else on the page loops. */
.c-spin { transform-origin: 250px 250px; }
.c-spin--a { animation: spin 80s linear infinite; }
.c-spin--b { animation: spin 130s linear infinite reverse; }
.c-glow { animation: breathe 6s ease-in-out infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe {
  0%, 100% { opacity: 0.65; transform: scale(0.94); }
  50%      { opacity: 1;    transform: scale(1.06); }
}

.core__telemetry { list-style: none; padding: 0; margin: 0; }
.t { position: absolute; color: var(--faint); font-size: 0.6875rem; white-space: nowrap; }
.t::before { content: ""; display: inline-block; width: 18px; height: 1px; background: var(--line-strong); vertical-align: middle; margin-right: 8px; }
.t--nw { top: 0; left: 0; }
.t--ne { top: 0; right: 0; }
.t--sw { bottom: 0; left: 0; }
.t--se { bottom: 0; right: 0; }
@media (max-width: 520px) { .t { font-size: 0.625rem; letter-spacing: 0.1em; } .t::before { width: 10px; margin-right: 6px; } }

/* ---------- console (question → answer → sources) ---------- */

.console { margin-top: 40px; }
@media (min-width: 980px) { .console { margin-top: 56px; } }

.console__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
}
.console__bar span:first-child { color: var(--ice); }
.console__status { margin-left: auto; color: var(--muted); }
.console__status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background: var(--ice);
  vertical-align: 1px;
}

.console__body {
  position: relative;
  display: grid;
  gap: 32px;
  padding: 28px 22px 8px;
  /* scan lines: a static texture, swept once on load */
  background-image: repeating-linear-gradient(0deg, rgba(127, 227, 255, 0.025) 0 1px, transparent 1px 4px);
  overflow: hidden;
}
.console__body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  top: -120px;
  background: linear-gradient(180deg, transparent, rgba(127, 227, 255, 0.07), transparent);
  pointer-events: none;
  animation: sweep 2.4s ease-out 0.2s 1 both;
}
@keyframes sweep { from { top: -120px; } to { top: 110%; } }

@media (min-width: 900px) {
  .console__body { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; padding: 36px 36px 12px; }
}

.console__who { color: var(--faint); margin-bottom: 10px; }
.console__who--ai { margin-top: 28px; color: var(--ice); }

.console__q {
  font-family: var(--mono);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink);
}
.console__q::before { content: "› "; color: var(--ice); }

/* Typing: only where the whole question fits on one row. --n is its length in characters. */
.typed { --n: 54; }
:lang(pt-BR) .typed { --n: 64; }
:lang(es) .typed { --n: 62; }
@media (min-width: 1100px) {
  .console__q { font-size: 0.94rem; }
  .typed {
    display: inline-block;
    vertical-align: bottom;
    width: calc(var(--n) * 1ch);
    max-width: calc(100% - 2ch);
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid transparent;
    animation:
      type 2.2s steps(var(--n), end) 0.4s 1 both,
      caret 0.7s step-end 0s 4 both;
  }
}
@keyframes type { from { width: 0; } to { width: calc(var(--n) * 1ch); } }
@keyframes caret { 0%, 100% { border-right-color: transparent; } 50% { border-right-color: var(--ice); } }

.console__a {
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: -0.005em;
  animation: fade-in 0.6s ease-out 2.8s 1 both;
}

mark.ev {
  color: var(--ink);
  background: var(--ice-soft);
  border-bottom: 1px solid var(--ice);
  padding: 0 0.15em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
mark.ev::after {
  content: attr(data-ref);
  margin-left: 0.3em;
  font-family: var(--mono);
  font-size: 0.6em;
  font-weight: 500;
  color: var(--ice);
  vertical-align: 0.6em;
  line-height: 0;
}

/* Sources: cards on a spine, each tied by a 1px lead to the answer. */
.console__sources {
  list-style: none;
  padding: 0 0 0 20px;
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  border-left: 1px solid var(--line-strong);
}
@media (min-width: 900px) { .console__sources { margin-top: 64px; } }
.src {
  position: relative;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(5, 9, 15, 0.6);
  font-size: 0.9375rem;
  color: var(--muted);
  animation: src-in 0.5s ease-out both;
}
.src::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 22px;
  width: 20px;
  height: 1px;
  background: var(--ice);
}
.src::after {
  content: "";
  position: absolute;
  left: -24px;
  top: 19px;
  width: 7px;
  height: 7px;
  background: var(--void);
  border: 1px solid var(--ice);
}
@media (min-width: 900px) {
  /* the lead runs back across the gutter toward the answer */
  .src::before { left: -77px; width: 76px; background: linear-gradient(90deg, transparent, var(--ice)); }
}
.src:nth-child(1) { animation-delay: 3.3s; }
.src:nth-child(2) { animation-delay: 3.6s; }
.src:nth-child(3) { animation-delay: 3.9s; }
.src__id { display: block; color: var(--ice); margin-bottom: 4px; font-size: 0.6875rem; }

.console__cap {
  padding: 14px 22px 18px;
  font-size: 0.8125rem;
  color: var(--faint);
}
@media (min-width: 900px) { .console__cap { padding-inline: 36px; } }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes src-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* ---------- content bands ---------- */

.band { padding-block: 80px; border-top: 1px solid var(--line); }
.band--alt { background: linear-gradient(180deg, rgba(8, 16, 26, 0.85), rgba(5, 9, 15, 0.4)); }
@media (min-width: 980px) { .band { padding-block: 120px; } }

.h2 {
  font-weight: 300;
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 20ch;
  text-wrap: balance;
}
.intro { margin-top: 18px; max-width: 38em; font-size: 1.125rem; color: var(--muted); }

/* sources */
.sources { margin-top: 56px; display: grid; gap: 40px; }
@media (min-width: 820px) { .sources { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; } }
.sources__item { position: relative; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.sources__item::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 1px;
  background: var(--ice);
  box-shadow: var(--ice-glow);
}
.sources dt { font-weight: 500; font-size: 1.25rem; }
.sources dd { margin-top: 10px; color: var(--muted); max-width: 32em; }

/* steps: a real sequence, so it is numbered */
.steps {
  list-style: none;
  padding: 0;
  margin-top: 56px;
  counter-reset: step;
  display: grid;
  gap: 32px;
  position: relative;
}
.step { counter-increment: step; position: relative; padding-left: 64px; }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  color: var(--ice);
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
}
.step h3 { font-size: 1.125rem; font-weight: 500; line-height: 1.35; }
.step p { margin-top: 8px; color: var(--muted); max-width: 30em; }

@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; padding-top: 0; }
  .steps::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 15px;
    height: 1px;
    background: var(--line-strong);
  }
  .step { padding-left: 0; padding-top: 56px; }
  .step::before { top: 0; background: var(--void); }
}

/* governance */
.gov { display: grid; gap: 40px; }
@media (min-width: 980px) { .gov { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 80px; } }
.gov__list { list-style: none; padding: 0; display: grid; }
.gov__list li {
  display: grid;
  gap: 6px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.gov__list li:first-child { border-top: 1px solid var(--line); }
@media (min-width: 640px) {
  .gov__list li { grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: baseline; }
}
.gov__tag { color: var(--ice); font-size: 0.6875rem; }
.gov__list strong { color: var(--ink); font-weight: 600; }
.addr { font-family: var(--mono); font-size: 0.9375rem; color: var(--ink); word-break: break-word; }

/* who */
.who { display: grid; gap: 40px; }
@media (min-width: 980px) { .who { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; align-items: start; } }
.asks { list-style: none; padding: 0; display: grid; gap: 0; }
.asks li {
  position: relative;
  padding: 16px 0 16px 28px;
  border-bottom: 1px solid var(--line);
  font-size: 1.1875rem;
  font-weight: 300;
  line-height: 1.45;
}
.asks li:first-child { border-top: 1px solid var(--line); }
.asks li::before {
  content: "›";
  position: absolute;
  left: 4px;
  top: 15px;
  font-family: var(--mono);
  color: var(--ice);
}

/* ---------- call to action ---------- */

.cta { padding-block: 40px 96px; }
.cta__inner { padding: 56px 24px; }
@media (min-width: 720px) { .cta__inner { padding: 88px 72px; } }
.cta__title {
  font-weight: 300;
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 16ch;
  text-wrap: balance;
}
.cta__text { margin-top: 18px; max-width: 34em; color: var(--muted); font-size: 1.125rem; }

/* ---------- footer ---------- */

.foot { padding-block: 40px 48px; font-size: 0.9375rem; color: var(--muted); border-top: 1px solid var(--line); }
.foot__inner { display: grid; gap: 14px; }
@media (min-width: 820px) {
  .foot__inner { grid-template-columns: auto 1fr; align-items: baseline; column-gap: 40px; }
  .foot__inner nav { justify-self: end; }
  .foot__legal { grid-column: 1 / -1; }
}
.foot__brand { color: var(--ink); font-weight: 600; }
.foot__say { font-family: var(--mono); font-size: 0.8125rem; font-weight: 400; color: var(--faint); margin-left: 10px; letter-spacing: 0.06em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot nav a { text-underline-offset: 5px; text-decoration-color: var(--line-strong); }
.foot nav a:hover { text-decoration-color: var(--ice); }
.foot__legal { font-size: 0.8125rem; color: var(--faint); max-width: 60em; }

/* ---------- legal pages ---------- */

.doc { padding-block: 64px 112px; }
.doc__body { max-width: 40em; }
.doc__body h1 {
  font-weight: 300;
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.doc__body h2 { margin-top: 44px; font-size: 1.2rem; font-weight: 500; }
.doc__body p, .doc__body ul { margin-top: 14px; color: var(--muted); }
.doc__body .updated { margin-top: 14px; font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--faint); }
.doc__body a { text-underline-offset: 4px; }

/* ---------- reveal on scroll (pure CSS where supported; static otherwise) ---------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .band > .wrap, .cta__inner {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- reduced motion: everything final and still ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .console__body::after { display: none; }
}

@media print {
  body::before, .core, .top__nav, .cta, .skip { display: none; }
  body { background: #fff; color: #000; }
}
