/* =============================================================
   AARADHYA — An Interactive Edition
   Design system, single-file stylesheet.
   ============================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Light surfaces (Classico / minimal-furniture palette) */
  --paper:        #ececef;   /* page bg — slight gray for contrast against white cards */
  --paper-soft:   #f5f5f7;   /* secondary surface */
  --paper-deep:   #e0e0e3;   /* image placeholder */

  /* Ink — primary text and accents */
  --ink:          #111111;
  --ink-soft:     #555555;
  --ink-mute:     #999999;

  /* Brand gold (kept for accents / nav-cta) */
  --gold:         #b09558;
  --gold-soft:    #8a6e38;
  --gold-deep:    #6a5428;

  /* Accent */
  --rust:         #8d3c1f;

  /* Functional */
  --line:         rgba(0, 0, 0, 0.08);
  --line-strong:  rgba(0, 0, 0, 0.2);
  --veil-dark:    rgba(10, 15, 11, 0.55);
  --veil-deep:    rgba(10, 15, 11, 0.78);

  /* Motion */
  --ease:         cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft:    cubic-bezier(0.25, 0.8, 0.25, 1);

  /* Layers */
  --z-grain:      90;
  --z-cursor:     9999;
  --z-header:     40;
  --z-cover:      10;
  --z-carousel:   15;
  --z-detail:     50;
  --z-player:     70;
}

/* ---------- 2. RESET + BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body, a, button { cursor: none; }
button, a, .card, .cta-tile {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}
@media (pointer: coarse) {
  body, a, button { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

a { color: inherit; text-decoration: none; }

button {
  font: inherit; color: inherit; background: transparent;
  border: 0; padding: 0; letter-spacing: inherit;
}

kbd {
  background: rgba(176, 149, 88, 0.18);
  padding: 0.1rem 0.42rem;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.88em;
  letter-spacing: 0.05em;
  color: inherit;
}

/* ---------- 3. FILM GRAIN ---------- */
.grain {
  position: fixed; inset: 0; pointer-events: none;
  z-index: var(--z-grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.12  0 0 0 0 0.07  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.14;
  mix-blend-mode: multiply;
}

/* ---------- 4. CURSOR ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: var(--z-cursor);
  border-radius: 50%; mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  width: 5px; height: 5px; background: #fff;
  transform: translate3d(-50%, -50%, 0);
}
.cursor-ring {
  width: 34px; height: 34px; border: 1px solid #fff;
  transform: translate3d(-50%, -50%, 0);
  display: grid; place-items: center;
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
              background 0.3s, border-color 0.3s;
}
.cursor-label {
  font-family: "Inter", sans-serif; font-size: 0.58rem;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: #fff; opacity: 0; transition: opacity 0.2s;
  white-space: nowrap;
}
.cursor-ring.card     { width: 86px; height: 86px; background: rgba(255,255,255,0.05); }
.cursor-ring.tile     { width: 72px; height: 72px; background: rgba(255,255,255,0.1); }
.cursor-ring.link     { width: 44px; height: 44px; }
.cursor-ring.close    { width: 50px; height: 50px; border-color: #ff9e6a; }
.cursor-ring.card .cursor-label,
.cursor-ring.tile .cursor-label,
.cursor-ring.close .cursor-label { opacity: 1; }

/* ---------- 5. HEADER ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  display: flex; justify-content: center; align-items: center;
  padding: 1rem 1.5rem;
  color: var(--ink);
  transition: transform 0.45s var(--ease), opacity 0.4s;
  pointer-events: none; /* logo is decorative only — clicks pass through */
}
header .brand { pointer-events: auto; }
body.detail-open .header { opacity: 0.6; }
body.player-open .header { opacity: 0; pointer-events: none; }

.brand {
  display: inline-flex; align-items: center;
  color: var(--ink);
}
.brand-logo {
  height: 140px; width: auto; display: block;
  /* Logo PNG is cream-on-transparent (designed for dark bg); invert it for the light theme. */
  filter: brightness(0) saturate(100%) drop-shadow(0 4px 18px rgba(0, 0, 0, 0.18));
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: top center;
  transition:
    height 0.4s var(--ease),
    opacity 0.45s var(--ease),
    transform 0.4s var(--ease),
    filter 0.4s var(--ease);
}
/* Stage 1 — page has scrolled past a small threshold: logo shrinks. */
body.is-scrolled .brand-logo {
  height: 56px;
  filter: brightness(0) saturate(100%) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.15));
}
/* Stage 2 — page has scrolled deeper: logo fades out and lifts away. */
body.is-scrolled-deep .brand-logo {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}
@media (max-width: 700px) {
  .brand-logo { height: 96px; }
  body.is-scrolled .brand-logo { height: 44px; }
}

.nav { display: flex; gap: 2.25rem; align-items: center; }
.nav a {
  font-family: "Inter", sans-serif; font-size: 0.68rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-soft);
  position: relative; padding: 0.25rem 0;
  transition: color 0.3s;
}
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:not(.nav-cta):hover { color: var(--ink); }
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta {
  border: 1px solid var(--line-strong);
  padding: 0.6rem 1.1rem;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.nav-cta:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

@media (max-width: 780px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* ---------- 6. AMBIENT BACKGROUND ---------- */
/* Hidden — the page now uses a flat OTT-dark background instead of a roving image. */
.ambient { display: none; }
.ambient-scene {
  position: absolute; inset: -4%;
  width: 108%; height: 108%;
  transition: opacity 0.9s var(--ease-soft), transform 6s linear;
  animation: ambient-pan 28s var(--ease-soft) infinite alternate;
}
.ambient-scene svg,
.ambient-scene img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
}
@keyframes ambient-pan {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.06) translate(-1.5%, -1%); }
}
.ambient-veil {
  position: absolute; inset: 0;
  background:
    /* strong floor-gradient so the carousel row reads on any background, Prime-style */
    linear-gradient(
      180deg,
      rgba(7, 10, 8, 0) 0%,
      rgba(7, 10, 8, 0) 35%,
      rgba(7, 10, 8, 0.45) 55%,
      rgba(7, 10, 8, 0.88) 78%,
      rgba(7, 10, 8, 0.98) 100%
    ),
    linear-gradient(90deg, rgba(10,15,11,0.55) 0%, rgba(10,15,11,0.15) 45%, transparent 70%);
}
.ambient-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.45) 100%);
}

/* ---------- 7. HOME SCREEN (3-column card grid) ---------- */
.home {
  position: fixed;
  inset: 0;
  z-index: var(--z-cover);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 11rem 2.5rem 4rem;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.5s var(--ease);
}
body.detail-open .home,
body.player-open .home {
  opacity: 0;
  pointer-events: none;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  max-width: 1280px;
  margin: 0 auto;
}

.home-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 18px;
  padding: 0.4rem 0.4rem 0.9rem;   /* tight white frame around image, normal space below */
  /* Resting elevation for clear contrast against the gray page bg. */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.05);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s var(--ease);
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* Hover lift — only on devices with a real pointer, so taps on touch-screens
   don't leave a "stuck hover" state. */
@media (hover: hover) {
  .home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 18px 36px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
  }
}
/* Touch press feedback — quick squish so the tap registers visibly. */
.home-card:active {
  transform: translateY(-2px) scale(0.992);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 18px rgba(0, 0, 0, 0.08);
  transition-duration: 0.15s;
}

.home-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--c, var(--paper-deep));
  position: relative;
}
.home-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s var(--ease-soft);
}
@media (hover: hover) {
  .home-card:hover .home-card-media img { transform: scale(1.05); }
}

.home-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.6rem 0.1rem;
}
.home-card-title {
  font-family: "Italiana", serif;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.45vw, 1.45rem);
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-card-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
  text-align: right;
  padding-top: 0.15rem;
}
.home-card-num {
  font-family: "Inter", sans-serif;
  font-size: 0.62rem; letter-spacing: 0.32em; text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
}
.home-card-type {
  font-family: "Inter", sans-serif;
  font-size: 0.58rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-mute);
}

@media (max-width: 900px) {
  .home { padding: 8rem 1.25rem 3rem; }
  .home-grid { gap: 1rem; }
}

/* ---------- GROUP CARDS (slideshow) ---------- */
.home-card-group .home-card-media {
  position: relative;
  overflow: hidden;
}
.group-slideshow {
  position: absolute; inset: 0;
}
/* Higher specificity than .home-card-media img so the opacity transition wins. */
.home-card-media img.group-slide,
.group-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s var(--ease-soft) !important;
  animation: home-group-pan 26s var(--ease-soft) infinite alternate;
  will-change: opacity, transform;
}
.home-card-media img.group-slide.is-active,
.group-slide.is-active { opacity: 1; }
@keyframes home-group-pan {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.06) translate(-1.5%, -1%); }
}

/* ---------- GROUP VIEW (full-bleed cycling image + member CTAs) ---------- */
.group-view {
  position: fixed; inset: 0;
  z-index: 25;
  background: var(--ink);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.group-view.open {
  opacity: 1;
  pointer-events: auto;
}
body.group-open .home {
  opacity: 0;
  pointer-events: none;
}

/* Cycling background — multiple <img> stacked, fade between them. */
.group-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.group-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s var(--ease-soft);
  animation: group-bg-pan 32s var(--ease-soft) infinite alternate;
}
.group-bg img.is-active { opacity: 1; }
@keyframes group-bg-pan {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.05) translate(-1.5%, -1%); }
}

/* Veil + vignette so the title and CTAs read on any frame. */
.group-overlay {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(14, 14, 16, 0.55) 0%,
      rgba(14, 14, 16, 0)   25%,
      rgba(14, 14, 16, 0)   55%,
      rgba(14, 14, 16, 0.85) 88%,
      rgba(14, 14, 16, 0.98) 100%),
    radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.55) 100%);
}

/* Identical pill to .detail-back so the chrome stays consistent across views.
   Anchored at bottom-left for kiosk reachability. */
.group-back {
  position: fixed;
  bottom: 1.5rem; left: 1.5rem;
  z-index: 30;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1.2rem;
  min-height: 48px;
  background: rgba(10, 15, 11, 0.45);
  border: 1px solid rgba(241, 232, 211, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(241, 232, 211, 0.9);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.35s 0.4s, color 0.3s, border-color 0.3s, background 0.3s;
  touch-action: manipulation;
}
.group-view.open .group-back { opacity: 1; }
.group-back:hover,
.group-back:active { color: var(--gold); border-color: var(--gold); }
.group-back-arrow { font-size: 1rem; line-height: 1; }

.group-header {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 6rem 2rem 0;
  max-width: 1100px;
  margin: 0 auto;
  pointer-events: none;
}
.group-header .group-eyebrow {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.group-header .group-title {
  font-family: "Italiana", serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 0.45rem;
  color: var(--paper);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.group-header .group-sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: var(--paper-deep);
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* CTA strip at bottom-center — same look as detail-view chapter pills. */
.group-cta-strip {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translate(-50%, 30px);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.55s 0.3s var(--ease), transform 0.55s 0.3s var(--ease);
}
.group-view.open .group-cta-strip {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 760px) {
  .group-cta-strip { bottom: 2rem; left: 1rem; right: 1rem; transform: translateY(30px); width: auto; }
  .group-view.open .group-cta-strip { transform: none; }
}
@media (max-width: 600px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 7b. LEGACY COVER (kept while old CSS is being removed) ---------- */
.cover {
  position: fixed; inset: 0;
  z-index: var(--z-cover);
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
}
body.detail-open .cover { opacity: 0; transform: translateY(-30px); }

.cover-content {
  position: absolute;
  left: 2.5rem;
  bottom: 21rem;
  max-width: 560px;
  pointer-events: auto;
}
.cover-eyebrow {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--gold);
  font-family: "Inter", sans-serif;
  font-size: 0.7rem; letter-spacing: 0.32em; text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1rem;
}
.cover-eyebrow-bar { width: 28px; height: 1px; background: var(--gold); flex-shrink: 0; }

.cover-title {
  font-family: "Italiana", serif; font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin: 0 0 0.75rem;
  color: var(--paper);
  text-shadow: 0 2px 28px rgba(0,0,0,0.55);
  /* clamp long residence titles to 2 lines max */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cover-desc {
  font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  color: rgba(241, 232, 211, 0.9);
  line-height: 1.5;
  max-width: 48ch;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}

/* Enter CTA — sits inside the hero content block, below title + desc */
.cover-ctas {
  margin-top: 1.25rem;
  display: flex; align-items: center; gap: 0.65rem;
}

.cover-cta-primary {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.85rem 1.75rem;
  min-height: 48px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 500;
  border-radius: 999px;
  touch-action: manipulation;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease), color 0.35s;
}
.cover-cta-primary:hover,
.cover-cta-primary:active {
  background: var(--gold);
  transform: translateY(-2px);
}
.cover-cta-play { width: 14px; height: 14px; flex-shrink: 0; }

.cover-cta-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(241, 232, 211, 0.35);
  background: rgba(10, 15, 11, 0.4);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  color: var(--paper);
  touch-action: manipulation;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.cover-cta-icon:hover,
.cover-cta-icon:active {
  border-color: var(--gold);
  background: rgba(10, 15, 11, 0.6);
  color: var(--gold);
}
.cover-cta-icon svg { width: 20px; height: 20px; }

/* ---------- Pagination dots (Prime-style) ---------- */
.cover-dots {
  position: absolute;
  left: 50%;
  bottom: 18.25rem;
  transform: translateX(-50%);
  display: flex; gap: 0.45rem;
  pointer-events: auto;
}
.cover-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: rgba(241, 232, 211, 0.32);
  transition: width 0.35s var(--ease), background 0.35s, transform 0.35s var(--ease);
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}
.cover-dot:hover { background: rgba(241, 232, 211, 0.6); }
.cover-dot.active {
  width: 22px;
  background: var(--paper);
}

@media (max-width: 900px) {
  .cover-content { left: 1.5rem; right: 1.5rem; bottom: 20rem; max-width: none; }
  .cover-dots { bottom: 17rem; }
}

/* old page-indicator replaced by dots */
.page-indicator { display: none !important; }

/* ================================================================
   ALTERNATIVE HERO: side-list view (toggled via .hero-toggle)
   ================================================================ */

/* view toggle — circular button, bottom-right corner, reachable on big screen */
.hero-toggle {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 45;                             /* above carousel + dots */
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 1px solid var(--gold);           /* gold border pops on any background */
  background: rgba(10, 15, 11, 0.7);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45),
              0 0 0 4px rgba(176, 149, 88, 0.08);   /* soft gold halo */
  display: grid; place-items: center;
  color: var(--paper);
  pointer-events: auto;
  touch-action: manipulation;
  transition: background 0.3s, color 0.3s, transform 0.35s var(--ease),
              box-shadow 0.3s;
}
.hero-toggle:hover,
.hero-toggle:active {
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55),
              0 0 0 4px rgba(176, 149, 88, 0.2);
}
/* both icons share the same grid cell so they cross-fade in place */
.hero-toggle svg {
  width: 24px; height: 24px;
  grid-area: 1 / 1;
  transition: opacity 0.3s;
}
.hero-toggle .icon-list { opacity: 1; }
.hero-toggle .icon-grid { opacity: 0; }
body.list-view .hero-toggle .icon-list { opacity: 0; }
body.list-view .hero-toggle .icon-grid { opacity: 1; }
body.detail-open .hero-toggle,
body.player-open .hero-toggle { opacity: 0; pointer-events: none; }

/* vertical section list — only rendered when .list-view is active */
.section-list {
  position: fixed;
  top: 50%;
  right: 1rem;
  transform: translate(40px, -50%);
  z-index: 18;
  width: 320px;
  max-height: calc(100vh - 8rem);
  padding: 0.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(176, 149, 88, 0.4) transparent;
}
.section-list::-webkit-scrollbar { width: 4px; }
.section-list::-webkit-scrollbar-thumb { background: rgba(176, 149, 88, 0.4); }
body.list-view .section-list {
  opacity: 1; pointer-events: auto;
  transform: translate(0, -50%);
}

.section-list-item {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.9rem 1.25rem;
  min-height: 52px;
  background: rgba(10, 15, 11, 0.55);
  border: 1px solid rgba(241, 232, 211, 0.15);
  backdrop-filter: blur(10px) saturate(140%);
  color: var(--paper);
  font-family: "Italiana", serif;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-align: left;
  touch-action: manipulation;
  transition: background 0.3s, border-color 0.3s, color 0.3s,
              transform 0.35s var(--ease);
}
.section-list-item:hover,
.section-list-item:active {
  border-color: var(--gold);
  transform: translateX(-4px);
}
.section-list-num {
  font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: 0.85rem; color: var(--gold);
  letter-spacing: 0.1em;
  min-width: 1.5rem;
}
.section-list-title { flex: 1; }
.section-list-item[aria-current="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}
.section-list-item[aria-current="true"] .section-list-num { color: var(--ink); opacity: 0.7; }

/* bottom-center chapter pills (visible when a section is active in list mode) */
.list-ctas {
  position: fixed;
  left: 50%; bottom: 2.5rem;
  transform: translate(-50%, 30px);
  z-index: 16;
  display: flex; gap: 0.75rem;
  align-items: center; justify-content: center;
  flex-wrap: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s 0.1s var(--ease), transform 0.5s 0.1s var(--ease);
}
body.list-view .list-ctas {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, 0);
}

/* dim carousel-view chrome when in list view (non-destructive — we only toggle opacity) */
body.list-view .carousel,
body.list-view .cover-dots,
body.list-view .cover-content,
body.list-view .cover-ctas {
  opacity: 0; pointer-events: none;
}
body.list-view .ambient-scene {
  /* let the hero show at its natural brightness in list view */
  filter: none;
}
/* drop both full-screen dark overlays in list view only — the section list
   and chapter pills carry their own glass backgrounds, so the veils aren't
   needed for readability here */
body.list-view .ambient-veil,
body.list-view .ambient-vignette { opacity: 0; }

@media (max-width: 900px) {
  .section-list { width: 260px; right: 0.5rem; }
  .section-list-item { font-size: 0.95rem; padding: 0.75rem 1rem; min-height: 48px; }
  .list-ctas { left: 0.75rem; right: 0.75rem; transform: translateY(30px); }
  body.list-view .list-ctas { transform: translateY(0); }
}

/* ---------- 8. PAGE INDICATOR ---------- */
.page-indicator {
  position: fixed;
  left: 2.5rem; bottom: 17.5rem;
  z-index: var(--z-carousel);
  display: flex; align-items: center; gap: 0.85rem;
  font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: 1rem;
  color: rgba(241, 232, 211, 0.7);
  transition: opacity 0.5s;
}
body.detail-open .page-indicator { opacity: 0; pointer-events: none; }
.page-current { color: var(--paper); font-weight: 500; font-size: 1.25rem; }
.page-total { color: rgba(241,232,211,0.5); font-size: 0.95rem; }
.page-rail {
  width: 90px; height: 1px; background: rgba(241,232,211,0.2);
  position: relative; overflow: hidden;
}
.page-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--gold);
  transition: width 0.55s var(--ease);
}

@media (max-width: 900px) {
  .page-indicator { left: 1.5rem; bottom: 16.5rem; }
}

/* ---------- 9. CAROUSEL ---------- */
.carousel {
  position: fixed;
  bottom: 3rem; left: 0; right: 0;
  z-index: var(--z-carousel);
  display: flex; align-items: center;
  transition: opacity 0.55s var(--ease), transform 0.65s var(--ease);
}
body.detail-open .carousel { opacity: 0; transform: translateY(40px); pointer-events: none; }

.carousel-arrow {
  flex: 0 0 48px; height: 48px;
  display: grid; place-items: center;
  color: rgba(241, 232, 211, 0.75);
  margin: 0 1rem;
  transition: color 0.3s, transform 0.3s var(--ease);
}
.carousel-arrow svg { width: 22px; height: 22px; }
.carousel-arrow:hover { color: var(--gold); transform: scale(1.08); }
.carousel-arrow:disabled { opacity: 0.25; }

.carousel-track {
  flex: 1; min-width: 0;
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 1.5rem calc(50vw - 150px) 1.5rem calc(50vw - 150px);
  -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

/* ---------- 10. CARD ---------- */
.card {
  position: relative;
  flex: 0 0 280px;
  height: 190px;
  scroll-snap-align: center;
  overflow: hidden;
  background: #222;
  border: 0; padding: 0;
  color: var(--paper);
  transition: transform 0.55s var(--ease), opacity 0.5s;
  opacity: 0.55;
  will-change: transform;
}
.card.focused { opacity: 1; transform: scale(1.06); }
.card:hover   { opacity: 1; }

/* Gold hairline that appears on hover/focus */
.card::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.45s var(--ease);
  z-index: 3;
}
.card:hover::after,
.card.focused:hover::after { transform: scaleX(1); }

.card-media {
  position: absolute; inset: -4%;
  width: 108%; height: 108%;
  transition: transform 0.55s var(--ease);
  will-change: transform;
}
.card-media svg,
.card-media img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
}

.card-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top,
    rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 55%, transparent 80%);
}
.card-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.4) 110%);
  opacity: 0.65;
}

.card-index {
  position: absolute; top: 0.75rem; left: 0.95rem;
  z-index: 2;
  font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: 0.85rem; color: rgba(241, 232, 211, 0.82);
  letter-spacing: 0.04em;
}
.card-type {
  position: absolute; top: 0.85rem; right: 0.95rem;
  z-index: 2;
  font-family: "Inter", sans-serif;
  font-size: 0.56rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(241, 232, 211, 0.6);
}
.card-meta {
  position: absolute;
  left: 1rem; bottom: 0.9rem; right: 1rem;
  z-index: 2;
  transition: transform 0.55s var(--ease);
}
.card.focused .card-meta { transform: translateY(-2px); }

.card-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.6rem; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.35rem;
}
.card-title {
  font-family: "Italiana", serif; font-weight: 400;
  font-size: 1.3rem; line-height: 1.05;
  margin: 0 0 0.15rem;
}
.card-sub {
  font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: 0.88rem;
  color: rgba(241, 232, 211, 0.82);
  line-height: 1.2;
}

@media (max-width: 640px) {
  .card { flex-basis: 220px; height: 160px; }
  .carousel-track { padding-left: calc(50vw - 120px); padding-right: calc(50vw - 120px); }
}

/* ---------- 11. DETAIL VIEW ---------- */
.detail {
  position: fixed; inset: 0;
  z-index: var(--z-detail);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s;
}
.detail.open { opacity: 1; pointer-events: auto; }

.detail-bg {
  position: absolute;
  overflow: hidden;
  will-change: left, top, width, height;
}
.detail-bg svg,
.detail-bg img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
}

.detail-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(10, 15, 11, 0.9) 0%,
    rgba(10, 15, 11, 0.65) 7%,
    transparent 18%
  );
  opacity: 0; transition: opacity 0.45s 0.5s;
}
.detail.open .detail-overlay { opacity: 1; }

/* Back button */
.detail-back {
  position: fixed;
  bottom: 1.5rem; left: 1.5rem;
  z-index: 3;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1.2rem;
  min-height: 48px;
  background: rgba(10, 15, 11, 0.45);
  border: 1px solid rgba(241, 232, 211, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(10px) saturate(150%);
  font-family: "Inter", sans-serif;
  font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(241, 232, 211, 0.9);
  opacity: 0;
  transition: opacity 0.35s 0.6s, color 0.3s, border-color 0.3s, background 0.3s;
  touch-action: manipulation;
}
.detail.open .detail-back { opacity: 1; }
.detail-back:hover,
.detail-back:active { color: var(--gold); }
.detail-back-arrow { font-size: 1rem; }

/* Detail header content */
.detail-header {
  position: absolute;
  left: 2.5rem; bottom: 17rem;
  max-width: 560px; z-index: 2;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.55s 0.55s var(--ease), transform 0.55s 0.55s var(--ease);
}
.detail.open .detail-header { opacity: 1; transform: none; }

.detail-crumb {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.detail-rule { width: 26px; height: 1px; background: var(--gold); flex-shrink: 0; }
.detail-sep { opacity: 0.5; }

.detail-title {
  font-family: "Italiana", serif; font-weight: 400;
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 0.98;
  margin: 0 0 0.6rem;
  color: var(--paper);
  letter-spacing: 0.005em;
}
.detail-sub {
  font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  color: var(--rust);
  margin-bottom: 1.5rem;
}
.detail-desc {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem; line-height: 1.55;
  color: rgba(241, 232, 211, 0.88);
  max-width: 48ch;
  margin: 0;
}

/* Side navigation arrows in detail */
.detail-side {
  position: fixed; top: 50%; transform: translateY(-50%);
  z-index: 2;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  color: rgba(241, 232, 211, 0.55);
  font-family: "Italiana", serif; font-size: 1.8rem;
  border: 1px solid rgba(241, 232, 211, 0.15);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s 0.6s, color 0.3s, border-color 0.3s, transform 0.4s;
}
.detail.open .detail-side { opacity: 1; }
.detail-side:hover { color: var(--gold); border-color: var(--gold); }
.detail-side-prev { left: 2rem; }
.detail-side-next { right: 2rem; }

@media (max-width: 900px) {
  .detail-header { left: 1.5rem; right: 1.5rem; bottom: 16rem; }
  .detail-side { display: none; }
}

/* ---------- 12. CTA BUTTONS (chapter pills, bottom-center) ---------- */
.cta-strip {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  z-index: 2;
  opacity: 0;
  transform: translate(-50%, 30px);
  transition: opacity 0.55s 0.5s var(--ease), transform 0.55s 0.5s var(--ease);
}
.detail.open .cta-strip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cta-tiles {
  display: flex; gap: 0.75rem;
  justify-content: center; align-items: center;
  flex-wrap: wrap;
}

.cta-tile {
  font-family: "Italiana", serif; font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.05em;
  padding: 0.95rem 2.1rem;
  color: var(--paper);
  background: rgba(10, 15, 11, 0.55);
  border: 1px solid rgba(241, 232, 211, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  white-space: nowrap;
  transition:
    background 0.4s var(--ease),
    border-color 0.4s var(--ease),
    color 0.4s var(--ease),
    transform 0.4s var(--ease);
}
@media (hover: hover) {
  .cta-tile:hover {
    background: var(--gold);
    color: var(--ink);
    border-color: var(--gold);
    transform: translateY(-3px);
  }
}
.cta-tile:active {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  transform: translateY(0) scale(0.97);
  transition-duration: 0.12s;
}

@media (max-width: 760px) {
  .cta-strip { bottom: 2rem; left: 1rem; right: 1rem; transform: translateY(30px); }
  .detail.open .cta-strip { transform: none; }
  .cta-tile { font-size: 0.92rem; padding: 0.85rem 1.5rem; }
}

/* ---------- 13. VIDEO PLAYER ---------- */
.player {
  position: fixed; inset: 0;
  z-index: var(--z-player);
  background: #070a08;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s;
}
.player.open { opacity: 1; pointer-events: auto; }

.player-stage {
  position: absolute; inset: 0; overflow: hidden;
}
.player-scene {
  position: absolute; inset: 0;
  animation: player-ken 20s var(--ease-soft) infinite alternate;
}
.player-scene svg,
.player-scene video {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
}
/* stop Ken Burns pan when a real video is playing — the video has its own motion */
.player-scene:has(video) { animation: none; }
@keyframes player-ken {
  from { transform: scale(1); }
  to   { transform: scale(1.08) translate(-1%, -1%); }
}

.player.loading .player-stage::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(90deg, #070a08, #1a2b1f, #070a08);
  background-size: 200% 100%;
  animation: skeleton 1.4s linear infinite;
}
@keyframes skeleton { to { background-position: -200% 0; } }

.player-vignette { display: none; }

/* chapter pills shown over the playing video; hide when player is idle */
.player-ctas {
  position: absolute;
  left: 50%; bottom: 5.25rem;
  transform: translateX(-50%);
  z-index: 5;
  display: flex; gap: 0.75rem; flex-wrap: nowrap;
  justify-content: center; align-items: center;
  max-width: calc(100vw - 2rem);
  padding: 0 1rem;
  transition: opacity 0.35s var(--ease);
}
.player.idle .player-ctas { opacity: 0; pointer-events: none; }

/* slightly tighter pills in the player overlay so three fit in one row */
.player-ctas .cta-tile {
  font-size: 0.92rem;
  padding: 0.8rem 1.6rem;
  white-space: nowrap;
}
.player-ctas .cta-tile[aria-current="true"] {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* if the three long pills really can't fit, let them scroll instead of wrap */
@media (max-width: 620px) {
  .player-ctas {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  .player-ctas::-webkit-scrollbar { display: none; }
}

.player-top {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 4;
  padding: 1rem 1.5rem 1.5rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.35), transparent 75%);
  display: flex; justify-content: space-between; align-items: flex-start;
  color: var(--paper);
  transition: opacity 0.5s;
}
.player.idle .player-top,
.player.idle .player-bottom { opacity: 0; }

.player-meta { display: flex; flex-direction: column; gap: 0.25rem; }
.player-eb {
  font-family: "Inter", sans-serif;
  font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
}
.player-tt {
  font-family: "Italiana", serif;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}

.player-close {
  width: 44px; height: 44px;
  margin-left: 0.75rem;
  border: 1px solid rgba(241, 232, 211, 0.3);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--paper);
  transition: border-color 0.3s, transform 0.4s var(--ease), color 0.3s;
}
.player-close svg { width: 16px; height: 16px; }
.player-close:hover,
.player-close:active { border-color: #ff9e6a; color: #ff9e6a; transform: rotate(90deg); }

.player-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 4;
  padding: 1.5rem 1.5rem 1.25rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.35), transparent 75%);
  color: var(--paper);
  transition: opacity 0.5s;
}

/* progress row hidden — touch-first design has no scrubber / play button */
.player-progress-row { display: none; }

.player-icon-btn {
  width: 56px; height: 56px;   /* generous tap target for big-screen kiosks */
  display: grid; place-items: center;
  color: var(--paper);
  transition: opacity 0.25s, transform 0.25s var(--ease);
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .player-icon-btn:hover { opacity: 0.7; }
}
.player-icon-btn:active { transform: scale(0.92); opacity: 0.85; }
.player-icon-btn svg { width: 22px; height: 22px; position: absolute; }
.player-icon-btn .icon-pause { display: none; }
.player.playing .icon-play { display: none; }
.player.playing .icon-pause { display: block; }

/* visually thin track, large tappable hit area for touch */
.player-track {
  flex: 1; position: relative;
  height: 22px;
  display: flex; align-items: center;
  cursor: pointer;
  touch-action: manipulation;
}
.player-track::before {
  content: ""; position: absolute;
  left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 2px; background: rgba(241, 232, 211, 0.22);
  transition: height 0.25s var(--ease);
  pointer-events: none;
}
.player-track:hover::before,
.player-track:active::before { height: 4px; }
.player-fill {
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: var(--gold);
  width: 0%;
  transition: width 0.1s linear, height 0.25s var(--ease);
  pointer-events: none;
}
.player-track:hover .player-fill,
.player-track:active .player-fill { height: 4px; }
.player-dot {
  position: absolute; top: 50%; left: 0;
  width: 12px; height: 12px;
  background: var(--gold); border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.25s var(--ease), left 0.1s linear;
  pointer-events: none;
}
.player-track:hover .player-dot,
.player-track:active .player-dot { transform: translate(-50%, -50%) scale(1); }

.player-time {
  font-family: "Cormorant Garamond", serif; font-style: italic;
  font-size: 0.88rem; color: rgba(241, 232, 211, 0.82);
  white-space: nowrap; display: flex; gap: 0.35rem;
}
.time-sep { opacity: 0.4; }

.player-controls {
  display: flex; justify-content: space-between; align-items: center;
}
.player-controls button {
  font-family: "Inter", sans-serif;
  font-size: 0.65rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(241, 232, 211, 0.88);
  padding: 0.45rem 0.7rem;
  transition: color 0.3s;
}
.player-controls button:hover { color: var(--gold); }
.pc-left, .pc-right { display: flex; align-items: center; }
.pc-sep { color: rgba(241, 232, 211, 0.3); margin: 0 0.2rem; }

#pMute .mute-off { display: none; }
.player.muted #pMute .mute-on { display: none; }
.player.muted #pMute .mute-off { display: inline; color: rgba(241, 232, 211, 0.5); }

.player-play-pulse {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 80px; height: 80px;
  border: 1px solid rgba(241, 232, 211, 0.7);
  border-radius: 50%;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  z-index: 5;
  transition: opacity 0.25s, transform 0.55s var(--ease);
  backdrop-filter: blur(6px);
}
.player-play-pulse.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.3);
}
.player-play-pulse::after {
  content: ""; width: 12px; height: 14px;
  border-left: 12px solid var(--paper);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 3px;
}
.player-play-pulse.paused::after {
  content: ""; border: 0;
  width: 14px; height: 16px; margin-left: 0;
  background: linear-gradient(to right,
    var(--paper) 0%, var(--paper) 32%,
    transparent 32%, transparent 68%,
    var(--paper) 68%, var(--paper) 100%);
}

/* ---------- 14. ACCESSIBILITY ---------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .ambient-scene { animation: none; }
  .player-scene { animation: none; }
}
