/* ============ SHARED STYLES FOR TOPIC PAGES ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --bg: #070c16;
  --bg-soft: #0c1428;
  --bg-card: #101c38;
  --fg: #f3f5fa;
  --muted: #93a0c2;
  --muted-2: #5c6690;
  --accent: #ff3d81;
  --accent-soft: #ff7bab;
  --line: rgba(243, 245, 250, 0.12);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Bricolage Grotesque", "Inter", sans-serif;
  --body-font: "Inter", -apple-system, sans-serif;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body-font);
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.script { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- nav ---- */
.tnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  background: linear-gradient(to bottom, rgba(7,12,22,0.92), transparent);
  backdrop-filter: blur(6px);
}
.tnav-mark { font-family: var(--sans); font-weight: 800; font-size: 19px; }
.tnav-back {
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  color: var(--muted); transition: color 0.2s;
}
.tnav-back:hover { color: var(--accent); }

/* ---- hero ---- */
.thero {
  padding: 170px clamp(20px, 5vw, 64px) 90px;
  max-width: 1240px; margin: 0 auto;
}
.thero-kicker {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 22px;
}
.thero-title {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 6.4rem);
  line-height: 0.94; letter-spacing: -0.035em;
}
.thero-sub {
  color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.6; max-width: 620px; margin-top: 30px;
}
.thero-meta {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px;
}
.thero-meta span {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600;
  color: var(--accent-soft); border: 1px solid var(--line);
  border-radius: 100px; padding: 8px 16px;
}

/* ---- THE STATEMENT: running sentence, key words explode ---- */
.statement {
  padding: 90px clamp(20px, 5vw, 64px);
  max-width: 1240px; margin: 0 auto;
  border-top: 1px solid var(--line);
}
.st-line {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.2vw, 1.9rem);
  color: var(--muted);
  line-height: 1.35;
  margin: 0.35em 0;
}
.st-big {
  display: block;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(3.2rem, 11vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin: 0.06em 0 0.14em;
}
.st-big.is-accent { color: var(--accent); }
.st-big.is-outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}
.st-big.is-serif {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  letter-spacing: -0.01em; color: var(--accent);
}
.st-indent { padding-left: clamp(0px, 8vw, 150px); }
.st-right  { text-align: right; }

/* reveal on scroll */
.reveal-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal-up.in-view { opacity: 1; transform: none; }

/* ---- pillars ---- */
.pillars {
  padding: 90px clamp(20px, 5vw, 64px);
  max-width: 1240px; margin: 0 auto;
  border-top: 1px solid var(--line);
}
.sec-label {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2);
  margin-bottom: 40px;
}
.pillar-list { display: flex; flex-direction: column; }
.pillar {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: clamp(14px, 3vw, 40px);
  padding: 30px 0;
  border-top: 1px solid var(--line);
  align-items: start;
  transition: background 0.3s ease;
}
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar:hover { background: rgba(255,61,129,0.04); }
.pillar-num {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.pillar-name {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.1; letter-spacing: -0.02em;
}
.pillar-desc { color: var(--muted); font-size: 1rem; line-height: 1.6; margin-top: 10px; max-width: 620px; }

/* ---- keyword cloud ---- */
.keywords {
  padding: 90px clamp(20px, 5vw, 64px);
  max-width: 1240px; margin: 0 auto;
  border-top: 1px solid var(--line);
}
.kw-cloud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; }
.kw {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(1.1rem, 2.6vw, 2.2rem);
  letter-spacing: -0.015em;
  color: var(--muted); padding: 0 0.42em;
  transition: color 0.25s ease;
  white-space: nowrap;
}
.kw:hover { color: var(--fg); }
.kw::after { content: "·"; margin-left: 0.85em; color: var(--line); font-weight: 400; }
.kw:last-child::after { content: ""; }
.kw:nth-child(3n) { color: var(--fg); }
.kw:nth-child(5n) { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent-soft); font-size: 1.15em; }

/* ---- photo strip ---- */
.tshots {
  padding: 40px 0 90px;
  border-top: 1px solid var(--line);
  margin-top: 50px;
}
.tshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 50px clamp(20px, 5vw, 64px) 0;
  max-width: 1240px; margin: 0 auto;
}
.tshot {
  position: relative; border-radius: 14px; overflow: hidden; margin: 0;
}
.tshot img {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3;
  filter: grayscale(0.3) brightness(0.85);
  transition: filter 0.5s ease, transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.tshot:hover img { filter: none; transform: scale(1.05); }
.tshot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px;
  font-family: var(--sans); font-weight: 700; font-size: 0.85rem;
  background: linear-gradient(to top, rgba(4,7,16,0.9), transparent);
}

/* ---- formats ---- */
.formats {
  padding: 90px clamp(20px, 5vw, 64px);
  max-width: 1240px; margin: 0 auto;
  border-top: 1px solid var(--line);
}
.format-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 18px; }
.format-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 28px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.format-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.format-card h3 { font-family: var(--sans); font-weight: 700; font-size: 1.2rem; margin-bottom: 8px; }
.format-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.format-card .fc-meta { color: var(--accent-soft); font-size: 0.8rem; font-weight: 600; margin-top: 14px; display: block; }

/* ---- CTA ---- */
.tcta {
  padding: 100px clamp(20px, 5vw, 64px) 120px;
  max-width: 1240px; margin: 0 auto;
  border-top: 1px solid var(--line);
  text-align: center;
}
.tcta h2 {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 18px;
}
.tcta p { color: var(--muted); max-width: 460px; margin: 0 auto 32px; line-height: 1.6; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 30px; border-radius: 100px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  transition: transform 0.25s ease, background 0.25s ease;
}
.btn-solid { background: var(--accent); color: #0a0f1e; }
.btn-solid:hover { transform: translateY(-2px); background: var(--accent-soft); }
.btn-outline { border: 1px solid var(--line); color: var(--fg); margin-left: 10px; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.tfooter {
  padding: 34px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 13px; color: var(--muted-2);
}

/* ---- other topics ---- */
.othertopics { padding: 0 clamp(20px,5vw,64px) 80px; max-width:1240px; margin:0 auto; }
.ot-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; }
.ot-card { border:1px solid var(--line); border-radius:14px; padding:22px; transition:border-color .25s, transform .25s; }
.ot-card:hover { border-color:var(--accent); transform:translateY(-3px); }
.ot-card span { font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted-2); font-family:var(--sans); font-weight:700; }
.ot-card h4 { font-family:var(--sans); font-weight:700; font-size:1.1rem; margin-top:8px; }

@media (max-width: 820px) {
  .tshots-grid { grid-template-columns: 1fr; }
  .st-indent { padding-left: 0; }
  .st-right { text-align: left; }
  .pillar { grid-template-columns: 44px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-up { opacity: 1; transform: none; transition: none; }
}

/* ============ CHAPTERS: full-screen scroll panels ============ */
.chapters {
  position: relative;
  scroll-snap-type: y proximity;
}
.chapter {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  scroll-snap-align: center;
  isolation: isolate;
}
.ch-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.ch-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transform: scale(1.18);
  filter: grayscale(0.55) brightness(0.42);
  transition: transform 1.2s cubic-bezier(0.16,1,0.3,1), filter 1.2s ease;
  will-change: transform;
}
.chapter.in-view .ch-media img {
  transform: scale(1);
  filter: grayscale(0.15) brightness(0.55);
}
.ch-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255,61,129,0.16), transparent 70%),
    linear-gradient(to bottom, var(--bg) 0%, rgba(7,12,22,0.45) 22%, rgba(7,12,22,0.45) 78%, var(--bg) 100%);
}
.ch-inner {
  position: relative;
  text-align: center;
  padding: 0 clamp(20px, 5vw, 64px);
  max-width: 1100px;
}
.ch-index {
  font-family: var(--sans); font-size: 12px; font-weight: 800;
  letter-spacing: 0.24em; color: var(--accent);
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s ease .05s, transform .7s cubic-bezier(0.16,1,0.3,1) .05s;
}
.ch-word {
  display: block;
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(3.4rem, 14vw, 11rem);
  line-height: 0.86; letter-spacing: -0.045em;
  margin: 0.12em 0 0.16em;
  opacity: 0; transform: translateY(38px) scale(0.94);
  transition: opacity .9s cubic-bezier(0.16,1,0.3,1) .1s, transform 1s cubic-bezier(0.16,1,0.3,1) .1s;
}
.ch-word.is-outline { color: transparent; -webkit-text-stroke: 2px var(--fg); }
.ch-word.is-accent  { color: var(--accent); }
.ch-line {
  display: block;
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.6rem);
  color: var(--muted); line-height: 1.4;
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s ease .28s, transform .8s cubic-bezier(0.16,1,0.3,1) .28s;
}
.chapter.in-view .ch-index,
.chapter.in-view .ch-word,
.chapter.in-view .ch-line { opacity: 1; transform: none; }

/* scroll progress rail, like the reference */
.ch-rail {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 300;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width .12s linear;
}
.ch-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.ch-cue::after {
  content: ""; width: 1px; height: 30px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: cue-drop 1.8s ease-in-out infinite;
}
@keyframes cue-drop {
  0%,100% { transform: scaleY(0.4); transform-origin: top; opacity: .4; }
  50%     { transform: scaleY(1);   transform-origin: top; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .chapters { scroll-snap-type: none; }
  .ch-index, .ch-word, .ch-line { opacity: 1 !important; transform: none !important; transition: none; }
  .ch-media img { transform: none; transition: none; }
  .ch-cue::after { animation: none; }
}

/* ============ CURSOR-REACTIVE MOTION ============ */
.ltr {
  display: inline-block;
  will-change: transform;
  transition: transform .45s cubic-bezier(0.16,1,0.3,1);
}
/* keep the outline treatment working per-letter */
.ch-word.is-outline .ltr,
.st-big.is-outline .ltr { color: inherit; -webkit-text-stroke: inherit; }

/* floating keyword words in the topic hero */
.thero { position: relative; }
.thero-inner { position: relative; z-index: 2; }
.hero-float {
  position: absolute;
  top: 96px; right: 0; bottom: 10px;
  width: min(40%, 520px);
  pointer-events: none;
  z-index: 1;
}
/* keep hero copy clear of the floating words on desktop */
@media (min-width: 901px) {
  .thero-inner { max-width: 620px; }
}
.hf-chip {
  position: absolute;
  pointer-events: auto;
  cursor: default;
  white-space: nowrap;
  transform-origin: center;
  color: var(--accent-soft);
  transition: transform .8s cubic-bezier(0.16,1,0.3,1), color .35s ease, -webkit-text-stroke-color .35s ease;
  animation: hf-bob 7s ease-in-out infinite;
  line-height: 1;
}

/* each word gets its own voice */
.hf-chip:nth-child(7n+1) {           /* tall condensed */
  font-family: "Anton", var(--sans);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 3.1rem);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  color: var(--fg);
}
.hf-chip:nth-child(7n+2) {           /* editorial italic */
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 3.3rem);
  color: var(--accent);
}
.hf-chip:nth-child(7n+3) {           /* outlined heavy */
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.9vw, 2.6rem);
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent-soft);
}
.hf-chip:nth-child(7n+4) {           /* technical mono */
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: clamp(0.85rem, 1.5vw, 1.25rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.hf-chip:nth-child(7n+5) {           /* solid statement */
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.1vw, 2.8rem);
  letter-spacing: -0.025em;
  color: var(--accent-soft);
}
.hf-chip:nth-child(7n+6) {           /* small caps label */
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(0.78rem, 1.3vw, 1.05rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.hf-chip:nth-child(7n+7) {           /* tall condensed, tilted */
  font-family: "Anton", var(--sans);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.1vw, 2.9rem);
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
}

/* hover: zoom in, release: settle back */
.hf-chip:hover {
  color: var(--accent);
  -webkit-text-stroke-color: var(--accent);
  z-index: 5;
  transition: transform .32s cubic-bezier(0.34,1.56,0.64,1), color .2s ease;
}
.hf-chip:nth-child(7n+1):hover,
.hf-chip:nth-child(7n+7):hover { color: var(--accent); }

@keyframes hf-bob {
  0%,100% { margin-top: 0; }
  50%     { margin-top: -14px; }
}

@media (max-width: 900px) {
  .hero-float { display: none; }
  .ltr { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ltr { transition: none; transform: none !important; }
  .hf-chip { animation: none; transition: none; }
}

/* a split word must never break between its own letters */
.wrd {
  display: inline-block;
  white-space: nowrap;
}
