:root {
  color-scheme: dark;
  --ink: #f6fbfd;
  --muted: #a5bbc7;
  --pale: #d2e3e9;
  --cyan: #48cbe8;
  --cyan-soft: #92e8f7;
  --navy: #06131c;
  --navy-2: #0a1f2c;
  --panel: #0d2939;
  --panel-2: #123449;
  --line: rgba(146, 232, 247, 0.18);
  --fault: #ff6c61;
  --focus: #ffd166;
  --paper: #e7f0f3;
  --paper-ink: #10212b;
  font-family: Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(72, 203, 232, 0.028) 50%, transparent 50.2%),
    linear-gradient(rgba(72, 203, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 203, 232, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 72% 4%, rgba(72, 203, 232, 0.1), transparent 30rem),
    var(--navy);
  background-size: 12rem 12rem, 2rem 2rem, 2rem 2rem, auto, auto;
  line-height: 1.65;
}

img { display: block; max-width: 100%; }
a { color: var(--cyan); text-underline-offset: 0.22em; }
a:hover { color: var(--focus); }
a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 0.2rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 30;
  padding: 0.8rem 1rem;
  color: #111;
  background: var(--focus);
  font-weight: 900;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 19, 28, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
nav {
  max-width: 82rem;
  margin: 0 auto;
  padding: 0.82rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font: 900 0.73rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: inset 0 0 1.2rem rgba(72, 203, 232, 0.14);
}
.nav-links { display: flex; flex-wrap: wrap; gap: 0.65rem 1.2rem; }
.nav-links a { color: var(--pale); text-decoration: none; font-size: 0.92rem; font-weight: 750; }
.nav-links a:hover { color: var(--cyan); }

main { overflow: hidden; }
.hero,
.section {
  max-width: 82rem;
  margin: 0 auto;
  padding: 6.2rem 1.5rem;
}
.hero {
  min-height: calc(100vh - 4.2rem);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(27rem, 1.08fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6.5rem);
  padding-top: 7.5rem;
  padding-bottom: 7.5rem;
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  margin: 0 0 1rem;
  color: var(--fault);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.035em; }
h1 { margin: 0; max-width: 12ch; font-size: clamp(3rem, 6.7vw, 6.4rem); }
h2 { margin: 0; max-width: 17ch; font-size: clamp(2.25rem, 4.7vw, 4.55rem); }
h3 { margin: 0 0 0.72rem; font-size: 1.35rem; }
.lede {
  max-width: 43rem;
  margin: 2rem 0;
  color: var(--pale);
  font-size: clamp(1.12rem, 2vw, 1.42rem);
}
.actions { display: flex; flex-wrap: wrap; gap: 0.82rem; margin: 2.1rem 0 1.3rem; }
.button {
  display: inline-block;
  padding: 0.9rem 1.2rem;
  border: 2px solid var(--cyan);
  font-weight: 850;
  text-decoration: none;
}
.button.primary { color: #06131c; background: var(--cyan); }
.button.primary:hover { color: #111; background: var(--focus); border-color: var(--focus); }
.button.secondary { color: var(--cyan); background: rgba(6, 19, 28, 0.45); }
.button.secondary:hover { color: var(--focus); border-color: var(--focus); }
.quiet { color: var(--muted); font-size: 0.93rem; }

.hero-visual {
  position: relative;
  margin: 0;
  transform: perspective(1100px) rotateY(-2deg) rotateX(1deg);
  border: 1px solid rgba(72, 203, 232, 0.38);
  background: #02090e;
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.5), 0 0 0 0.7rem rgba(72, 203, 232, 0.025);
}
.hero-visual::before {
  content: "LIVE REPOSITORY STATE";
  position: absolute;
  z-index: 1;
  top: -1.5rem;
  right: 0;
  color: var(--cyan-soft);
  font: 800 0.68rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
}
.hero-visual::after {
  content: "";
  position: absolute;
  right: -0.55rem;
  bottom: -0.55rem;
  width: 4.5rem;
  height: 4.5rem;
  border-right: 2px solid var(--fault);
  border-bottom: 2px solid var(--fault);
  pointer-events: none;
}
.hero-visual img { width: 100%; height: auto; }

.section { border-top: 1px solid var(--line); }
.section-heading { max-width: 54rem; margin-bottom: 3.1rem; }
.section-heading > p:last-child { color: var(--muted); font-size: 1.08rem; }

.loop-section { max-width: none; padding-left: max(1.5rem, calc((100vw - 79rem) / 2)); padding-right: max(1.5rem, calc((100vw - 79rem) / 2)); }
.evidence-loop {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(8rem, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  background: rgba(7, 26, 37, 0.78);
  overflow-x: auto;
}
.evidence-loop::before {
  content: "";
  position: absolute;
  left: 4.5rem;
  right: 4.5rem;
  top: 3.1rem;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-soft) 76%, var(--fault));
}
.evidence-loop li {
  position: relative;
  min-width: 9.5rem;
  padding: 2rem 1.1rem 1.5rem;
  border-right: 1px solid var(--line);
}
.evidence-loop li:last-child { border-right: 0; }
.evidence-loop li > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 2.25rem;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  color: #041017;
  background: var(--cyan);
  font: 900 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.evidence-loop li:last-child > span { border-color: var(--fault); background: var(--fault); }
.evidence-loop strong { display: block; margin-bottom: 0.65rem; color: var(--pale); font-size: 1.05rem; }
.evidence-loop small { display: block; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }

.packet-section { display: grid; grid-template-columns: minmax(16rem, 0.7fr) minmax(0, 1.3fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.packet-section .section-heading { position: sticky; top: 7rem; margin-bottom: 0; }
.packet {
  border: 1px solid rgba(72, 203, 232, 0.35);
  background: linear-gradient(145deg, rgba(18, 52, 73, 0.88), rgba(8, 28, 40, 0.86));
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.25);
}
.packet-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.82rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--cyan-soft);
  font: 800 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
}
.packet dl { margin: 0; }
.packet dl > div { display: grid; grid-template-columns: minmax(8rem, 0.34fr) minmax(0, 1fr); gap: 1.5rem; padding: 1.35rem 1.2rem; border-bottom: 1px solid var(--line); }
.packet dl > div:last-child { border-bottom: 0; }
.packet dt { color: var(--pale); font-weight: 850; }
.packet dd { margin: 0; color: var(--muted); }

.oracle-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}
.oracle-grid article {
  min-height: 15rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  background: rgba(10, 31, 44, 0.76);
}
.oracle-grid p { color: var(--muted); }
.oracle-code {
  display: inline-block;
  margin-bottom: 3.1rem;
  padding: 0.36rem 0.48rem;
  color: var(--cyan-soft);
  border: 1px solid var(--cyan);
  font: 850 0.68rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
}

.recovery-section { max-width: none; padding-left: max(1.5rem, calc((100vw - 79rem) / 2)); padding-right: max(1.5rem, calc((100vw - 79rem) / 2)); background: var(--paper); color: var(--paper-ink); }
.recovery-section .eyebrow { color: #a4352d; }
.recovery-section .section-heading > p:last-child { color: #526875; }
.fault-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(16, 33, 43, 0.2); border: 1px solid rgba(16, 33, 43, 0.2); }
.fault-grid p { margin: 0; padding: 1.45rem; background: #f7fbfc; }
.fault-grid strong { display: block; margin-bottom: 0.55rem; color: #8f2f29; }
.fault-grid span { display: block; color: #526875; }

.three-truths { display: grid; grid-template-columns: minmax(14rem, 0.55fr) minmax(0, 1.45fr); gap: clamp(2rem, 6vw, 6rem); }
.truth-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.truth-grid article { padding: 1.35rem; border-top: 3px solid var(--cyan); background: rgba(13, 41, 57, 0.78); }
.truth-grid article:last-child { border-color: var(--fault); }
.truth-grid > article > span { display: block; margin-bottom: 3rem; color: var(--cyan-soft); font: 850 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.1em; }
.truth-grid article:last-child > span { color: var(--fault); }
.truth-grid p { color: var(--muted); }

.prompt-section { max-width: 68rem; }
.prompt-section blockquote {
  margin: 2rem 0;
  padding: 1.6rem 1.8rem;
  border-left: 0.42rem solid var(--fault);
  background: rgba(18, 52, 73, 0.82);
  color: var(--pale);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.24);
}
.prompt-section code { color: var(--cyan-soft); font-weight: 850; }
.prompt-section > p { color: var(--muted); }

footer { padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); background: #02080d; border-top: 1px solid var(--line); }
footer p { margin: 0.35rem 0; }
footer strong { color: var(--pale); }

@media (max-width: 70rem) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 56rem; }
  .hero-visual { max-width: 58rem; transform: none; }
  .packet-section, .three-truths { grid-template-columns: 1fr; }
  .packet-section .section-heading { position: static; }
  .oracle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fault-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 48rem) {
  .site-header { position: static; backdrop-filter: none; }
  nav { flex-direction: column; align-items: flex-start; }
  .hero, .section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .oracle-grid, .truth-grid, .fault-grid { grid-template-columns: 1fr; }
  .packet dl > div { grid-template-columns: 1fr; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-visual { transform: none; }
}
