@font-face {
  font-family: "Inter";
  src: url("/assets/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* TranscendenceIA / Trascendent canonical tokens (STYLE.md) */
  --night: #090b10;
  --night-2: #11141b;
  --night-3: #191d26;
  --white: #f7f6f1;
  --muted: #a6aab5;
  --paper: #eeece5;
  --paper-2: #dfdcd2;
  --ink: #0b0d12;
  --ink-muted: #3c404b;

  /* Spectral accents (reserved for hairlines, focus, focal details) */
  --ember: #ff4b0a;
  --magenta: #ff0a8a;
  --violet: #aa35ff;
  --electric: #3867ff;
  --cyan: #28d9f7;
  --brand-border: #3a3448;
  --brand-border-soft: rgba(136, 114, 153, 0.28);

  /* NOPRAY Sacred Gold accent (bridged from pixel-art Jesus icon) */
  --gold: #f5c242;
  --gold-soft: #f9e2af;
  --gold-dim: rgba(245, 194, 66, 0.22);

  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;

  --radius-md: 12px;
  --radius-lg: 16px;
  --max-w: 1120px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--night);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--white);
  background-color: var(--night);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Browser surfaces themed to design system */
::selection {
  background: rgba(245, 194, 66, 0.28);
  color: var(--white);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb {
  background: var(--night-3);
  border: 2px solid var(--night);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-border); }

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

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--gold-soft);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 0.2s var(--ease-out);
}
a:hover { color: var(--white); }

code, pre {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Accessible skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; border-radius: 8px; }

/* Spectral hairline signature from STYLE.md */
.spectral-hairline {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--ember), var(--magenta) 26%, var(--violet) 52%, var(--electric) 76%, var(--cyan));
}

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3.5vw, 2.5rem);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 11, 16, 0.92);
  border-bottom: 1px solid var(--brand-border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--white);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.brand-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--gold-soft);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.main-nav a:hover { color: var(--white); }

.nav-parent {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--brand-border-soft);
  border-radius: 999px;
  color: var(--white) !important;
  font-size: 0.84rem !important;
}
.nav-parent img { width: 18px; height: 18px; }

/* Hero */
.hero {
  padding: clamp(3rem, 6.5vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.35rem, 4.8vw, 3.85rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-lead {
  margin: 0 0 1.1rem;
  max-width: 60ch;
  font-size: clamp(1.06rem, 1.4vw, 1.2rem);
  color: var(--muted);
}

.hero-epigraph {
  margin: 0 0 2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.4rem;
  border-radius: 10px;
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--white);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--paper);
  color: var(--ink);
}

.btn-secondary {
  background: var(--night-2);
  color: var(--white);
  border-color: var(--brand-border);
}
.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
}

/* Illuminated Icon Shrine (Hero Right) */
.icon-plate {
  background: var(--night-2);
  border: 1px solid var(--brand-border-soft);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}

.icon-figure {
  margin: 0 auto 1.25rem;
  width: 204px;
  height: 204px;
  display: grid;
  place-items: center;
}

.icon-figure img {
  width: 204px;
  height: 204px;
  image-rendering: pixelated;
  border-radius: 26px;
}

.icon-acronym {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--gold-soft);
}

.icon-caption {
  margin: 0.55rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--muted);
}

.icon-caption code { color: var(--white); }

/* NOPRAY Synth Audio Deck (Zero-JS Looping Player + CSS Animated Equalizer) */
.synth-deck {
  margin-top: 2.5rem;
  background: var(--night-2);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, 340px);
  gap: 1.25rem 1.5rem;
  align-items: center;
}

.eq-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 44px;
  padding: 4px 10px;
  background: var(--night);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.eq-bars span {
  width: 5px;
  height: 100%;
  border-radius: 2px;
  transform-origin: bottom;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 55%, var(--magenta));
  animation: eqPulse 0.952s var(--ease-out) infinite alternate;
}

.eq-bars span:nth-child(1) { animation-delay: -0.05s; animation-duration: 0.476s; }
.eq-bars span:nth-child(2) { animation-delay: -0.22s; animation-duration: 0.62s; }
.eq-bars span:nth-child(3) { animation-delay: -0.41s; animation-duration: 0.476s; }
.eq-bars span:nth-child(4) { animation-delay: -0.14s; animation-duration: 0.71s; }
.eq-bars span:nth-child(5) { animation-delay: -0.33s; animation-duration: 0.476s; }
.eq-bars span:nth-child(6) { animation-delay: -0.09s; animation-duration: 0.58s; }
.eq-bars span:nth-child(7) { animation-delay: -0.28s; animation-duration: 0.476s; }
.eq-bars span:nth-child(8) { animation-delay: -0.45s; animation-duration: 0.66s; }
.eq-bars span:nth-child(9) { animation-delay: -0.19s; animation-duration: 0.476s; }
.eq-bars span:nth-child(10) { animation-delay: -0.37s; animation-duration: 0.54s; }

/* Pause visualizer via pure CSS checkbox */
.eq-toggle-input:checked ~ .eq-bars span {
  animation-play-state: paused;
  transform: scaleY(0.18);
  opacity: 0.5;
}

@keyframes eqPulse {
  0%   { transform: scaleY(0.18); opacity: 0.72; }
  45%  { transform: scaleY(0.95); opacity: 1; }
  75%  { transform: scaleY(0.42); opacity: 0.85; }
  100% { transform: scaleY(0.78); opacity: 0.95; }
}

.synth-meta h2 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.synth-meta p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.synth-controls {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.synth-audio {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  color-scheme: dark;
}

.synth-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.eq-toggle-label {
  cursor: pointer;
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  user-select: none;
}
.eq-toggle-input:focus-visible ~ .synth-controls .eq-toggle-label {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Sections */
.section {
  padding: clamp(3.25rem, 6vw, 5rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 750;
  line-height: 1.16;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-intro {
  margin: 0 0 2.5rem;
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Paradigm Comparison (Two-column architectural contrast) */
.contrast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.contrast-col {
  background: var(--night-2);
  border: 1px solid var(--brand-border-soft);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.contrast-col.nopray-col {
  border-color: var(--gold-dim);
  background: linear-gradient(180deg, rgba(245, 194, 66, 0.05), var(--night-2) 48%);
}

.contrast-col h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.stack-diagram {
  margin: 1.1rem 0 0;
  padding: 1rem 1.1rem;
  background: var(--night);
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--white);
  overflow-x: auto;
}

.limits-note {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--night-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  color: var(--muted);
}
.limits-note strong { color: var(--white); }

/* Demos Showcase (Alternating full-width editorial showcases) */
.demo-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.demo-item {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.demo-item:first-child { padding-top: 0; border-top: none; }

.demo-body h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.demo-body p {
  margin: 0 0 1.1rem;
  max-width: 62ch;
  color: var(--muted);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.spec-table th {
  color: var(--muted);
  font-weight: 500;
  width: 34%;
}
.spec-table td { color: var(--white); }

.demo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: var(--night-3);
  border: 1px solid var(--brand-border-soft);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-decoration: none;
}
.chip-link:hover { border-color: var(--gold); color: var(--gold-soft); }

/* Media frames */
.demo-media {
  display: grid;
  gap: 0.85rem;
}

.demo-media figure {
  margin: 0;
  background: var(--night-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.demo-media figcaption {
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.calc-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.live-proof-box {
  background: var(--night-2);
  border: 1px solid var(--brand-border-soft);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}
.live-proof-box pre {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.55;
  overflow-x: auto;
  color: var(--gold-soft);
}

/* Accordion (Pure HTML <details>, zero JS) */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.accordion details {
  background: var(--night-2);
  border: 1px solid var(--brand-border-soft);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.35rem;
}

.accordion summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--white);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--gold);
  flex-shrink: 0;
}
.accordion details[open] summary::after { content: "−"; }

.accordion details > div {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  max-width: 72ch;
}
.accordion details p { margin: 0 0 0.75rem; }
.accordion details ul, .accordion details ol { margin: 0 0 0.75rem; padding-left: 1.3rem; }
.accordion details li { margin-bottom: 0.35rem; }

/* Editorial Ivory Paper Island (STYLE.md signature!) */
.paper-island {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(3.25rem, 6vw, 5rem) 0;
}

.paper-island h2 {
  color: var(--ink);
  margin: 0 0 0.85rem;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.paper-island .section-intro {
  color: var(--ink-muted);
  margin-bottom: 2rem;
}

.audit-pre {
  margin: 0 0 1.5rem;
  padding: 1.35rem 1.5rem;
  background: var(--night);
  color: var(--white);
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  line-height: 1.6;
  overflow-x: auto;
}

.hash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--paper-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  overflow-x: auto;
}
.hash-table th, .hash-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(11, 13, 18, 0.12);
}
.hash-table th { font-weight: 700; color: var(--ink); }
.hash-table td code { font-size: 0.79rem; color: var(--ink); word-break: break-all; }

/* Docs & Skill index */
.docs-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.doc-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1.25rem;
  background: var(--night-2);
  border: 1px solid var(--brand-border-soft);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.doc-row strong { color: var(--white); font-family: var(--font-mono); font-size: 0.9rem; }
.doc-row span { color: var(--muted); font-size: 0.88rem; }
.doc-row:hover { border-color: var(--gold); }

.prompt-box {
  margin: 0;
  padding: 1.25rem 1.4rem;
  background: var(--night-2);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-md);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--white);
  max-width: 72ch;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--brand-border-soft);
  padding: 2.5rem 0 3rem;
  background: var(--night);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-marks {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-marks img.jesus-sm { width: 36px; height: 36px; border-radius: 8px; image-rendering: pixelated; }
.footer-marks img.ico-sm { width: 32px; height: 32px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .contrast-grid,
  .demo-item,
  .synth-deck {
    grid-template-columns: 1fr;
  }
  .icon-plate { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eq-bars span { animation: none; transform: scaleY(0.5); }
  .btn { transition: none; }
}
