:root {
  --ink: #17211c;
  --paper: #f4f0e6;
  --cream: #fffaf0;
  --acid: #d9ff5b;
  --blue: #3157ff;
  --orange: #ff6b38;
  --line: rgba(23, 33, 28, .18);
  --shadow: 0 18px 60px rgba(23, 33, 28, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23,33,28,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,33,28,.035) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: inherit; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--acid); padding: .7rem 1rem; }
.shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(244,240,230,.91);
  backdrop-filter: blur(16px);
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 850; letter-spacing: -.04em; font-size: 1.35rem; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--acid); border-radius: 50% 50% 50% 10%; font: 800 .8rem/1 ui-monospace, monospace; transform: rotate(-6deg); }
.brand-mark span { transform: rotate(6deg); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { text-decoration: none; font-weight: 700; font-size: .9rem; padding: .55rem .72rem; border-radius: 999px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--ink); color: var(--cream); }
.menu-button { display: none; border: 1px solid var(--ink); background: var(--cream); color: var(--ink); border-radius: 999px; padding: .55rem .8rem; font: inherit; font-weight: 750; }

.hero { padding: 84px 0 54px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .75fr); gap: 64px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; font: 800 .78rem/1.2 ui-monospace, SFMono-Regular, monospace; text-transform: uppercase; letter-spacing: .12em; }
.eyebrow::before { content: ""; width: 34px; height: 9px; background: var(--orange); border-radius: 999px; }
h1, h2, h3 { line-height: 1.04; letter-spacing: -.045em; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.7rem, 8vw, 7.4rem); font-weight: 500; max-width: 820px; }
.hero-lede { max-width: 690px; margin: 28px 0 0; font-size: clamp(1.05rem, 1.6vw, 1.24rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .72rem 1.05rem; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 850; box-shadow: 4px 4px 0 var(--ink); transition: transform .16s ease, box-shadow .16s ease; }
.button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.button-primary { background: var(--acid); }
.button-secondary { background: var(--cream); }

.field-card { position: relative; min-height: 470px; border: 1px solid var(--ink); border-radius: 28px; background: var(--cream); box-shadow: var(--shadow); overflow: hidden; transform: rotate(1.5deg); }
.field-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 10% 10%, rgba(49,87,255,.16), transparent 42%), radial-gradient(circle at 80% 75%, rgba(255,107,56,.17), transparent 45%); }
.field-top { position: relative; display: flex; justify-content: space-between; padding: 24px; font: 750 .73rem/1.4 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.orbit { position: absolute; border: 1px solid var(--ink); border-radius: 50%; }
.orbit-a { width: 245px; height: 245px; top: 95px; left: 54px; }
.orbit-b { width: 150px; height: 150px; top: 143px; left: 102px; border-color: var(--blue); }
.orbit-c { width: 64px; height: 64px; top: 185px; left: 145px; background: var(--acid); border-radius: 50% 50% 15% 50%; }
.signal { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); border: 1px solid var(--ink); }
.signal.one { top: 118px; left: 122px; }
.signal.two { top: 280px; left: 254px; background: var(--blue); }
.field-caption { position: absolute; left: 24px; right: 24px; bottom: 24px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; border-top: 1px solid var(--ink); padding-top: 18px; font: 750 .78rem/1.45 ui-monospace, monospace; }
.field-number { font-size: 3rem; line-height: .85; color: var(--blue); }

.section { padding: 58px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.section-head h2 { margin: 0; font: 500 clamp(2.3rem, 5vw, 4.7rem)/1 Georgia, serif; max-width: 750px; }
.section-head p { margin: 0; max-width: 330px; font-size: .95rem; }
.notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.note { display: flex; flex-direction: column; min-height: 360px; padding: 27px; border: 1px solid var(--ink); border-radius: 22px; background: rgba(255,250,240,.82); }
.note:nth-child(2) { background: var(--acid); transform: translateY(22px); }
.note:nth-child(3) { background: #dfe5ff; }
.note-index { margin-bottom: 70px; font: 800 .76rem/1 ui-monospace, monospace; }
.note h2, .note h3 { margin: 0 0 18px; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.note p { margin: 0; }
.note-link { margin-top: auto; padding-top: 22px; font-weight: 850; text-underline-offset: 4px; }

.page-hero { padding: 78px 0 38px; }
.page-hero h1 { font-size: clamp(3.3rem, 7vw, 6.8rem); max-width: 990px; }
.page-intro { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--ink); }
.page-intro .stamp { font: 800 .76rem/1.5 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.page-intro p { margin: 0; font-size: clamp(1.05rem, 1.8vw, 1.24rem); }
.chapter-list { border-top: 1px solid var(--ink); }
.chapter { display: grid; grid-template-columns: 90px .65fr 1fr; gap: 32px; padding: 42px 0; border-bottom: 1px solid var(--ink); }
.chapter-number { font: 800 .82rem/1 ui-monospace, monospace; color: var(--blue); }
.chapter h2 { margin: 0; font: 500 clamp(2rem, 4vw, 3.5rem)/1.05 Georgia, serif; }
.chapter p { margin: 0; font-size: 1.02rem; }
.next-panel { margin: 68px 0; padding: 38px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--ink); border-radius: 24px; background: var(--blue); color: white; box-shadow: 7px 7px 0 var(--ink); }
.next-panel h2 { margin: 0; max-width: 700px; font: 500 clamp(2rem, 5vw, 4rem)/1 Georgia, serif; }
.next-panel .button { background: var(--acid); color: var(--ink); flex: none; }

.site-footer { margin-top: 40px; border-top: 1px solid var(--ink); background: var(--ink); color: var(--cream); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 42px; padding: 52px 0 30px; }
.footer-grid h2 { margin: 0; font: 500 clamp(2.2rem, 5vw, 4.4rem)/1 Georgia, serif; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 10px 18px; }
.footer-links a { text-underline-offset: 4px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; border-top: 1px solid rgba(255,250,240,.25); font-size: .8rem; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .field-card { min-height: 420px; max-width: 520px; }
  .notes-grid { grid-template-columns: 1fr; }
  .note, .note:nth-child(2) { min-height: auto; transform: none; }
  .note-index { margin-bottom: 35px; }
  .chapter { grid-template-columns: 55px 1fr; }
  .chapter p { grid-column: 2; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 1160px); }
  .nav { min-height: 66px; }
  .menu-button { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 66px; left: 0; right: 0; padding: 14px; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--ink); }
  .nav-links[data-open="true"] { display: flex; }
  .nav-links a { padding: .8rem 1rem; }
  .hero, .page-hero { padding-top: 54px; }
  h1 { font-size: clamp(3.25rem, 17vw, 5.2rem); }
  .hero-grid { gap: 40px; }
  .field-card { min-height: 380px; }
  .orbit-a { left: calc(50% - 122px); }
  .orbit-b { left: calc(50% - 75px); }
  .orbit-c { left: calc(50% - 32px); }
  .signal.one { left: calc(50% - 55px); }
  .signal.two { left: calc(50% + 68px); }
  .section-head, .next-panel, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .page-intro, .footer-grid { grid-template-columns: 1fr; }
  .page-intro { gap: 16px; }
  .chapter { grid-template-columns: 38px 1fr; gap: 16px; padding: 34px 0; }
  .next-panel { padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
