/* ==========================================================
   Hold Space — Sheraton Suites Calgary Eau Claire
   Editorial black & white. Minimal, cinematic.
   ========================================================== */

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --fg: #f4f1ec;
  --fg-dim: #8a8680;
  --fg-mute: #4a4844;
  --rule: #1d1d1d;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --pad-x: clamp(24px, 5vw, 96px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: none;
  overflow-x: hidden;
}

@media (max-width: 760px) {
  :root { --pad-x: 22px; }
  html, body { cursor: auto; font-size: 15px; }
  .nav { padding: 18px 22px; font-size: 9px; }
  .nav__chapter, .nav__menu { display: none; }
  section { min-height: auto; padding: 18vh 22px; }
  .hero { min-height: 100vh; padding-bottom: 6vh; }
  .hero__meta { position: static; margin-top: 80px; flex-wrap: wrap; gap: 14px 24px; font-size: 9px; }
  .hero__meta div { flex: 1 1 45%; }
  .hero__title { font-size: 18vw; line-height: 0.92; max-width: 100%; }
  .hero__sub { flex-direction: column; align-items: flex-start; }
  .hero__scroll { align-self: flex-start; flex-direction: row; align-items: center; }
  .hero__scroll-line { width: 40px; height: 1px; background: var(--fg); animation: none; }
  .chapter-tag { font-size: 9px; margin-bottom: 36px; }
  .chapter-tag::before { width: 18px; }
  .craft { min-height: auto; padding-top: 12vh; }
  .craft__intro { text-align: left; max-width: 100%; }
  .craft__intro p { margin-left: 0 !important; }
  .craft__steps { margin-top: 12vh; gap: 16vh; }
  .people__head { margin-bottom: 50px; }
  .marquee { font-size: 18vw; gap: 40px; }
  .marquee span { gap: 40px; }
  .arrival__num { font-size: 28vw; }
  .taking__head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 50px; }
  .taking__row { padding: 22px 0; }
  .taking__row .t { font-size: 26px; }
  .taking__row:hover { padding-left: 0; padding-right: 0; }
  .farewell { padding: 14vh 32px 8vh; }
  .farewell__letter { line-height: 1.6; margin-top: 40px; }
  .farewell__sign .name { font-size: 26px; }
  .contact { margin-top: 60px; gap: 14px; flex-direction: column; align-items: stretch; }
  .contact a { padding: 18px 24px; text-align: center; }
  footer { padding: 28px 22px; flex-direction: column; gap: 8px; }
  .audio-toggle { bottom: 18px; right: 18px; width: 46px; height: 46px; cursor: pointer; }
  .tool-label { display: none; }
  #three-canvas { opacity: 0.55; }
}

::selection { background: var(--fg); color: var(--bg); }

/* ===== Custom cursor ===== */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease), opacity .2s;
}
.cursor-ring.hover { width: 64px; height: 64px; }
@media (max-width: 760px) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ===== Loader ===== */
.loader {
  position: fixed; inset: 0;
  background: #000;
  z-index: 10000;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--pad-x);
  pointer-events: none;
}
.loader__count {
  font-family: var(--mono);
  font-size: 12vw;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.85;
  color: var(--fg);
}
.loader__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  align-self: flex-end;
  padding-bottom: 2vh;
  text-align: right;
}

/* ===== Top nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--pad-x);
  z-index: 100;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  mix-blend-mode: difference;
  color: #fff;
}
.nav__brand { display: flex; gap: 10px; align-items: center; }
.nav__brand-mark {
  width: 8px; height: 8px; background: #fff;
  display: inline-block;
}
.nav__chapter { opacity: 0.7; }
.nav__chapter span { color: #fff; opacity: 1; margin-left: 8px; }

/* ===== Section base ===== */
section {
  position: relative;
  min-height: 100vh;
  padding: 6vh var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.chapter-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 64px;
}
.chapter-tag::before {
  content: "";
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--fg-mute);
}

h1.display, h2.display {
  font-family: var(--serif);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 0.96;
}
h1.display { font-size: clamp(56px, 11vw, 200px); }
h2.display { font-size: clamp(42px, 7.5vw, 132px); }
h3.section-label {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.italic { font-style: italic; }
p.lead {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 40px);
  line-height: 1.32;
  font-weight: 400;
  color: var(--fg);
  max-width: 22ch;
}
p.body {
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.65;
  color: var(--fg-dim);
  max-width: 48ch;
  font-weight: 300;
}
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ===== Hero ===== */
.hero {
  height: 100vh;
  min-height: 720px;
  padding: 0 var(--pad-x);
  justify-content: flex-end;
  padding-bottom: 8vh;
}
.hero__meta {
  position: absolute;
  top: 90px;
  left: var(--pad-x);
  right: var(--pad-x);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.hero__meta div { display: flex; flex-direction: column; gap: 4px; }
.hero__meta .v { color: var(--fg); }

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 14vw, 240px);
  line-height: 0.88;
  letter-spacing: -0.03em;
  max-width: 14ch;
}
.hero__title .it { font-style: italic; color: var(--fg-dim); }

.hero__sub {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.hero__sub p {
  max-width: 38ch;
  color: var(--fg-dim);
  font-size: clamp(13px, 1.3vw, 18px);
}
.hero__scroll {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.hero__scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--fg) 30%, var(--fg) 70%, transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
}

/* ===== 3D Canvas ===== */
#three-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
#three-canvas.interactive { pointer-events: auto; }
.tool-label {
  position: fixed;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: flex;
  gap: 14px;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.tool-label.show { opacity: 1; }
.tool-label::before {
  content: ""; width: 24px; height: 1px; background: var(--fg-mute);
}

/* ===== Hero + chapter sections above canvas ===== */
.hero, .chapter {
  position: relative;
  z-index: 3;
}

/* Chapter II: arrival */
.arrival {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.arrival__num {
  font-family: var(--serif);
  font-size: clamp(120px, 22vw, 380px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  font-style: italic;
  color: var(--fg);
}
.arrival__num .small {
  font-size: 0.18em;
  font-style: normal;
  font-family: var(--mono);
  letter-spacing: 0.2em;
  display: block;
  color: var(--fg-dim);
  margin-top: 24px;
}
.arrival__text { display: flex; flex-direction: column; gap: 28px; max-width: 44ch; }

@media (max-width: 880px) {
  .arrival { grid-template-columns: 1fr; gap: 40px; }
}

/* Chapter III: The Craft */
.craft {
  min-height: 180vh;
  padding-top: 20vh;
}
.craft__intro {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.craft__intro p { margin-left: 0 !important; }
.craft__steps {
  margin-top: 20vh;
  display: flex;
  flex-direction: column;
  gap: 20vh;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.craft__step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}
.craft__step.right { direction: rtl; }
.craft__step.right > * { direction: ltr; }
.craft__step-text { display: flex; flex-direction: column; gap: 20px; max-width: 36ch; }
.craft__step-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--fg-dim);
}
.craft__step h3 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.craft__step h3 em { color: var(--fg-dim); font-style: italic; }
@media (max-width: 880px) {
  .craft__step, .craft__step.right { grid-template-columns: 1fr; direction: ltr; }
}

/* Chapter IV: The People — marquee names */
.people {
  overflow: hidden;
  padding-left: 0; padding-right: 0;
}
.people__head {
  padding: 0 var(--pad-x);
  margin-bottom: 80px;
}
.marquee {
  display: flex;
  gap: 80px;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(60px, 10vw, 180px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
  will-change: transform;
}
.marquee.reverse { color: var(--fg-mute); font-style: italic; margin-top: 30px; }
.marquee span { display: inline-flex; align-items: center; gap: 80px; }
.marquee span::after {
  content: "✦";
  font-size: 0.4em;
  color: var(--fg-mute);
}

/* Chapter IV — Dense contact-sheet thumbnail grid
   Full-width responsive layout. Click any thumb to open the Polaroid lightbox. */
/* Chapter 04 — Photo Wall */
.pw-wall-frame {
  width: 100%;
  margin: 20vh 0 0;
}

/* Photo-wall skeleton loader */
.pw-skeleton {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  padding: 0 var(--pad-x);
}
.pw-skeleton > div {
  aspect-ratio: 1;
  border-radius: 4px;
  background: linear-gradient(90deg, #161616 25%, #222 50%, #161616 75%);
  background-size: 200% 100%;
  animation: pw-shimmer 1.4s ease-in-out infinite;
}
.pw-skeleton > div:nth-child(2) { animation-delay: 0.1s; }
.pw-skeleton > div:nth-child(3) { animation-delay: 0.2s; }
.pw-skeleton > div:nth-child(4) { animation-delay: 0.3s; }
.pw-skeleton > div:nth-child(5) { animation-delay: 0.4s; }
.pw-skeleton > div:nth-child(6) { animation-delay: 0.5s; }
.pw-skeleton > div:nth-child(7) { animation-delay: 0.15s; }
.pw-skeleton > div:nth-child(8) { animation-delay: 0.25s; }
.pw-skeleton > div:nth-child(9) { animation-delay: 0.35s; }
.pw-skeleton > div:nth-child(10){ animation-delay: 0.45s; }
.pw-skeleton > div:nth-child(11){ animation-delay: 0.55s; }
.pw-skeleton > div:nth-child(12){ animation-delay: 0.6s; }
@keyframes pw-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.pw-skeleton.hidden { display: none; }
@media (max-width: 760px) {
  .pw-skeleton { grid-template-columns: repeat(4, 80px); grid-template-rows: repeat(2, 80px); }
}
#photo-wall {
  display: grid;
  /* grid-template-columns set dynamically by photo-wall.js */
  gap: 3px;
  padding: 0 var(--pad-x);
}
.pw-cell {
  aspect-ratio: 1;
  overflow: hidden;
  background: #0c0c0c;
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;
  border-radius: 4px;
  isolation: isolate;
  transform: translateZ(0);
  transition: opacity 0.2s;
  min-height: 0;
}
.pw-cell:hover { opacity: 0.9; }
.pw-cell:hover img { filter: grayscale(0%); }
.pw-cell:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.pw-cell img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  background-color: #0c0c0c;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  filter: grayscale(100%);
  transition: filter 0.4s ease;
}

/* Mobile: 2-row horizontal scroll strip */
@media (max-width: 760px) {
  #photo-wall {
    overflow-x: auto;
    overflow-y: hidden;
    grid-template-rows: repeat(2, 80px);
    grid-auto-flow: column;
    grid-auto-columns: 80px;
    padding-left: 0;
    padding-right: 0;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #photo-wall::-webkit-scrollbar { display: none; }
  .pw-cell { scroll-snap-align: start; }
}

/* Mobile scroll-progress hint */
.pw-hint-bar {
  display: none;
  margin: 10px var(--pad-x) 0;
  height: 1px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}
.pw-hint-bar i {
  display: block;
  height: 100%;
  background: rgba(255,255,255,0.35);
  width: 14%;
  font-style: normal;
  transform: translateX(var(--pw-progress, 0%));
  transition: transform 0.08s linear;
}
.pw-hint-count {
  display: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
  text-align: right;
  padding: 5px var(--pad-x) 0;
}
@media (max-width: 760px) {
  .pw-hint-bar   { display: block; }
  .pw-hint-count { display: block; }
}

/* Polaroid lightbox */
.lb-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.lb-overlay.open { opacity: 1; pointer-events: all; }
.polaroid {
  background: #fff;
  padding: 14px 14px 0;
  width: min(88vw, 420px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  user-select: none;
}
.polaroid__photo {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; display: block;
}
.polaroid__caption {
  color: #222;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(13px, 2vw, 15px);
  text-align: center;
  padding: 18px 8px 22px;
  line-height: 1.45;
  min-height: 64px;
  display: flex; align-items: center; justify-content: center;
}

/* Lightbox navigation */
.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  z-index: 9001;
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.lb-overlay.open .lb-nav {
  opacity: 1;
  pointer-events: all;
}

.lb-nav:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
}

.lb-nav--prev { left: 24px; }
.lb-nav--next { right: 24px; }

.lb-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  z-index: 9001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lb-overlay.open .lb-counter {
  opacity: 1;
}

/* people-gallery.js Lightbox */
.pw-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 8500;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}

.pw-overlay.pw-active {
  opacity: 1; pointer-events: all;
}

.pw-bg {
  position: absolute; inset: 0;
  cursor: pointer;
}

.pw-stage {
  position: relative;
  z-index: 1;
  perspective: 800px;
  perspective-origin: center center;
}

.pw-polaroid {
  background: #fff;
  padding: 12px 12px 0;
  width: min(90vw, 380px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  user-select: none;
  border-radius: 2px;
  transform-origin: center center;
}

.pw-polaroid.pw-tilt-ready {
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.pw-pol-inner {
  display: flex;
  flex-direction: column;
}

.pw-pol-photo {
  width: 100%; aspect-ratio: 1;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-pol-photo img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  /* Safari image loading fixes */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-appearance: none;
  appearance: none;
}

.pw-pol-empty {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8e8e8;
  color: #aaa;
}

.pw-pol-empty span {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.1em;
}

.pw-pol-foot {
  color: #333;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(12px, 1.8vw, 14px);
  text-align: center;
  padding: 14px 8px 16px;
  line-height: 1.4;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-controls {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8501;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.pw-overlay.pw-active .pw-controls {
  opacity: 1;
  pointer-events: all;
}

.pw-counter {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
  text-align: center;
  min-width: 60px;
}

.pw-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  transition: all 0.2s ease;
}

.pw-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.pw-btn svg {
  width: 18px;
  height: 18px;
}

.pw-close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 8501;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.pw-overlay.pw-active .pw-close {
  opacity: 1;
  pointer-events: all;
}

body.pw-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .pw-polaroid {
    width: min(95vw, 340px);
    padding: 10px 10px 0;
  }
  .pw-controls {
    bottom: 16px;
    gap: 12px;
  }
  .pw-close {
    top: 16px;
    right: 16px;
  }
  .pw-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .lb-nav {
    width: 40px;
    height: 40px;
  }
  .lb-nav--prev { left: 12px; }
  .lb-nav--next { right: 12px; }
  .lb-counter { bottom: 16px; font-size: 11px; }
}

/* Chapter V: Guests — fragments */
.guests {
  padding-top: 24vh;
  padding-bottom: 24vh;
}
.guests__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px 40px;
  margin-top: 80px;
}
.frag {
  font-family: var(--serif);
  font-size: clamp(20px, 1.7vw, 28px);
  line-height: 1.35;
  color: var(--fg);
  padding-left: 24px;
  border-left: 1px solid var(--rule);
}
.frag .num {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--fg-dim);
  margin-bottom: 14px;
}
.frag em { font-style: italic; color: var(--fg-dim); }

.frag.f1 { grid-column: 1 / span 5; }
.frag.f2 { grid-column: 7 / span 5; margin-top: 18vh; }
.frag.f3 { grid-column: 2 / span 5; margin-top: 8vh; }
.frag.f4 { grid-column: 8 / span 4; margin-top: 14vh; }
.frag.f5 { grid-column: 4 / span 6; margin-top: 10vh; text-align: center; }

@media (max-width: 880px) {
  .guests__grid { grid-template-columns: 1fr; gap: 60px; }
  .frag.f1, .frag.f2, .frag.f3, .frag.f4, .frag.f5 { grid-column: 1; margin-top: 0; text-align: left; }
}

/* Chapter VI: Taking with me */
.taking {
  padding-top: 22vh;
  padding-bottom: 16vh;
}
.taking__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 100px;
}
.taking__list {
  border-top: 1px solid var(--rule);
}
.taking__row {
  display: grid;
  grid-template-columns: 80px 1fr 1.4fr 80px;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  cursor: pointer;
  transition: padding .4s var(--ease);
}
.taking__row:hover { padding-left: 24px; padding-right: 24px; }
.taking__row .n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.2em;
}
.taking__row .t {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 56px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.taking__row .t em { color: var(--fg-dim); font-style: italic; }
.taking__row .d {
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.55;
}
.taking__row .arrow {
  font-family: var(--mono);
  font-size: 14px;
  text-align: right;
  color: var(--fg-mute);
  transition: color .3s, transform .3s;
}
.taking__row:hover .arrow { color: var(--fg); transform: translateX(8px); }

@media (max-width: 880px) {
  .taking__row { grid-template-columns: 40px 1fr; }
  .taking__row .d, .taking__row .arrow { grid-column: 2; }
}

/* Chapter VII: Farewell */
#chapter-7 h2.display { font-size: clamp(28px, 5.5vw, 110px); }
.farewell {
  min-height: 100vh;
  text-align: center;
  align-items: center;
  padding: 18vh var(--pad-x) 12vh;
}
.farewell__letter {
  max-width: 64ch;
  font-family: var(--serif);
  font-size: clamp(17px, 3.2vw, 36px);
  line-height: 1.5;
  margin: 64px auto 0;
}
.farewell__letter p { margin-bottom: 1.2em; }
.farewell__letter em { color: var(--fg-dim); }
.farewell__sign {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.farewell__sign .name {
  font-family: var(--serif);
  font-size: 36px;
  font-style: italic;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--fg);
  margin-bottom: 18px;
}

.contact {
  margin-top: 120px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.contact a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--rule);
  padding: 22px 36px;
  position: relative;
  overflow: hidden;
  transition: color .4s;
  display: inline-block;
}
.contact a::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--fg);
  transform: translateY(101%);
  transition: transform .5s var(--ease);
  z-index: -1;
}
.contact a:hover { color: var(--bg); }
.contact a:hover::before { transform: translateY(0); }
.contact a span { position: relative; z-index: 1; }

footer {
  padding: 40px var(--pad-x);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-mute);
  flex-wrap: wrap;
  gap: 16px;
}

/* Audio toggle */
.audio-toggle {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 50;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  cursor: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--fg);
  text-transform: uppercase;
}
.audio-toggle .bars { display: flex; gap: 2px; align-items: center; height: 14px; }
.audio-toggle .bars i {
  display: inline-block;
  width: 2px;
  background: var(--fg);
  height: 100%;
  animation: bars 1.2s ease-in-out infinite;
}
.audio-toggle .bars i:nth-child(2) { animation-delay: .2s; }
.audio-toggle .bars i:nth-child(3) { animation-delay: .4s; }
.audio-toggle .bars i:nth-child(4) { animation-delay: .1s; }
.audio-toggle.muted .bars i { animation-play-state: paused; height: 30%; }
@keyframes bars {
  0%, 100% { transform: scaleY(0.3); transform-origin: bottom; }
  50% { transform: scaleY(1); }
}

/* Magnetic helper */
.magnetic { display: inline-block; will-change: transform; }
.magnetic-inner { display: inline-block; will-change: transform; }

/* Reveal helper — overflow clip for slide-up text */
.reveal {
  overflow: hidden;
  display: inline-block;
  vertical-align: baseline;
  line-height: 1.2;
  /* top padding prevents ascenders from being clipped by overflow:hidden */
  padding-top: 0.12em;
  margin-top: -0.12em;
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}
.reveal > span {
  display: inline-block;
  line-height: 1.2;
  transform-origin: bottom center;
}
/* Pre-hide hero animation elements only when JS has signalled it will animate them.
   Without the .js-anim class on <html>, everything stays visible as a safe fallback. */
html.js-anim .hero .reveal > span {
  opacity: 0;
  transform: translateY(20px);
}
html.js-anim .hero__meta div,
html.js-anim .hero__sub p,
html.js-anim .hero__scroll {
  opacity: 0;
  transform: translateY(14px);
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .reveal > span.is-in {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-el-in {
  animation: heroFadeUp 0.9s ease forwards;
}
/* Large display headings have taller ascenders — give them more room */
h1.hero__title .reveal,
h2.display .reveal {
  padding-top: 0.2em;
  margin-top: -0.2em;
  padding-bottom: 0.25em;
  margin-bottom: -0.25em;
}
