:root {
  --bg: #000000;
  --bg-lift: #070707;
  --panel: #0a0a0a;
  --text: #f4f4f4;
  --muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.14);
  --glow: rgba(255, 255, 255, 0.55);
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 50% at 50% 18%, rgba(255, 255, 255, 0.05), transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 90%, rgba(255, 255, 255, 0.03), transparent 50%),
    var(--bg);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    transparent 12%,
    transparent 88%,
    rgba(0, 0, 0, 0.45)
  );
}

.noise,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.noise {
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

.scanlines {
  opacity: 0.07;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(255, 255, 255, 0.035) 3px,
    transparent 4px
  );
}

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

/* Brand mark: circle / triangle / pupil */
.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 1.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  clip-path: polygon(50% 8%, 92% 88%, 8% 88%);
  border: 1.5px solid transparent;
  background:
    linear-gradient(#000, #000) padding-box,
    linear-gradient(#fff, #fff) border-box;
  box-shadow: inset 0 0 0 1.5px #fff;
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -35%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

.brand-mark-lg {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
}

.brand-mark-lg::after {
  width: 8px;
  height: 8px;
}

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(220px, 50%);
  margin: 22px auto 0;
}

.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
}

.rule span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
}

.rule-left {
  margin-left: 0;
  margin-right: auto;
  justify-content: flex-start;
}

.rule-left::before { display: none; }
.rule-left::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.45), transparent);
}

.eyebrow {
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

/* ——— Home hero ——— */
.page-home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hero {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(48px, 8vh, 96px) 20px 40px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  width: min(520px, 80vw);
  height: min(520px, 80vw);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  top: 42%;
  left: 50%;
  transform: translate(-50%, -55%);
  pointer-events: none;
  animation: pulse-ring 7s ease-in-out infinite;
}

.hero-stage {
  width: min(720px, 100%);
  position: relative;
  z-index: 1;
}

.hero-logo-wrap {
  position: relative;
  margin: 0 auto;
  width: min(420px, 92%);
  filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.12));
  animation: logo-breathe 5.5s ease-in-out infinite;
}

.hero-logo {
  display: block;
  width: 100%;
  height: auto;
}

.signal-block {
  margin-top: clamp(28px, 5vh, 48px);
}

.count-label {
  margin: 0 0 8px;
  color: var(--muted);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.count {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: clamp(3.8rem, 14vw, 7.2rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: #fff;
  text-shadow:
    0 0 24px rgba(255, 255, 255, 0.35),
    0 0 60px rgba(255, 255, 255, 0.12);
  animation: count-glitch 6s steps(1) infinite;
}

.hero-copy {
  width: min(520px, 100%);
  margin: 28px auto 0;
  line-height: 1.7;
  color: var(--muted);
  font-size: clamp(1rem, 2.1vw, 1.12rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.button-row-start {
  justify-content: flex-start;
}

.btn {
  appearance: none;
  border: 1px solid #fff;
  background: #fff;
  color: #000;
  min-height: 50px;
  padding: 14px 28px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px #fff,
    0 0 28px rgba(255, 255, 255, 0.28);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}

.btn.secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.12);
}

.observer-result {
  display: none;
  margin-top: 28px;
}

.observer-result.show { display: block; }

.observer-result-inner {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.03);
}

.observer-number {
  color: #fff;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}

.observer-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reclaim-launch {
  margin: 18px 0 0;
}

.text-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-link:hover {
  color: #fff;
}

.reclaim-panel {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.reclaim-panel[hidden] {
  display: none;
}

.reclaim-label {
  margin: 0 0 8px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.reclaim-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.reclaim-copy.is-error {
  color: #ffb4b4;
}

.reclaim-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reclaim-input {
  flex: 1 1 120px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.reclaim-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* ——— Nav ——— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.nav-wordmark {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links a {
  text-decoration: none;
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #fff;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-observer {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.nav-observer[hidden] {
  display: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-icon { position: relative; }

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ——— Interior pages ——— */
.page {
  padding: 64px 0 88px;
  position: relative;
  z-index: 1;
}

.page h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0 0 8px;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.08);
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
  margin-top: 22px;
}

.lead em {
  color: #fff;
  font-style: normal;
  letter-spacing: 0.04em;
}

.video-wrap {
  margin-top: 40px;
  aspect-ratio: 16/9;
  border: 1px solid var(--line);
  background: #000;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 30px 80px rgba(0, 0, 0, 0.65);
}

.video-wrap.is-short {
  aspect-ratio: 9/16;
  width: min(360px, 100%);
  margin-inline: auto;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.section-title {
  margin-top: 72px;
  margin-bottom: 12px;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  letter-spacing: -0.03em;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.book-card {
  padding: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035), transparent 55%), var(--panel);
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0.5;
}

.book-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(255, 255, 255, 0.05);
}

.book-card .kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.book-card h2 {
  margin: 14px 0 10px;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.book-card p {
  color: var(--muted);
  line-height: 1.65;
  min-height: 72px;
  margin: 0 0 18px;
}

.book-card a {
  display: inline-block;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  padding-bottom: 2px;
}

.book-card a:hover {
  border-bottom-color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

.book-card.is-featured {
  border-color: rgba(255, 255, 255, 0.32);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.08), transparent 50%),
    var(--panel);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.03);
}

.book-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.free-offer {
  margin-top: 36px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 48%),
    var(--panel);
  position: relative;
}

.free-offer::after {
  content: "";
  position: absolute;
  inset: auto 10% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.free-offer-label {
  margin: 0 0 10px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
}

.free-offer-copy {
  margin: 0 0 22px;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.65;
}

.free-offer-copy em {
  color: #fff;
  font-style: normal;
}

.free-offer .btn {
  width: auto;
}

/* ——— Engage band (seamless with PNG black) ——— */
.engage-band {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #000;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.engage-link {
  display: block;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  text-decoration: none;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.engage-link:hover {
  filter: brightness(1.08);
}

.engage-banner {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.footer {
  position: relative;
  z-index: 1;
  padding: 28px 0 48px;
  background: #000;
  color: var(--muted);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.footer .rule {
  margin-bottom: 18px;
}

.footer-copy {
  margin: 0 auto;
  max-width: 520px;
  line-height: 1.7;
}

/* Motion */
.reveal {
  animation: rise-in 0.9s ease both;
}

.hero-logo-wrap.reveal { animation-delay: 0.08s; }
.signal-block.reveal { animation-delay: 0.18s; }
.hero-copy.reveal { animation-delay: 0.28s; }
.button-row.reveal { animation-delay: 0.38s; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logo-breathe {
  0%, 100% { filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.1)); }
  50% { filter: drop-shadow(0 0 36px rgba(255, 255, 255, 0.22)); }
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.35; transform: translate(-50%, -55%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -55%) scale(1.04); }
}

@keyframes count-glitch {
  0%, 92%, 100% {
    transform: none;
    text-shadow:
      0 0 24px rgba(255, 255, 255, 0.35),
      0 0 60px rgba(255, 255, 255, 0.12);
  }
  93% {
    transform: translate(-2px, 1px);
    text-shadow: 2px 0 rgba(255, 255, 255, 0.5), -2px 0 rgba(180, 180, 180, 0.4);
  }
  95% {
    transform: translate(2px, -1px);
    text-shadow: -2px 0 rgba(255, 255, 255, 0.45), 2px 0 rgba(160, 160, 160, 0.35);
  }
  97% { transform: none; }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(1080px, calc(100% - 28px));
  }

  .hero {
    padding: 36px 16px 28px;
  }

  .hero-logo-wrap {
    width: min(340px, 96%);
  }

  .page {
    padding: 40px 0 64px;
  }

  .lead {
    font-size: 1rem;
  }

  .section-title {
    margin-top: 48px;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-card {
    padding: 22px;
  }

  .book-card p {
    min-height: 0;
  }

  .nav {
    flex-wrap: wrap;
    min-height: 60px;
    padding-block: 8px;
  }

  .nav-brand {
    flex: 1;
    min-width: 0;
  }

  .nav-wordmark {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
    margin-top: 4px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-observer {
    order: -1;
    margin-bottom: 8px;
    text-align: center;
    width: 100%;
  }

  .reclaim-row .btn,
  .button-row .btn,
  .free-offer .btn {
    width: 100%;
    text-align: center;
  }

  .free-offer {
    padding: 22px;
  }

  .book-card-links {
    flex-direction: column;
    gap: 12px;
  }

  .engage-link {
    max-width: 100%;
  }

  .footer {
    padding: 22px 0 36px;
  }
}

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