/* ─────────────────────────────────────────────────────────────────────────
   Network Mythology — About page
   "Structurally precise but emotionally warm. Dark without being heavy."
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Theme tokens — overwritten by JS from Tweaks */
  --nm-bg-deep: #0a0710;
  --nm-bg-warm: #2a0e1c;
  --nm-ink: #ede1d1;
  --nm-ink-soft: #cdbfae;
  --nm-ink-faint: #8a7f73;
  --nm-rose: #c94560;
  --nm-rose-glow: #e07585;
  --nm-node: #f0e3d2;
  --nm-node-cool: #b8c4d4;
  --nm-rule: rgba(237, 225, 209, 0.12);
  --nm-card: rgba(237, 225, 209, 0.04);

  --nm-display: "Cormorant Garamond", "EB Garamond", "Cardo", Georgia, serif;
  --nm-body: "Cardo", "EB Garamond", Georgia, serif;
  --nm-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--nm-bg-deep);
  color: var(--nm-ink);
  font-family: var(--nm-body);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

/* ── Typography ────────────────────────────────────────────────────────── */

.nm-display {
  font-family: var(--nm-display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.04;
}

.nm-smallcaps {
  font-family: var(--nm-display);
  font-variant: small-caps;
  letter-spacing: 0.32em;
  text-transform: lowercase;
  font-weight: 500;
}

.nm-eyebrow {
  font-family: var(--nm-display);
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--nm-ink-faint);
  font-weight: 500;
}

.nm-pull {
  font-family: var(--nm-display);
  font-style: italic;
  font-size: 1.4em;
  line-height: 1.3;
  color: var(--nm-ink);
}

.nm-fragment {
  font-family: var(--nm-display);
  font-style: italic;
  color: var(--nm-rose-glow);
}

/* ── Layout ───────────────────────────────────────────────────────────── */

.nm-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.nm-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 32px;
}

.nm-shell-narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.nm-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 32px 60px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 80%, rgba(150, 30, 60, 0.32) 0%, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(30, 10, 25, 0.6) 0%, transparent 60%),
    var(--nm-bg-deep);
}

.nm-hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.nm-hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.nm-hero-mark {
  font-family: var(--nm-display);
  font-size: 13px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--nm-ink-soft);
  margin-bottom: 80px;
  opacity: 0.78;
}

.nm-hero-mark::before,
.nm-hero-mark::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: rgba(237, 225, 209, 0.4);
  vertical-align: middle;
  margin: 0 18px;
}

.nm-hero-title {
  font-family: var(--nm-display);
  font-size: clamp(48px, 7.5vw, 96px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.012em;
  margin: 0 0 28px;
  color: var(--nm-ink);
  text-wrap: balance;
}

.nm-hero-title em {
  font-style: italic;
  color: var(--nm-rose-glow);
  font-weight: 300;
}

.nm-hero-sub {
  font-family: var(--nm-display);
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--nm-ink-soft);
  letter-spacing: 0.04em;
  margin: 0;
  max-width: 540px;
  margin-inline: auto;
  text-wrap: balance;
  opacity: 0.84;
}

.nm-hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--nm-display);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(237, 225, 209, 0.4);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.nm-hero-scroll::after {
  content: "";
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(237, 225, 209, 0.4), transparent);
  animation: nm-pulse 2.4s ease-in-out infinite;
}

@keyframes nm-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Narrow screens: a shorter cue, tucked lower, so the "you" node has room
   between the subtitle and the cue. */
@media (max-width: 720px) {
  .nm-hero-scroll { bottom: 12px; }
  .nm-hero-scroll::after { height: 20px; }
}

/* ── Hero: linked stars ────────────────────────────────────────────────────
   Links that ride on the constellation's top stars, one per published
   issue. The constellation positions them every frame. When the hero is
   hovered or a star has focus, each star blooms into a disc holding the
   issue's image, or its numeral until it has one. Hovering or focusing a
   disc names the issue beneath it. Colours are
   literal because the hero stays dark in every theme. */
.nm-star-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.nm-star {
  --nm-star-size: 48px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--nm-star-size);
  height: var(--nm-star-size);
  margin: calc(var(--nm-star-size) / -2) 0 0 calc(var(--nm-star-size) / -2);
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  will-change: transform;
}

.nm-star:hover,
.nm-star:focus-visible { z-index: 1; }

.nm-star-disc {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid #e07585;
  background: #0a0710;
  opacity: 0;
  transform: scale(0.35);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(.2,.7,.3,1);
}

.nm-star-disc img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nm-star-numeral {
  font-family: var(--nm-display);
  font-style: italic;
  font-size: 20px;
  line-height: 1;
  color: #ede1d1;
}

.nm-hero:hover .nm-star-disc,
.nm-star-layer:focus-within .nm-star-disc {
  opacity: 1;
  transform: none;
}

.nm-star:hover .nm-star-disc,
.nm-star:focus-visible .nm-star-disc {
  opacity: 1;
  transform: scale(1.12);
}

.nm-star:focus-visible .nm-star-disc {
  outline: 1px solid #e07585;
  outline-offset: 4px;
}

.nm-star-label {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  width: max-content;
  max-width: min(220px, 60vw);
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.nm-star[data-side="right"] .nm-star-label {
  left: auto;
  right: 0;
  text-align: right;
  align-items: flex-end;
}

.nm-star[data-side="center"] .nm-star-label {
  left: 50%;
  transform: translate(-50%, -6px);
  text-align: center;
  align-items: center;
}

/* A patch of night behind the label, so it never fights the headline it
   may reach. */
.nm-star-label::before {
  content: "";
  position: absolute;
  inset: -10px -14px;
  z-index: -1;
  background: #0a0710;
  opacity: 0.9;
}

.nm-star:hover .nm-star-label,
.nm-star:focus-visible .nm-star-label {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.nm-star[data-side="center"]:hover .nm-star-label,
.nm-star[data-side="center"]:focus-visible .nm-star-label {
  transform: translate(-50%, 0);
}

.nm-star-kicker {
  font-family: var(--nm-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #cdbfae;
}

.nm-star-title {
  font-family: var(--nm-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.15;
  color: #e07585;
}

.nm-star-dek {
  font-family: var(--nm-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.35;
  color: #cdbfae;
}

.nm-star-open {
  margin-top: 2px;
  font-family: var(--nm-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ede1d1;
}

/* No hover on touch screens: keep the discs showing */
@media (hover: none) {
  .nm-star-disc {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .nm-star { --nm-star-size: 40px; }
  .nm-star-numeral { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .nm-star-disc,
  .nm-star-label { transition: none; }
}

/* ── Section base ─────────────────────────────────────────────────────── */

.nm-section {
  position: relative;
  padding: 120px 32px;
}

.nm-section-divider {
  text-align: center;
  font-size: 18px;
  letter-spacing: 1.2em;
  color: var(--nm-rose);
  padding: 60px 0;
  user-select: none;
  opacity: 0.7;
}

.nm-section-divider::before { content: "·  ·  ·"; }

.nm-section-eyebrow {
  text-align: center;
  margin-bottom: 24px;
}

.nm-section-title {
  font-family: var(--nm-display);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 400;
  text-align: center;
  margin: 0 0 56px;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

.nm-section-title em {
  font-style: italic;
  color: var(--nm-rose-glow);
}

.nm-section-prose p {
  margin: 0 0 1.4em;
  text-wrap: pretty;
}

.nm-section-prose p:last-child { margin-bottom: 0; }

/* drop cap on first letter of first paragraph */
.nm-section-prose > p:first-of-type::first-letter {
  font-family: var(--nm-display);
  float: left;
  font-size: 4.2em;
  line-height: 0.86;
  padding: 0.06em 0.12em 0 0;
  font-weight: 400;
  color: var(--nm-rose-glow);
}

/* ── Intro / opening ──────────────────────────────────────────────────── */

.nm-intro-stanza {
  font-family: var(--nm-display);
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.35;
  font-style: italic;
  color: var(--nm-ink-soft);
  text-align: center;
  margin: 0 0 36px;
  text-wrap: balance;
}

.nm-intro-stanza strong {
  font-style: normal;
  color: var(--nm-ink);
  font-weight: 400;
}

/* ── Proximity walkthrough ────────────────────────────────────────────── */

.nm-proximity {
  background:
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(80, 20, 40, 0.18) 0%, transparent 70%),
    var(--nm-bg-deep);
  padding: 140px 32px;
  position: relative;
  overflow: hidden;
}

.nm-prox-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.nm-prox-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 4px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(180, 50, 80, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse at 50% 50%, rgba(20, 8, 16, 0.6) 0%, transparent 80%);
  overflow: hidden;
}

.nm-prox-stage canvas { width: 100%; height: 100%; display: block; }

.nm-prox-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 460px;
}

.nm-prox-step {
  border-left: 1px solid var(--nm-rule);
  padding: 0 0 0 24px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(.2,.7,.3,1);
  opacity: 0.45;
}

.nm-prox-step.is-active {
  opacity: 1;
  border-left-color: var(--nm-rose);
}

.nm-prox-step:hover { opacity: 0.85; }
.nm-prox-step.is-active:hover { opacity: 1; }

.nm-prox-tag {
  font-family: var(--nm-display);
  font-size: 11px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--nm-rose);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.nm-prox-tag .nm-prox-num {
  font-size: 10px;
  color: var(--nm-ink-faint);
  letter-spacing: 0.2em;
}

.nm-prox-step-title {
  font-family: var(--nm-display);
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 10px;
  font-weight: 400;
  color: var(--nm-ink);
}

.nm-prox-step-body {
  font-size: 15.5px;
  color: var(--nm-ink-soft);
  line-height: 1.55;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(.2,.7,.3,1), margin-top 0.5s;
  margin-top: 0;
}

.nm-prox-step.is-active .nm-prox-step-body {
  max-height: 360px;
  margin-top: 8px;
}

.nm-prox-step-body em {
  font-style: italic;
  color: var(--nm-ink);
}

.nm-prox-step-body .nm-path-line {
  display: block;
  font-family: var(--nm-display);
  font-style: italic;
  color: var(--nm-ink-soft);
  line-height: 1.9;
}

.nm-prox-step-body .nm-path-line::before {
  content: "↓ ";
  color: var(--nm-rose);
  margin-right: 6px;
  font-style: normal;
}
.nm-prox-step-body .nm-path-line:first-child::before { content: ""; }

.nm-prox-step-body .nm-path-line:last-child {
  color: var(--nm-rose-glow);
  font-style: italic;
}

.nm-prox-nav {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-left: 24px;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.nm-btn {
  font-family: var(--nm-display);
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  padding: 16px 32px;
  border: 1px solid var(--nm-rose);
  background: transparent;
  color: var(--nm-ink);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.nm-btn:hover {
  background: var(--nm-rose);
  color: #fff;
}

.nm-btn-ghost {
  border-color: var(--nm-rule);
  color: var(--nm-ink-soft);
}

.nm-btn-ghost:hover {
  border-color: var(--nm-rose);
  color: var(--nm-ink);
  background: transparent;
}

.nm-btn-solid {
  background: var(--nm-rose);
  color: #fff;
  border-color: var(--nm-rose);
}

.nm-btn-solid:hover {
  background: var(--nm-rose-glow);
  border-color: var(--nm-rose-glow);
  color: #fff;
}

/* ── Why Subscribe ────────────────────────────────────────────────────── */

.nm-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 56px;
  background: var(--nm-rule);
  border: 1px solid var(--nm-rule);
}

.nm-tier {
  padding: 36px 36px 40px;
  background: var(--nm-bg-deep);
  position: relative;
}

.nm-tier-mark {
  font-family: var(--nm-display);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--nm-ink-faint);
  margin-bottom: 14px;
}

.nm-tier h3 {
  font-family: var(--nm-display);
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 18px;
  line-height: 1.1;
}

.nm-tier h3 em { font-style: italic; color: var(--nm-rose-glow); }

.nm-tier ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nm-tier li {
  font-size: 15.5px;
  color: var(--nm-ink-soft);
  padding: 8px 0 8px 22px;
  position: relative;
  line-height: 1.5;
  border-top: 1px solid var(--nm-rule);
}

.nm-tier li:first-child { border-top: 0; }

.nm-tier li::before {
  content: "·";
  color: var(--nm-rose);
  position: absolute;
  left: 4px;
  top: 8px;
  font-size: 24px;
  line-height: 1;
}

/* ── Become a Spark CTA ───────────────────────────────────────────────── */

.nm-spark {
  position: relative;
  text-align: center;
  padding: 160px 32px;
  background:
    radial-gradient(circle at 50% 50%, rgba(180, 60, 90, 0.18) 0%, transparent 60%),
    var(--nm-bg-deep);
  overflow: hidden;
}

.nm-spark canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

.nm-spark-inner { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }

.nm-spark-eyebrow {
  font-family: var(--nm-display);
  font-size: 12px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--nm-rose);
  margin-bottom: 28px;
}

.nm-spark h2 {
  font-family: var(--nm-display);
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 400;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

.nm-spark h2 em { font-style: italic; color: var(--nm-rose-glow); }

.nm-spark-body {
  font-family: var(--nm-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--nm-ink-soft);
  margin: 0 auto 44px;
  max-width: 520px;
  text-wrap: balance;
}

/* ── Bio ─────────────────────────────────────────────────────────────── */

.nm-bio {
  padding: 120px 32px 80px;
  text-align: center;
}

.nm-bio-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: block;
  border: 1px solid var(--nm-rule);
  background: var(--nm-bg-deep);
}

.nm-bio-name {
  font-family: var(--nm-display);
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.nm-bio-mark {
  font-family: var(--nm-display);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--nm-ink-faint);
  margin-bottom: 24px;
}

.nm-bio-text {
  font-size: 16.5px;
  color: var(--nm-ink-soft);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
  text-wrap: pretty;
}

.nm-footer {
  text-align: center;
  padding: 60px 32px 40px;
  color: var(--nm-ink-faint);
  font-family: var(--nm-display);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  border-top: 1px solid var(--nm-rule);
}

.nm-footer span { color: var(--nm-rose); margin: 0 8px; }

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .nm-prox-grid { grid-template-columns: 1fr; gap: 40px; }
  .nm-tiers { grid-template-columns: 1fr; }
  .nm-section { padding: 80px 24px; }
  .nm-proximity { padding: 90px 24px; }
}

/* ── Light/cream mode (Literary direction) ───────────────────────────── */

.nm-light .nm-section,
.nm-light .nm-proximity,
.nm-light .nm-spark,
.nm-light .nm-bio,
.nm-light .nm-footer { background-color: var(--nm-bg-light, #f5f0e8); color: #1a0a14; }

.nm-light {
  --nm-ink: #1a0a14;
  --nm-ink-soft: #4a2a32;
  --nm-ink-faint: #8a7080;
  --nm-rule: rgba(26, 10, 20, 0.14);
  --nm-card: rgba(26, 10, 20, 0.04);
  --nm-node: #1a0a14;
}

.nm-light .nm-tier { background: var(--nm-bg-light, #f5f0e8); }
.nm-light .nm-prox-stage {
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(201, 69, 96, 0.16) 0%, transparent 70%),
    rgba(255,255,255,0.4);
}

/* Hero always stays dark for brand consistency */
