:root {
  --ink: #11120f;
  --ink-deep: #080907;
  --paper: #e8e3d5;
  --paper-bright: #f6f5ef;
  --muted: #aaa99f;
  --accent: #78952f;
  --warning: #e64a35;
  --line: rgba(232, 227, 213, 0.44);
  --shadow: #050504;
  --mono: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

section[id] { scroll-margin-top: 96px; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--mono);
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  z-index: 99;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(
      to bottom,
      transparent 0 17%,
      rgba(230, 74, 53, 0.08) 17.15%,
      transparent 17.55% 63%,
      rgba(232, 227, 213, 0.07) 63.15%,
      transparent 63.6% 82%,
      rgba(120, 149, 47, 0.07) 82.15%,
      transparent 82.5%
    );
  animation: signal-break 13s steps(1, end) infinite;
}

body::after {
  content: "";
  position: fixed;
  z-index: 100;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 3px
  );
  background-position: 0 0;
  opacity: 0.58;
  mix-blend-mode: multiply;
  animation: scanline-drift 6s linear infinite;
}

main::before {
  content: "";
  position: fixed;
  z-index: 98;
  top: -18vh;
  left: 0;
  width: 100%;
  height: 18vh;
  pointer-events: none;
  opacity: 0.16;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(232, 227, 213, 0.08) 46%,
    rgba(232, 227, 213, 0.18) 50%,
    rgba(120, 149, 47, 0.07) 53%,
    transparent
  );
  animation: page-scan 4.2s linear infinite;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
h1, h2, h3 { margin-top: 0; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--paper-bright);
  transform: translateY(-130%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 2px solid var(--paper);
  background: rgba(17, 18, 15, 0.96);
  backdrop-filter: blur(8px);
}

.site-header .shell {
  display: flex;
  align-items: center;
  min-height: 76px;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  text-decoration: none;
}

.brand strong {
  font: 900 clamp(1.5rem, 4vw, 2.45rem) / 0.9 Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.main-nav a {
  padding: 0.48rem 0.6rem;
  border: 1px solid transparent;
  font-size: 0.72rem;
  text-decoration: none;
  text-transform: uppercase;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ink);
  background: var(--paper);
  outline: none;
  text-shadow: 1px 0 rgba(230, 74, 53, 0.55), -1px 0 rgba(120, 149, 47, 0.5);
}

.hero {
  overflow: hidden;
  border-bottom: 1px solid rgba(17, 18, 15, 0.5);
  color: var(--ink);
  background: var(--paper);
}

.hero-grid {
  display: block;
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.hero-copy {
  width: min(100%, 880px);
  margin-inline: auto;
}

h1.is-glitching,
h2.is-glitching,
h3.is-glitching {
  animation: headline-signal 340ms steps(2, end) 1;
}

h1 {
  max-width: 780px;
  margin-bottom: 1.4rem;
  font: 900 clamp(3.2rem, 8vw, 7.4rem) / 0.84 Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

h1 em {
  color: var(--warning);
  font-style: normal;
}

.lead {
  max-width: 720px;
  margin-bottom: 1.8rem;
  color: #292a25;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero .button {
  border-color: var(--ink);
  border-right-color: #5d5d57;
  border-bottom-color: #5d5d57;
  color: var(--paper-bright);
  background: var(--ink);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--paper);
  border-right-color: #605d52;
  border-bottom-color: #605d52;
  color: var(--ink);
  background: var(--paper-bright);
  box-shadow: 4px 4px 0 var(--shadow);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  outline: 2px dotted var(--paper);
  outline-offset: 3px;
  box-shadow: 2px 2px 0 var(--shadow);
  transform: translate(2px, 2px);
  text-shadow: 1px 0 rgba(230, 74, 53, 0.55), -1px 0 rgba(120, 149, 47, 0.5);
}

.button.is-interaction-glitching,
.main-nav a.is-interaction-glitching {
  animation: control-glitch 280ms steps(2, end) 1;
}

.button:active {
  filter: contrast(1.25);
  transform: translate(3px, 3px) skewX(-1deg);
}

.button.warning {
  border-color: var(--warning);
  color: white;
  background: var(--warning);
}

.button[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--line);
}

.section-dark { background: var(--ink-deep); }

.section-light {
  color: var(--ink);
  background: var(--paper);
  border-color: rgba(17, 18, 15, 0.5);
}

.section-light .section-intro { color: #292a25; }

.section-light .button {
  border-color: var(--ink);
  border-right-color: #5d5d57;
  border-bottom-color: #5d5d57;
  color: var(--paper-bright);
  background: var(--ink);
}

.section-light .material .button {
  border-color: var(--paper);
  border-right-color: #605d52;
  border-bottom-color: #605d52;
  color: var(--ink);
  background: var(--paper-bright);
}

.section-head {
  width: min(100%, 820px);
  margin: 0 auto 2.75rem;
}

h2 {
  margin-bottom: 0;
  font: 900 clamp(2.35rem, 6vw, 5.2rem) / 0.92 Impact, sans-serif;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.section-intro {
  max-width: 720px;
  margin: 1rem 0 0;
  font-family: Georgia, serif;
  font-size: 1.12rem;
}

.lead,
.section-intro,
.practice-step p,
.material p,
.unlock-copy,
.disk-item p,
.mail-console > p,
.book-copy {
  font-weight: 700;
}

.deposition-callout {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  border-left: 5px solid var(--warning);
  color: var(--paper);
  background: rgba(230, 74, 53, 0.08);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.practice-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.practice-step {
  min-height: 240px;
  padding: 1.2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.practice-step b {
  display: block;
  margin-bottom: 3.2rem;
  color: var(--paper-bright);
}

.practice-step h3 {
  font-size: 1rem;
  text-transform: uppercase;
}

.practice-step p {
  color: #c8c4b9;
  font-size: 0.82rem;
}

.practice-download { margin-top: 1.5rem; }

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

.material {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 1.3rem;
  overflow: hidden;
  border: 1px solid var(--line);
  color: var(--paper);
  background: #0c0d0a;
}

.material .file-icon {
  margin-bottom: 4rem;
  font-size: 4rem;
  line-height: 1;
}

.material h3 {
  font: 700 1.5rem / 1.1 Georgia, serif;
}

.material p {
  margin-bottom: 1.4rem;
  font-size: 0.82rem;
}

.material .button {
  width: 100%;
  margin-top: auto;
}

.unlock-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem 1.5rem;
  align-items: end;
  margin-top: 1rem;
  padding: clamp(1.3rem, 3vw, 2.2rem);
  border: 1px solid var(--accent);
  background: rgba(82, 101, 34, 0.13);
}

.unlock-cta h3 {
  margin: 0;
  font: 700 clamp(1.7rem, 3vw, 2.5rem) / 1.05 Georgia, serif;
}

.unlock-title { grid-column: 1; }
.unlock-file { grid-column: 2; }
.unlock-copy { grid-column: 1; margin: 0; max-width: 730px; }
.unlock-cta .button { grid-column: 2; grid-row: 2; }

.disk-wall {
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(0, 1.24fr);
  align-items: stretch;
  gap: clamp(0.9rem, 2vw, 1.5rem);
}

.disk-figure {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #696b65;
}

.disk-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.12);
  transform-origin: center;
}

.disk-photo.is-glitching {
  animation: image-signal 360ms steps(2, end) 1;
}

.disk-list {
  display: grid;
  gap: 0.65rem;
}

.disk-list-spaced { margin-top: 1.5rem; }

.disk-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  color: var(--paper);
  background: #0a0b09;
}

.disk-size {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 7px solid #555851;
  color: var(--ink);
  background: #b7b9b2;
  font-weight: 700;
}

.disk-item h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.disk-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.badge {
  padding: 0.3rem 0.45rem;
  border: 1px solid;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.badge.open { color: var(--paper-bright); }
.badge.locked { color: var(--warning); }

.mail-console {
  margin-top: 2rem;
  padding: 1.4rem;
  border: 2px inset #6a6d64;
  color: var(--paper-bright);
  background: #050704;
  box-shadow: inset 0 0 28px rgba(82, 101, 34, 0.13);
}

.mail-console h3 {
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

.mail-console p {
  color: #c1c7b7;
  font-size: 0.8rem;
}

.mail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: center;
  gap: 0.7rem;
}

.mail-row label { grid-column: 1; }

.mail-row:focus-within label {
  color: var(--paper-bright);
  animation: label-glitch 320ms steps(2, end) 1;
  text-shadow: 1px 0 rgba(230, 74, 53, 0.5), -1px 0 rgba(120, 149, 47, 0.55);
}

.mail-row input {
  grid-column: 2;
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 0;
  color: var(--paper-bright);
  background: #090c07;
}

.mail-row input:focus {
  outline: 2px dotted var(--paper);
  outline-offset: 2px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 5px,
    rgba(232, 227, 213, 0.035) 6px
  );
  background-position: 0 0;
  box-shadow: 2px 0 rgba(230, 74, 53, 0.3), -2px 0 rgba(120, 149, 47, 0.35);
  animation: input-scan 2.4s linear infinite;
}

.mail-row .button {
  grid-column: 1;
  width: 100%;
}

.form-status {
  min-height: 1.4rem;
  margin: 0.7rem 0 0;
  font-size: 0.72rem;
}

.form-status[data-state="success"] { color: var(--paper-bright); }
.form-status[data-state="error"] { color: var(--warning); }
.form-status[data-state="demo"] { color: #d7c16a; }

.buy-strip {
  padding-block: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid rgba(17, 18, 15, 0.5);
  color: var(--ink);
  background: var(--paper);
}

.buy-strip .shell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}

.buy-strip h2 { font-size: clamp(2rem, 5vw, 4rem); }
.buy-strip p { max-width: 760px; margin: 0.4rem 0 0; }
.buy-strip .book-copy { margin-top: 1.5rem; }

.buy-strip .button {
  border-color: var(--ink);
  border-right-color: #5d5d57;
  border-bottom-color: #5d5d57;
  color: var(--paper-bright);
  background: var(--ink);
}

.site-footer {
  padding: 2.5rem 0 5rem;
  background: #070806;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
}

.symbols {
  color: var(--paper-bright);
  font-size: 1.8rem;
  letter-spacing: 0.4em;
  opacity: 0;
  visibility: hidden;
}

.symbols.is-revealed {
  visibility: visible;
  animation: symbol-reveal 620ms steps(1, end) 1;
}

@keyframes scanline-drift {
  to { background-position: 0 24px; }
}

@keyframes page-scan {
  to { transform: translateY(136vh); }
}

@keyframes signal-break {
  0%, 84%, 88%, 94%, 97%, 100% {
    opacity: 0;
    transform: translateX(0);
  }
  85% {
    opacity: 0.22;
    transform: translateX(-3px);
  }
  86% {
    opacity: 0.13;
    transform: translateX(2px);
  }
  95% {
    opacity: 0.14;
    transform: translateX(2px);
  }
  96% {
    opacity: 0.08;
    transform: translateX(-1px);
  }
}

@keyframes headline-signal {
  0%, 28%, 62%, 100% {
    clip-path: inset(0);
    transform: translateX(0);
    text-shadow: none;
  }
  14% {
    clip-path: inset(18% 0 54% 0);
    transform: translateX(-2px);
    text-shadow: 2px 0 rgba(230, 74, 53, 0.45);
  }
  46% {
    clip-path: inset(62% 0 12% 0);
    transform: translateX(2px);
    text-shadow: -2px 0 rgba(120, 149, 47, 0.45);
  }
  78% {
    clip-path: inset(37% 0 36% 0);
    transform: translateX(-1px);
    text-shadow: 1px 0 rgba(230, 74, 53, 0.3);
  }
}

@keyframes image-signal {
  0%, 24%, 58%, 92%, 100% {
    clip-path: inset(0);
    transform: translateX(0);
    filter: contrast(1.12);
  }
  12% {
    clip-path: inset(12% 0 61% 0);
    transform: translateX(-2px);
    filter: contrast(1.22) drop-shadow(2px 0 rgba(230, 74, 53, 0.32));
  }
  41% {
    clip-path: inset(56% 0 17% 0);
    transform: translateX(2px);
    filter: contrast(1.22) drop-shadow(-2px 0 rgba(120, 149, 47, 0.32));
  }
  75% {
    clip-path: inset(34% 0 39% 0);
    transform: translateX(-1px);
    filter: contrast(1.16);
  }
}

@keyframes control-glitch {
  0%, 100% { clip-path: inset(0); }
  25% {
    clip-path: inset(18% 0 56% 0);
    transform: translate(1px, 2px);
  }
  50% {
    clip-path: inset(58% 0 16% 0);
    transform: translate(3px, 1px);
  }
  75% {
    clip-path: inset(36% 0 38% 0);
    transform: translate(1px, 3px);
  }
}

@keyframes input-scan {
  to { background-position: 0 18px; }
}

@keyframes label-glitch {
  0%, 100% { transform: translateX(0); }
  33% { transform: translateX(-2px); }
  66% { transform: translateX(2px); }
}

@keyframes symbol-reveal {
  0%, 10%, 34%, 58%, 78%, 100% {
    opacity: 0;
    transform: translateX(0);
    text-shadow: none;
  }
  11%, 33% {
    opacity: 0.35;
    transform: translateX(-2px);
    text-shadow: 2px 0 rgba(230, 74, 53, 0.6);
  }
  35%, 57% {
    opacity: 0.9;
    transform: translateX(1px);
    text-shadow: -2px 0 rgba(120, 149, 47, 0.6);
  }
  59%, 77% {
    opacity: 0.5;
    transform: translateX(-1px);
  }
}

@media (max-width: 920px) {
  section[id] { scroll-margin-top: 126px; }

  .site-header .shell {
    flex-wrap: wrap;
    min-height: 64px;
    padding-block: 0.65rem;
    gap: 0.6rem 1rem;
  }

  .main-nav {
    order: 2;
    justify-content: stretch;
    width: 100%;
    margin-left: 0;
    gap: 0;
    border-top: 1px solid var(--line);
  }

  .main-nav a {
    flex: 1;
    padding: 0.55rem 0.3rem;
    text-align: center;
  }

  .practice-list { grid-template-columns: repeat(2, 1fr); }
  .practice-step:last-child { grid-column: 1 / -1; }

  .disk-wall { grid-template-columns: 1fr; }

  .disk-figure {
    width: min(100%, 520px);
    height: auto;
    justify-self: center;
  }

  .disk-photo {
    height: auto;
    aspect-ratio: 1120 / 2000;
    object-fit: contain;
  }
}

@media (max-width: 620px) {
  .shell { width: min(calc(100% - 20px), 1180px); }

  h1 { font-size: clamp(3.1rem, 17vw, 5.2rem); }

  .button-row,
  .button-row .button { width: 100%; }

  .materials { grid-template-columns: 1fr; }
  .material { min-height: 320px; }

  .unlock-cta { grid-template-columns: 1fr; }
  .unlock-title,
  .unlock-file,
  .unlock-copy,
  .unlock-cta .button {
    grid-column: 1;
    grid-row: auto;
  }
  .unlock-cta .button { width: 100%; }

  .practice-list { grid-template-columns: 1fr; }
  .practice-step,
  .practice-step:last-child {
    grid-column: auto;
    min-height: auto;
  }
  .practice-step b { margin-bottom: 1.8rem; }

  .disk-item { grid-template-columns: 64px 1fr; }
  .disk-item .badge {
    grid-column: 2;
    justify-self: start;
  }

  .mail-row { grid-template-columns: 1fr; }
  .mail-row label,
  .mail-row input,
  .mail-row .button { grid-column: 1; }

  .buy-strip .shell,
  .footer-grid { grid-template-columns: 1fr; }
  .buy-strip .button { width: 100%; }
  .symbols { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  body::after,
  .site-header,
  .button-row,
  .buy-strip,
  .site-footer { display: none !important; }

  body {
    color: #000;
    background: #fff;
  }

  .section { border-color: #000; }
}
