/* ADYX.AI — production stylesheet
   Derived 1:1 from the approved ADYX Site design.
   Inline design styles were lifted into tokens + components so the page can be
   responsive, accessible and cacheable. Desktop rendering is unchanged. */


/* The gate does not cut to the main page, it fades into it — whether the
   visitor solved the puzzle or the 30s timer let them through. Both documents
   opt in, so the browser cross-fades between them instead of blanking. Where
   view transitions are unsupported this degrades to an ordinary navigation,
   which is what the site did before; nothing breaks, it is just less soft.
   `prefers-reduced-motion` cuts it, per the same rule the field follows. */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 900ms;
  animation-timing-function: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

:root {
  /* Matrix green, taken verbatim from the frozen sickfield build (--green). */
  --accent: #2ED17D;
  --accent-hot: #8EFFC4;
  --accent-ink: #031309;

  --bg: #000000;

  /* Every fill on this page is black — no exceptions, no near-blacks with a
     cast. The field is the only thing behind the content, and a coloured
     layer laid over it is the one thing ruled out. Surfaces separate by how
     much field they let through, never by hue; the 1px lines carry the
     palette instead. Sampled away from a glyph, every one of these is
     literally #000 on a black ground. */
  --plate-band:  rgba(0, 0, 0, 0.80);
  --plate-mast:  rgba(0, 0, 0, 0.78);
  --plate-panel: rgba(0, 0, 0, 0.84);

  --surface:        rgba(0, 0, 0, 0.92);
  --surface-raised: rgba(0, 0, 0, 0.86);
  --logo-well:      rgba(0, 0, 0, 0.92);

  --line: #17231C;
  --line-2: #1F3026;
  --line-3: #2B4433;
  --line-dashed: #375242;

  --ink: #E9F3EC;
  --ink-2: #C7D6CC;
  --body: #A3B4A9;
  --muted: #849A8D;
  --faint: #7C9186;   /* 5.9:1 on --surface; the AA lift from #6E6A60 stands */

  --shell: 1180px;
  --gutter: 32px;

  --sans: 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* anchor jumps must clear the sticky masthead */
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

::selection { background: var(--accent); color: var(--bg); }

img, svg { max-width: 100%; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; color: var(--accent-ink); }

/* ---------- layout primitives ---------- */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.page {
  min-height: 100vh;
  /* No fill and no tint. The page is a transparent sheet of content over the
     field; the only thing behind it is black. */
  position: relative;
  z-index: 3;
}

section { border-top: 1px solid var(--line); }
.hero { border-top: 0; }
.band-alt { background: var(--plate-band); }

/* ---------- type ---------- */

.mono {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.14em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 400;
}

h1, h2, h3 { margin: 0; }

.h-hero em {
  font-style: normal;
  color: var(--accent);
}

.h-hero {
  margin: 26px 0 0;
  font-size: clamp(38px, 7.2vw, 82px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 15ch;
  text-wrap: balance;
}

.h-section {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.h-close {
  font-size: clamp(32px, 5.2vw, 52px);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.03em;
  max-width: 20ch;
  text-wrap: balance;
}

.h-sub {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.lede {
  margin: 28px 0 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--body);
  max-width: 56ch;
  text-wrap: pretty;
}

.copy {
  margin: 20px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--body);
  max-width: 64ch;
  text-wrap: pretty;
}
.copy + .copy { margin-top: 18px; }
.copy-lead { margin-top: 22px; }
.copy-close { margin-top: 24px; max-width: 56ch; }
strong { color: var(--ink); font-weight: 500; }

.note {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--body);
}

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--plate-mast);
  border-bottom: 1px solid var(--line);
}

.masthead .shell {
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--logo-well);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: none;
}
a.mark:focus-visible { border-radius: 7px; }
.mark span:first-child {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}
.mark i {
  width: 4.5px;
  height: 11px;
  background: var(--accent);
  border-radius: 1px;
  display: block;
}

.wordmark {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
}
.nav a { color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav a.nav-cta {
  border: 1px solid var(--line-3);
  padding: 7px 13px;
  border-radius: 2px;
  color: var(--ink);
}
.nav a.nav-cta:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 14px 22px;
  border-radius: 2px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hot); color: var(--accent-ink); }
.btn-ghost { border: 1px solid var(--line-3); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}
.btn-row-close { margin-top: 36px; }

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

.hero .shell { padding-top: 104px; padding-bottom: 88px; }

.status-line { display: flex; align-items: center; gap: 10px; margin: 0; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.dot-hollow { background: none; border: 1px solid var(--faint); }

/* ---------- hairline grids (1px gaps read as rules) ---------- */

.rule-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.rule-grid > * { background: var(--plate-panel); }

.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }

.stat { padding: 22px 24px; }
.stat-n {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
/* word-valued figures sit where a numeral did, with tighter tracking */
.stat-n.word { letter-spacing: 0.01em; }
.stat-l {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 8px;
}

.metrics { margin-top: 76px; }

/* ---------- section headers ---------- */

.section-pad { padding-top: 88px; padding-bottom: 88px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 44px;
}
.section-head .num {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.section-head .bar { flex: 1; border-top: 1px solid var(--line); }

/* ---------- split layouts ---------- */

.split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: start;
}
.split-close { grid-template-columns: 1.2fr 1fr; }
.split-even { grid-template-columns: 1fr 1fr; gap: 40px; }
.pair { margin-top: 44px; }

/* ---------- pillar cards ---------- */

.pillars { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillar { background: var(--plate-panel); padding: 20px 22px; }
.pillar h3 {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.pillar p { margin: 7px 0 0; font-size: 13px; line-height: 1.6; color: var(--body); }

.tri { margin-top: 40px; }
.tri .cell { padding: 24px 26px; }
.tri .cell h3 {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.tri .cell p { margin: 9px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--body); }

/* ---------- figures ---------- */

.figure {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 30px;
  margin-top: 56px;
}
.figure.tight { margin-top: 40px; }
.figure.stack { margin-top: 20px; }
.figure { margin-block-end: 0; margin-inline: 0; }

.figure-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.figure-head .id,
.figure-head .name {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.figure-head .id { color: var(--accent); }
.figure-head .name { color: var(--muted); }

.figure-note {
  margin: 18px 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--faint);
  text-wrap: balance;
}

.flow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.node {
  flex: 1;
  min-width: 130px;
  border: 1px solid var(--line-2);
  padding: 13px 14px;
}
.node .t {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.node .d { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.node-accent { border-color: var(--accent); background: var(--surface-raised); }
.node-raised { border-color: var(--line-3); background: var(--surface-raised); }

.arrow {
  align-self: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  flex: none;
  line-height: 1;
}

/* system map (fig 02) */

.map-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.map-row-4 { grid-template-columns: repeat(4, 1fr); }

.map-down {
  display: flex;
  justify-content: center;
  gap: 200px;
  padding: 8px 0;
}
.map-down span { font-family: var(--mono); font-size: 12px; color: var(--accent); }

.plane {
  background: var(--surface-raised);
  border: 1px solid var(--line-3);
  border-left: 3px solid var(--accent);
  padding: 18px 20px;
}
.plane .t {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.plane .d {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 7px;
}

.exchange {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.exchange .lbl {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--faint);
}
.exchange .ar { font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* classification gate (fig 03) */

.gate { display: flex; align-items: stretch; gap: 8px; }
.gate .in { flex: 1.1; }
.gate .classify { flex: 1.1; }
.gate .outcomes { flex: 2.6; display: grid; gap: 8px; }

.outcome {
  border: 1px solid var(--line-2);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.outcome .k {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.outcome .k.hot { color: var(--accent); }
.outcome .v { font-size: 11.5px; color: var(--muted); }
.outcome.pending { border-style: dashed; border-color: var(--line-dashed); }

/* ---------- status ---------- */

.status-grid { margin-top: 40px; }
.status-col { padding: 28px 30px; }

.status-col .cap {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
}
.status-col .cap span:last-child {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink);
}
.status-col .cap.off span:last-child { color: var(--muted); }

.ledger { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ledger li {
  display: flex;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.ledger .i {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  flex: none;
}

.unfinished { display: grid; gap: 18px; font-size: 13.5px; line-height: 1.65; color: var(--body); }
.unfinished p { margin: 0; }
.unfinished .caveat {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

/* ---------- contact ---------- */

.contact .shell { padding-top: 96px; padding-bottom: 96px; }

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 30px;
}
.card .cap {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.audience { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.audience li {
  display: flex;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--body);
}
.audience .b { color: var(--accent); flex: none; }

.signature {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.8;
  letter-spacing: 0.1em;
  color: var(--faint);
}

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

.site-foot { border-top: 1px solid var(--line); }

.site-foot .shell {
  padding-top: 26px;
  padding-bottom: 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.mark-sm { width: 22px; height: 22px; border-radius: 6px; }
.mark-sm span:first-child { font-size: 13px; }
.mark-sm i { width: 4px; height: 9px; }

.site-foot .txt {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--faint);
}
.site-foot .txt.right { margin-left: auto; }

/* ---------- motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.anim-fade { animation: fade .7s ease both; }
.anim-rise { animation: rise .8s ease both; }
.d1 { animation-delay: .06s; }
.d2 { animation-delay: .16s; }
.d3 { animation-delay: .26s; }
.d4 { animation-delay: .34s; }
.metrics.anim-fade { animation-duration: .9s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim-fade, .anim-rise { animation: none !important; }
  * { transition-duration: .01ms !important; }
}

/* ---------- responsive ---------- */

/* the six-node flows wrap and orphan RECEIPT well before the 900px stack point */
@media (max-width: 1120px) {
  .flow { flex-direction: column; align-items: stretch; }
  .flow .node { min-width: 0; }
  .flow .arrow { align-self: center; transform: rotate(90deg); }
}

@media (max-width: 1080px) {
  .split, .split-close { grid-template-columns: 1fr; gap: 40px; }
  .map-down { gap: 22%; }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .hero .shell { padding-top: 76px; padding-bottom: 68px; }
  .section-pad { padding-top: 68px; padding-bottom: 68px; }
  .contact .shell { padding-top: 76px; padding-bottom: 76px; }

  .metrics { margin-top: 56px; }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
  .split-even { grid-template-columns: 1fr; gap: 32px; }

  .map-row, .map-row-4 { grid-template-columns: repeat(2, 1fr); }
  .map-down { gap: 15%; }

  .figure { padding: 22px 20px; margin-top: 40px; }
  .figure.tight, .figure.stack { margin-top: 20px; }
.figure { margin-block-end: 0; margin-inline: 0; }

  .gate { flex-direction: column; }
  .gate .arrow { transform: rotate(90deg); }

  .status-col { padding: 24px 22px; }
}

@media (max-width: 720px) {
  /* nav wraps to its own row rather than disappearing; CTA rides that same row */
  html { scroll-padding-top: 88px; }
  .masthead .shell {
    flex-wrap: wrap;
    gap: 10px;
    row-gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .nav {
    margin-left: 0;
    width: 100%;
    order: 3;
    gap: 13px;
    flex-wrap: wrap;
    row-gap: 8px;
    align-items: center;
  }
  /* Below 720px the nav already wraps under the logo. All five items cannot
     share one row, and a third masthead row costs more than the CTA is worth —
     the contact section's own button is the real call to action. */
  .nav a.nav-cta { display: none; }
  .lede { font-size: 17px; }
  .btn { padding: 15px 18px; }
  .btn-row { gap: 10px; }
}

/* Keep the masthead to two rows on every iPhone portrait width. All five nav
   items cannot share one row under ~690px, so the CTA steps aside here — the
   contact section's own button is the real call to action. */
@media (max-width: 442px) {
  html { scroll-padding-top: 84px; }
  .nav { justify-content: space-between; gap: 10px; font-size: 9.5px; }
}

@media (max-width: 480px) {
  :root { --gutter: 18px; }
  html { scroll-padding-top: 84px; }
  .nav { gap: 11px; font-size: 10px; }
  .cols-4 { grid-template-columns: 1fr; }
  .map-row, .map-row-4 { grid-template-columns: 1fr; }
  .map-down { display: none; }
  .exchange { gap: 12px; }
  .btn { width: 100%; text-align: center; }
  .outcome { flex-direction: column; gap: 4px; }
  .status-col { padding: 22px 18px; }
  .figure { padding: 20px 16px; }
}


/* ---------- post-breach additions (applied by sync-to-app.sh) ---------- */

@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }
.page { animation: arrive .6s ease both; }

@media (prefers-reduced-motion: reduce) { .page { animation: none !important; } }


/* ---------- the field ----------------------------------------------------
   Three engines, one rolled per visit, the same rotation the gate page uses.
   Two fixed layers under the content: a flat black ground, and the canvas.
   There is no third layer. A grade sat here — black gradients over the field,
   plus a green radial on the ground beneath it — and between them they put a
   visible wash across the page. Both are gone. Nothing colours or shades the
   ground now; the field's own opacity below is the single legibility control,
   and the copy carries a black text-shadow of its own. */

html { background: var(--bg); }

.rain-ground,
.rain-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.rain-ground {
  z-index: 0;
  background: var(--bg);
}

.rain-canvas {
  z-index: 1;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.rain-canvas.is-live { opacity: 0.44; }

/* Long-form copy carries its own floor. The sections alternate banded and
   bare, and in a bare one the field runs straight behind the paragraph text.
   A local black shadow is the right tool for that: it travels with the
   glyphs, so it never becomes a plate laid over the field. Pure black, and
   slightly deeper than before because it is now the only thing doing this
   job. */
.copy, .lede, .h-section {
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.98), 0 0 42px rgba(0, 0, 0, 0.88);
}

@media (prefers-reduced-motion: reduce) {
  .rain-canvas.is-live { opacity: 0.30; }
}
