/* ============================================================
   nachtkamp, gear on dark ground
   NATURE vzw prototype, direction 2. 2026-09-01.
   Ground is night. Light is the interaction language.
   ============================================================ */

@view-transition { navigation: auto; }

/* ---------- 1. Tokens ---------- */
:root {
  --night:      #0A0E0C;
  --night-deep: #060908;
  --surface:    #101714;
  --surface-2:  #16211C;
  --raised:     #1B2721;
  --line:       rgba(233, 244, 238, 0.13);
  --line-soft:  rgba(233, 244, 238, 0.07);

  --ink:        #E9F4EE;
  --ink-2:      #B6C7BD;
  --ink-3:      #8CA096;

  --cyan:       #44B4D4;
  --cyan-soft:  rgba(68, 180, 212, 0.16);
  --olive:      #B3B200;
  --olive-soft: rgba(179, 178, 0, 0.16);
  --red:        #C31428;
  --magenta:    #BD0BB1;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --shell: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 14px;
  --radius-lg: 22px;

  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.62;
  font-weight: 400;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  /* the sky never fully leaves the night */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 78% -10%, rgba(68, 180, 212, 0.09), transparent 60%),
    radial-gradient(90% 60% at 8% 4%, rgba(179, 178, 0, 0.05), transparent 62%);
}

img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 1.2rem + 5.4vw, 5.1rem); }
h2 { font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--cyan); text-underline-offset: 0.22em; }

::selection { background: var(--cyan); color: var(--night-deep); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.lead {
  font-size: clamp(1.06rem, 1rem + 0.5vw, 1.3rem);
  color: var(--ink-2);
  max-width: 54ch;
  line-height: 1.55;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 1.7rem;
  height: 1px;
  background: var(--cyan);
  flex: none;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.brk { color: var(--cyan); font-weight: 500; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

section { position: relative; z-index: 1; }

.section-pad { padding-block: clamp(4rem, 9vw, 8.5rem); }

/* ---------- 3. Accessibility furniture ---------- */
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--cyan);
  color: var(--night-deep);
  font-weight: 700;
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.hub-chip {
  /* deviation: bottom-left instead of top-left, so it never sits on the logo */
  position: fixed;
  bottom: 0.7rem;
  left: 0.7rem;
  z-index: 120;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  background: rgba(6, 9, 8, 0.75);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  backdrop-filter: blur(8px);
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}
.hub-chip:hover { color: var(--ink); border-color: var(--cyan); }

/* ---------- 4. The intro moment: the knot draws itself ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--night-deep);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.1rem;
}
.intro[hidden] { display: none; }
.intro-knot { width: min(150px, 34vw); }
.intro-knot path {
  /* paths carry pathLength="1" so the dash maths stays simple */
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.intro-word {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0;
}
.intro-skip {
  position: absolute;
  bottom: 1.6rem;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  background: none;
  border: 0;
  padding: 0.6rem 1rem;
  cursor: pointer;
  min-height: 24px;
}

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 10, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
  view-transition-name: site-header;
}

.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
  padding-block: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  view-transition-name: brand;
}
.brand img.knot { width: 34px; height: auto; }
.brand img.word {
  width: clamp(78px, 9vw, 100px);
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.brand:hover img.knot { transform: rotate(-4deg); }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(0.9rem, 2.4vw, 2rem);
  margin: 0;
  padding: 0;
  align-items: center;
}
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  padding: 0.5rem 0;
  min-height: 24px;
  display: inline-block;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.15rem;
  height: 1.5px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: right;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.site-nav a[aria-current="page"]::after { background: var(--olive); }

/* ---------- 6. Buttons, chips, status ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.85rem 1.4rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  isolation: isolate;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--lamp {
  background: var(--cyan);
  color: #04100F;
  box-shadow: 0 0 0 rgba(68, 180, 212, 0);
}
.btn--lamp:hover {
  box-shadow: 0 10px 40px -8px rgba(68, 180, 212, 0.65);
  transform: translateY(-2px);
}
.btn--ghost {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(233, 244, 238, 0.03);
}
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn--olive { background: var(--olive); color: #0D0D00; }
.btn--olive:hover { box-shadow: 0 10px 40px -8px rgba(179, 178, 0, 0.5); transform: translateY(-2px); }

.chip-dur {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  margin: 0;
  min-height: 24px;
}
.status-mark {
  width: 12px; height: 12px;
  flex: none;
  display: inline-block;
}
/* status = word + shape, never colour alone */
.status--open { color: var(--cyan); }
.status--open .status-mark {
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px var(--cyan-soft);
}
.status--soon { color: var(--olive); }
.status--soon .status-mark {
  border-radius: 50%;
  border: 2px dashed var(--olive);
}
.status--past { color: var(--ink-3); }
.status--past .status-mark {
  background: linear-gradient(135deg, transparent 44%, var(--ink-3) 44%, var(--ink-3) 56%, transparent 56%);
  border: 1px solid var(--line);
  border-radius: 3px;
}

/* ---------- 7. Contour layer ---------- */
.contours {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  color: var(--cyan);
  opacity: 0.16;
  z-index: 0;
}
.contours--top { inset: 0 0 auto 0; transform: scaleY(-1); }

/* ---------- 8. Hero, with the headlamp ---------- */
.hero {
  position: relative;
  min-height: min(92svh, 900px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  --lamp-x: 50%;
  --lamp-y: 44%;
  --lamp-r: 300px;
}

.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img, .hero-media video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
}
.hero-media img { z-index: 1; }
.hero-media video { z-index: 2; }

/* one video, one veil. The lamp is a hole cut in the veil. */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(6, 9, 8, 0.62);
  backdrop-filter: brightness(0.5) saturate(0.55);
  -webkit-mask-image: radial-gradient(circle var(--lamp-r) at var(--lamp-x) var(--lamp-y),
      transparent 0%, rgba(0,0,0,0.22) 40%, #000 78%);
  mask-image: radial-gradient(circle var(--lamp-r) at var(--lamp-x) var(--lamp-y),
      transparent 0%, rgba(0,0,0,0.22) 40%, #000 78%);
}
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle calc(var(--lamp-r) * 1.15) at var(--lamp-x) var(--lamp-y),
      rgba(68, 180, 212, 0.20), transparent 70%);
  mix-blend-mode: screen;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, var(--night) 4%, rgba(10, 14, 12, 0.86) 30%, rgba(10, 14, 12, 0.18) 72%),
    linear-gradient(to right, rgba(10, 14, 12, 0.8), transparent 62%);
}

.hero-body {
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 7vw, 6.5rem);
  max-width: 40ch;
}
.hero h1 { margin-bottom: 1.4rem; }
.hero h1 .l { display: block; }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}
.hero-hint {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(3.5rem, 7vw, 6.5rem);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hero-hint::after {
  content: "";
  width: 34px; height: 1px;
  background: linear-gradient(to right, var(--cyan), transparent);
}
@media (hover: none), (max-width: 800px) {
  .hero-hint { display: none; }
  .hero-veil {
    -webkit-mask-image: none;
    mask-image: none;
    background: rgba(6, 9, 8, 0.42);
    backdrop-filter: brightness(0.72) saturate(0.75);
  }
  .hero-glow { display: none; }
}

/* mobile: rounded inset video container instead of full bleed */
@media (max-width: 720px) {
  .hero {
    min-height: 0;
    display: block;
    padding: 1rem var(--gutter) 0;
  }
  .hero-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--line);
  }
  .hero-media { z-index: 0; }
  .hero-scrim { z-index: 1; background: linear-gradient(to top, rgba(10,14,12,0.9) 6%, transparent 55%); }
  .hero-body { max-width: none; padding: 1.6rem 0 0; }
}
@media (min-width: 721px) {
  .hero-frame { position: static; display: contents; }
}

/* ---------- 9. Chapter rail ---------- */
.rail {
  position: fixed;
  left: clamp(0.9rem, 2vw, 1.6rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding-left: 0.9rem;
  border-left: 1px solid var(--line);
}
@media (min-width: 1180px) { .rail { display: flex; } }
.rail a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  padding: 0.35rem 0;
  min-height: 24px;
  opacity: 0.55;
}
.rail a .rail-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
}
.rail a:hover, .rail a[aria-current="true"] { opacity: 1; color: var(--ink); }
.rail a[aria-current="true"] .rail-num { color: var(--cyan); }
.rail a:hover .rail-label, .rail a[aria-current="true"] .rail-label { max-width: 12rem; opacity: 1; }

/* ---------- 10. Tracks ---------- */
.tracks-grid {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: clamp(2rem, 4vw, 3.4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .tracks-grid { grid-template-columns: 1fr 1fr; } }

.track {
  position: relative;
  background: var(--surface);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  isolation: isolate;
  --gx: 50%; --gy: 0%;
}
.track::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(340px circle at var(--gx) var(--gy), rgba(68, 180, 212, 0.14), transparent 70%);
}
.track:hover::before, .track:focus-within::before { opacity: 1; }
.track-ico { width: 34px; height: 34px; color: var(--olive); }
.track h3 a { color: var(--ink); text-decoration: none; }
.track h3 a::after { content: ""; position: absolute; inset: 0; }
.track:hover h3 a { color: var(--cyan); }
.track p { color: var(--ink-2); font-size: 0.98rem; }
.track-more {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.track-more span:last-child { display: inline-block; }
.track:hover .track-more span:last-child { transform: translateX(5px); }

/* ---------- 11. Programme card (the contract) ---------- */
.pcard {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(160deg, var(--line), transparent 45%) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: clamp(1.15rem, 2.4vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  --gx: 50%; --gy: 0%;
}
.pcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(320px circle at var(--gx) var(--gy), rgba(68, 180, 212, 0.13), transparent 68%);
}
.pcard::after {
  /* the light on the top edge */
  content: "";
  position: absolute;
  left: 12%; right: 12%; top: -1px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  opacity: 0;
}
.pcard:hover::before, .pcard:focus-within::before { opacity: 1; }
.pcard:hover::after, .pcard:focus-within::after { opacity: 1; }
.pcard:hover, .pcard:focus-within { transform: translateY(-3px); }

.pcard--soon { background: var(--surface-2); }
.pcard--past { opacity: 0.72; }
.pcard--past:hover { opacity: 1; }

.pcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.pcard-date {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0;
}
.pcard-title { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); }
.pcard-title a { color: var(--ink); text-decoration: none; }
.pcard-title a::after { content: ""; position: absolute; inset: 0; }
.pcard:hover .pcard-title a { color: var(--cyan); }

.pcard-meta { margin: 0; display: grid; gap: 0.3rem; }
.pcard-meta > div {
  display: grid;
  grid-template-columns: 5.6rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
}
.pcard-meta dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pcard-meta dd { margin: 0; font-size: 0.94rem; color: var(--ink-2); }
.pcard-meta dd.prices {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.pcard-meta dd.prices .second { color: var(--ink-3); }

.pcard-status {
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line-soft);
  min-height: 40px;
  display: flex;
  align-items: center;
}

/* ---------- 12. Binnenkort strip ---------- */
.strip {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}
@media (max-width: 720px) {
  .strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: 0.8rem;
    scrollbar-width: thin;
  }
  .strip > * { flex: 0 0 84%; scroll-snap-align: start; }
}

/* ---------- 13. Money / trust ---------- */
.money {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 3.2rem);
  position: relative;
  overflow: hidden;
}
.steps {
  list-style: none;
  counter-reset: s;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 820px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: s;
  background: var(--surface-2);
  padding: 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.96rem;
  color: var(--ink-2);
}
.steps li::before {
  content: "0" counter(s);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--olive);
}
.steps li b { color: var(--ink); font-weight: 700; }

.money-split {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}
.note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  background: rgba(233, 244, 238, 0.02);
}
.note h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.note p { color: var(--ink-2); font-size: 0.95rem; }

/* ---------- 14. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--night-deep);
  padding-block: clamp(3rem, 6vw, 5rem) 2.5rem;
  margin-top: clamp(3rem, 7vw, 7rem);
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  gap: 2.4rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h2 { font-size: 1.1rem; margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); text-decoration: underline; }
.site-footer address { font-style: normal; color: var(--ink-2); line-height: 1.8; }
.proof {
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.proof span { display: flex; align-items: center; gap: 0.5rem; }
.proof span::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--olive);
}

/* ---------- 15. Agenda page ---------- */
.page-head {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
}
.page-head h1 { font-size: clamp(2.1rem, 1.2rem + 4vw, 4.2rem); }
.page-head .lead { margin-top: 1.2rem; }

.filters {
  position: sticky;
  top: 66px;
  z-index: 50;
  background: rgba(8, 12, 10, 0.86);
  backdrop-filter: blur(12px);
  border-block: 1px solid var(--line-soft);
  padding-block: 0.75rem;
  margin-bottom: 2rem;
}
.filters-in {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters-in::-webkit-scrollbar { display: none; }
.fchip {
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.5rem 0.95rem;
  min-height: 40px;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.fchip .n { color: var(--ink-3); font-size: 0.7rem; }
.fchip:hover { border-color: var(--cyan); color: var(--ink); }
.fchip[aria-pressed="true"] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #04100F;
  font-weight: 500;
}
.fchip[aria-pressed="true"] .n { color: rgba(4, 16, 15, 0.7); }

.month {
  display: grid;
  gap: 1.1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .month { grid-template-columns: 12rem 1fr; align-items: start; column-gap: 2.5rem; }
}
.month[hidden] { display: none; }
.month-mark {
  position: sticky;
  top: 130px;
  align-self: start;
}
.month-mark h2 {
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem);
  line-height: 1.1;
}
.month-mark .year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--olive);
  display: block;
  margin-bottom: 0.35rem;
}
.month-mark .count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  margin-top: 0.6rem;
  display: block;
}
.month-mark::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  background: var(--line);
  margin-top: 1rem;
}
.month-list { display: grid; gap: 1rem; }
@media (min-width: 1180px) { .month-list { grid-template-columns: 1fr 1fr; } }

.pcard[hidden] { display: none; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.next-edition {
  margin-top: 0.6rem;
  padding: 0.75rem 0.9rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--ink-3);
}

/* ---------- 16. Detail page ---------- */
.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.detail-hero .shell { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); }
.detail-hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.detail-hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  filter: brightness(0.34) saturate(0.55) contrast(1.1);
}
.detail-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,14,12,0.55), var(--night) 92%);
}
.detail-cols {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 980px) { .detail-cols { grid-template-columns: minmax(0, 1fr) 21.5rem; } }

.facts {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
}
.facts > div { background: var(--surface); padding: 1.05rem 1.15rem; }
.facts dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.35rem;
}
.facts dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.prose { max-width: 62ch; }
.prose h2 { margin-top: clamp(2.2rem, 4vw, 3rem); margin-bottom: 0.9rem; font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); }

.pay-strip {
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(68,180,212,0.09), rgba(68,180,212,0.02));
  padding: 1.3rem 1.4rem;
  margin: 1.6rem 0;
}
.pay-strip h3 { font-size: 1.02rem; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.6rem; }
.pay-strip svg { width: 20px; height: 20px; color: var(--cyan); flex: none; }
.pay-strip p { color: var(--ink-2); font-size: 0.96rem; margin: 0; }

details {
  border-bottom: 1px solid var(--line-soft);
  padding: 0.2rem 0;
}
details summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 0;
  font-weight: 500;
  font-size: 1.02rem;
  position: relative;
  min-height: 24px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 1.45rem;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--cyan);
  border-bottom: 1.5px solid var(--cyan);
  transform: rotate(45deg);
}
details[open] summary::after { transform: rotate(-135deg); }
details .details-body { padding: 0 0 1.2rem; color: var(--ink-2); font-size: 0.97rem; }
.details-body .steps { grid-template-columns: 1fr; }

.book {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
@media (min-width: 980px) { .book { position: sticky; top: 90px; } }
.book .price-big {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}
.book .price-second { font-family: var(--font-mono); color: var(--olive); font-size: 0.95rem; margin-top: 0.35rem; }
.book .btn { width: 100%; justify-content: center; margin-top: 1.2rem; text-align: center; }
.book ul { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 0.6rem; font-size: 0.9rem; color: var(--ink-2); }
.book ul li { display: flex; gap: 0.6rem; align-items: flex-start; }
.book ul svg { width: 16px; height: 16px; color: var(--cyan); flex: none; margin-top: 0.22rem; }

.mobile-book {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: rgba(8, 12, 10, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
@media (min-width: 980px) { .mobile-book { display: none; } }
.mobile-book .m-price { font-family: var(--font-mono); font-size: 0.95rem; line-height: 1.3; }
.mobile-book .m-price small { display: block; color: var(--olive); font-size: 0.76rem; }
.mobile-book .btn { min-height: 48px; padding-inline: 1.1rem; }
body.has-mobile-book { padding-bottom: 5.5rem; }
.has-mobile-book .hub-chip { bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
@media (min-width: 980px) {
  body.has-mobile-book { padding-bottom: 0; }
  .has-mobile-book .hub-chip { bottom: 0.7rem; }
}

.stub {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: rgba(233, 244, 238, 0.02);
  margin-top: 1.4rem;
}
.stub p { color: var(--ink-2); }

/* ---------- 17. Motion, authored inside no-preference ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .brand img.knot,
  .site-nav a::after,
  .btn,
  .track::before, .track-more span:last-child, .track h3 a,
  .pcard, .pcard::before, .pcard::after, .pcard-title a,
  .fchip, .rail a, .rail a .rail-label, .hub-chip,
  details summary::after {
    transition: all 0.34s var(--ease);
  }
  .hero-media img { transition: opacity 0.6s var(--ease); }

  /* reveals */
  .reveal { opacity: 0; transform: translateY(22px); }
  .reveal.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
  .reveal.in[data-d="1"] { transition-delay: 0.08s; }
  .reveal.in[data-d="2"] { transition-delay: 0.16s; }
  .reveal.in[data-d="3"] { transition-delay: 0.24s; }
  .reveal.in[data-d="4"] { transition-delay: 0.32s; }

  /* staggered heading fragments */
  .stagger span { display: inline-block; opacity: 0; transform: translateY(0.4em); }
  .stagger.in span {
    opacity: 1; transform: none;
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    transition-delay: calc(var(--i) * 90ms);
  }

  /* the intro knot draws, then the curtain lifts */
  .intro-knot path { animation: draw 0.85s var(--ease-out) forwards; }
  .intro-knot path:nth-child(2) { animation-delay: 0.08s; }
  .intro-knot path:nth-child(3) { animation-delay: 0.16s; }
  .intro-knot path:nth-child(4) { animation-delay: 0.24s; }
  .intro-word { animation: fadeup 0.5s 0.55s var(--ease-out) forwards; }
  .intro.leaving { animation: lift 0.6s var(--ease-out) forwards; }

  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fadeup { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes lift { to { clip-path: inset(0 0 100% 0); opacity: 0; } }

  .contours { animation: drift 26s ease-in-out infinite alternate; }
  @keyframes drift { from { transform: translateX(-1.5%); } to { transform: translateX(1.5%); } }
  .contours--top { animation-name: drift-top; }
  @keyframes drift-top { from { transform: scaleY(-1) translateX(-1.5%); } to { transform: scaleY(-1) translateX(1.5%); } }
}

@media (prefers-reduced-motion: reduce) {
  .intro-knot path { stroke-dashoffset: 0; }
  .intro-word { opacity: 1; }
  .reveal, .stagger span { opacity: 1; transform: none; }
}

/* ---------- 18. Small-screen refinements ---------- */
@media (max-width: 760px) {
  /* the knot alone carries the brand when space is tight */
  .brand img.word { display: none; }
}

@media (max-width: 560px) {
  .header-in { min-height: 58px; }
  .brand img.knot { width: 28px; }
  .site-nav a { font-size: 0.86rem; }
  .hub-chip { font-size: 0.62rem; padding: 0.4rem 0.6rem; }
  .pcard-meta > div { grid-template-columns: 4.6rem 1fr; }
  .filters { top: 58px; }
  .month-mark { position: static; }
  .facts { grid-template-columns: 1fr 1fr; }
}
