/* ============================================================
   PSYDA — Editorial Redesign  |  style.css
   ============================================================ */

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

:root {
  --bg:           #F7F3EC;
  --bg-alt:       #EDE8DE;
  --bg-deep:      #E3DCCE;
  --text-primary: #1E1C18;
  --text-secondary:#6B6457;
  --text-muted:   #625C54;
  --accent:       #6E5A42;
  --accent-soft:  #9A7D61;
  --border:       #D6CFC3;
  --border-soft:  rgba(30, 28, 24, 0.08);
  --white:        #FAFAF7;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --nav-h:   76px;
  --max-w:   1280px;
  --pad-x:   clamp(1.5rem, 5vw, 3.5rem);
  --sec-py:  clamp(6rem, 14vw, 12rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);

  --motion: 1;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scrollbar-gutter: stable;
  overscroll-behavior-y: none;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip (not hidden) avoids creating a new scroll container, preserving position:sticky */
  overflow-x: clip;
  font-feature-settings: "ss01", "kern";
}
a  { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
em { font-style: italic; }

/* ── Focus-visible: restore keyboard focus ring for all interactive elements */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ── Skip navigation link */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.6rem 1.2rem;
  background: var(--text-primary);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ── Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 0%; height: 3px;
  background: var(--accent); z-index: 300;
  transition: width 0.08s linear;
  box-shadow: 0 0 8px rgba(110, 90, 66, 0.25);
}

::selection { background: var(--accent); color: var(--white); }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}



/* ============================================================
   NAVIGATION
   ============================================================ */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  transition: background 0.45s var(--ease-out), backdrop-filter 0.45s, box-shadow 0.45s;
  background: transparent;
}
#nav.scrolled {
  background: rgba(247, 243, 236, 0.78);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow: 0 1px 0 var(--border-soft);
}

.nav-logo { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; color: var(--text-primary); }
.nav-logo-mark {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-primary);
}
.nav-logo-mark svg { width: 100%; height: 100%; display: block; }
.nav-logo-text {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  align-items: center;
}
.nav-links a {
  position: relative;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  transition: color 0.3s var(--ease-out);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--text-primary);
  transition: right 0.5s var(--ease-out);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { right: 0; }
.nav-links a.active { color: var(--text-primary); }
.nav-links a.active::after { right: 0; background: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 190;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  padding: 0 var(--pad-x);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  border-top: 1px solid var(--border-soft);
}
.mobile-drawer.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.mobile-drawer a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3.2rem);
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.mobile-drawer a:hover { color: var(--accent); font-style: italic; }


/* ============================================================
   HERO — pinned scroll-linked 3-pillar sequence
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  /* Snappier pinned scroll: 3 slides but compressed */
  height: 220vh;
  height: 220dvh;
  background: var(--bg);
}
.hero-spacer { display: none; }

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}

/* Pillar indicator — top right */
.pillar-indicator {
  position: absolute;
  top: calc(var(--nav-h) + 1.5rem);
  right: var(--pad-x);
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 180px;
}
.pillar-track {
  position: relative;
  height: 1px;
  background: var(--border);
}
.pillar-progress {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.4s var(--ease-out);
}
.pillar-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pillar-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.4s var(--ease-out);
}
.pillar-item.active { color: var(--text-primary); }
.pillar-num { font-variant-numeric: tabular-nums; color: var(--accent); }
.pillar-label { font-weight: 400; }

/* Slide stack */
.hero-stack {
  position: relative;
  width: 100%; height: 100%;
}
.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  padding: var(--nav-h) var(--pad-x) 7rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s var(--ease-out);
}
.hero-slide.active { opacity: 1; pointer-events: auto; }

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  max-width: 600px;
  padding-right: 2rem;
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}
.dot-tiny {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 8.5vw, 7.5rem);
  font-weight: 300;
  line-height: 0.95;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}
.hero-headline em { font-style: italic; color: var(--accent); font-weight: 400; }

/* Line reveal */
.reveal-line {
  display: block;
  overflow: hidden;
}
.reveal-line > span,
.reveal-line > em > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 0.08s);
}
.hero-slide.active .reveal-line > span,
.hero-slide.active .reveal-line > em > span {
  transform: translateY(0);
}
.reveal-line:nth-child(1) > span { --i: 0; }
.reveal-line:nth-child(2) > em > span { --i: 1; }
.reveal-line:nth-child(3) > span { --i: 2; }

.hero-sub {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 440px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s var(--ease-out) 0.4s, transform 0.8s var(--ease-out) 0.4s;
}
.hero-slide.active .hero-sub { opacity: 1; transform: none; }

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  align-self: flex-start;
  padding: 1rem 1.8rem;
  margin-top: 0.8rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
  background: transparent;
  position: relative;
  overflow: hidden;
  transition: color 0.4s var(--ease-out);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s var(--ease-out) 0.55s, transform 0.8s var(--ease-out) 0.55s, color 0.4s var(--ease-out);
}
.hero-slide.active .btn-hero { opacity: 1; transform: none; }
.btn-hero svg { width: 22px; height: 10px; transition: transform 0.4s var(--ease-out); }
.btn-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--text-primary);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
  z-index: -1;
}
.btn-hero:hover { color: var(--white); }
.btn-hero:hover::before { transform: translateY(0); }
.btn-hero:hover svg { transform: translateX(4px); }

/* Hero art */
.hero-art {
  position: relative;
  height: 100%;
  padding: 2rem 0 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.art-frame {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  transform: translateY(30px);
  opacity: 0;
  transition: opacity 1s var(--ease-out) 0.3s, transform 1s var(--ease-out) 0.3s;
}
.hero-slide.active .art-frame { opacity: 1; transform: translateY(0); }
.art-placeholder {
  width: 100%; height: 100%;
}
.art-placeholder svg { width: 100%; height: 100%; display: block; }




/* ============================================================
   SECTIONS — chapter layout
   ============================================================ */
.section { padding: var(--sec-py) 0; position: relative; }
.section-alt     { background: var(--bg-alt); }
.section-contact { background: var(--bg-deep); }
/* Darken secondary text on deep background to maintain 4.5:1 contrast */
.section-contact, .footer { --text-secondary: #5C564E; }

.chapter-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.chapter-grid-reverse { grid-template-columns: 1fr 280px; }
.chapter-grid-reverse .chapter-sticky { order: 2; }

.chapter-sticky {
  position: sticky;
  top: calc(var(--nav-h) + 3rem);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: fit-content;
}
.chapter-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(5rem, 10vw, 8rem);
  line-height: 0.85;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.chapter-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  max-width: 220px;
}
.chapter-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.chapter-sub {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--text-secondary);
}

.chapter-body {
  max-width: 720px;
}
.chapter-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-wrap: pretty;
}
.chapter-title em { color: var(--accent); font-weight: 400; }

.chapter-lede {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-secondary);
  padding-bottom: 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  max-width: 560px;
}

/* Editorial list */
.editorial-list {
  display: flex;
  flex-direction: column;
}
.e-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border);
}
.e-num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 0.25rem;
}
.e-body h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.e-body p {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 520px;
}


/* ============================================================
   Reveal on scroll — word-by-word for titles
   ============================================================ */
.reveal-words .word {
  display: inline-block;
  overflow: hidden;
  line-height: 1;
  vertical-align: top;
  padding: 0.1em 0.02em;
  margin: -0.1em -0.02em;
}
.reveal-words .word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 0.05s);
}
.reveal-words.visible .word > span { transform: translateY(0); }

/* Simple fade-up fallback */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* Stagger children helper */
.e-item { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.e-item.visible { opacity: 1; transform: translateY(0); }


/* ============================================================
   BLEED FIGURES — full-width editorial imagery
   ============================================================ */
.bleed-figure {
  position: relative;
  margin-top: clamp(5rem, 10vw, 8rem);
  overflow: hidden;
}
.bleed-img {
  width: 100%;
  height: clamp(340px, 50vh, 560px);
  overflow: hidden;
  position: relative;
  will-change: transform;
}
.bleed-figure-tall .bleed-img { height: clamp(420px, 70vh, 720px); }
.bleed-img > svg { width: 100%; height: 110%; display: block; position: absolute; top: -5%; left: 0; }
.bleed-figure figcaption {
  padding: 1rem var(--pad-x) 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-muted);
}


/* ============================================================
   MEDIA SECTION
   ============================================================ */
.media-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  text-align: center;
  margin-bottom: 3rem;
}
.media-hero .chapter-label { display: block; margin-bottom: 1.5rem; color: var(--accent); }
.media-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}
.media-headline em { color: var(--accent); }
.media-lede {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}

.media-list-wrap {
  max-width: var(--max-w);
  margin: clamp(4rem, 8vw, 7rem) auto 0;
  padding: 0 var(--pad-x);
}
.media-list { border-top: 1px solid var(--border); }
.media-row {
  display: grid;
  grid-template-columns: 70px 1fr 140px;
  gap: 2rem;
  align-items: start;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.5s var(--ease-out), padding-left 0.5s var(--ease-out);
  opacity: 0;
  transform: translateY(20px);
}
.media-row.visible { opacity: 1; transform: translateY(0); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), background 0.5s var(--ease-out), padding-left 0.5s var(--ease-out); }
.media-row:hover { padding-left: 1.25rem; background: rgba(255,255,255,0.35); }
.mr-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  padding-top: 0.2rem;
}
.media-row h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
.media-row p {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 520px;
}
.mr-tag {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.5rem;
  text-align: right;
}


/* ============================================================
   CONTACT
   ============================================================ */
.section-contact { padding-top: clamp(4rem, 10vw, 12rem); padding-bottom: clamp(3rem, 8vw, 8rem); }
.contact-inner { display: flex; flex-direction: column; gap: 4rem; }
.contact-inner .chapter-label { color: var(--accent); }

.contact-mail {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 7.5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  word-break: break-word;
}
.contact-mail em { color: var(--accent); font-weight: 400; }
.contact-mail a {
  display: inline-block;
  position: relative;
  transition: opacity 0.3s;
}
.contact-mail a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 0.08em;
  height: 2px;
  background: var(--accent);
  transition: right 0.7s var(--ease-out);
}
.contact-mail a:hover::after { right: 0; }

.contact-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}
.contact-meta > div { display: flex; flex-direction: column; gap: 0.5rem; }
.cm-label {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cm-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--text-primary);
  transition: color 0.3s;
}
a.cm-value:hover { color: var(--accent); }


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-deep);
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
}
.footer-logo .nav-logo-mark { width: 22px; height: 22px; color: var(--text-secondary); }
.footer-logo span {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--text-secondary);
}
.footer-copy {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.footer-top {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s;
}
.footer-top:hover { color: var(--accent); }


/* ============================================================
   TWEAKS PANEL
   ============================================================ */
.tweaks-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 400;
  width: 260px;
  padding: 1rem 1.1rem;
  background: rgba(247, 243, 236, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(30,28,24,0.12);
  font-family: var(--font-ui);
  display: none;
  flex-direction: column;
  gap: 0.9rem;
}
.tweaks-panel.open { display: flex; }
.tweaks-panel h4 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.tweak-row { display: flex; flex-direction: column; gap: 0.3rem; }
.tweak-row label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tweak-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.tweak-row input[type="color"] { width: 100%; height: 28px; border: 1px solid var(--border); padding: 0; background: transparent; cursor: pointer; }
.tweak-swatches { display: flex; gap: 0.4rem; }
.tweak-swatch {
  width: 24px; height: 24px;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  background: var(--c);
}
.tweak-swatch.active { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.tweak-row.toggle {
  flex-direction: row; justify-content: space-between; align-items: center;
}
.tweak-row.toggle label { margin: 0; }
.tweak-toggle {
  width: 36px; height: 20px; border-radius: 999px;
  background: var(--border);
  position: relative; cursor: pointer;
  border: none; padding: 0;
  transition: background 0.3s;
}
.tweak-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.3s var(--ease-out);
}
.tweak-toggle.on { background: var(--accent); }
.tweak-toggle.on::after { transform: translateX(16px); }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .chapter-grid,
  .chapter-grid-reverse { grid-template-columns: 1fr; }
  .chapter-grid-reverse .chapter-sticky { order: 0; }
  .chapter-sticky {
    position: static;
    flex-direction: row;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  .chapter-num { font-size: 4rem; }
  .chapter-meta { padding-top: 0; border-top: none; }
  .pillar-indicator { display: none; }

  .media-row { grid-template-columns: 50px 1fr; }
  .mr-tag { display: none; }
}

@media (max-width: 720px) {
  :root {
    --nav-h: 64px;
    --sec-py: clamp(3rem, 8vw, 5rem);  /* tighter sections on mobile */
  }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  /* Hero: single column, art as faint backdrop */
  /* NOTE: no overflow:hidden on .hero or .hero-sticky — breaks position:sticky */
  .hero-slide {
    grid-template-columns: 1fr;
    padding: calc(var(--nav-h) + 1rem) var(--pad-x) 6rem;
    gap: 1.5rem;
    align-items: end;
  }
  .hero-content { padding-right: 0; gap: 1.1rem; }
  .hero-art {
    position: absolute;
    inset: 0;
    opacity: 0.06;  /* very faint — prevents art labels bleeding into content */
    padding: 0;
    z-index: 0;
    overflow: hidden;
  }
  .hero-content { position: relative; z-index: 1; }
  .art-frame { max-width: 100%; aspect-ratio: auto; height: 100%; overflow: hidden; }

  .hero-headline { font-size: clamp(2.8rem, 13vw, 4.6rem); }

  .contact-meta { grid-template-columns: 1fr; gap: 1.5rem; }

  .e-item { grid-template-columns: 40px 1fr; gap: 1rem; padding: 1.4rem 0; }
  .e-body h3 { font-size: 1.35rem; }

  .media-row { padding: 1.5rem 0; gap: 1rem; }
  .media-row h3 { font-size: 1.3rem; }

  .scroll-hint { display: none; }

  .footer-inner { flex-direction: column; gap: 0.6rem; text-align: center; }

  .tweaks-panel { width: calc(100vw - 2rem); right: 1rem; bottom: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal-line > span, .reveal-line > em > span { transform: none !important; }
}
