/* ==========================================================================
   chapters.css — scene composition, per-chapter light, type and detail blocks
   ========================================================================== */

/* --------------------------------------------------------------------------
   Scene shell
   -------------------------------------------------------------------------- */

.scene {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: clamp(4.5rem, 12vh, 8rem) var(--gutter);
  overflow: clip;
  isolation: isolate;
  color: var(--scene-ink, var(--ink));
  --scene-ink: #1c1712;
  --scene-accent: #8a6a3b;
  --panel-bg: rgba(255, 253, 248, 0.72);
}

.scene__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
}

.scene__inner--center { text-align: center; }

.scene__inner--center .kicker,
.scene__inner--center .scene__actions { justify-content: center; }

.scene__inner--center .scene__rule { margin-inline: auto; }
.scene__inner--center .scene__venue { margin-inline: auto; }

.scene__numeral {
  position: absolute;
  top: clamp(1.75rem, 7vh, 4.5rem);
  right: var(--gutter);
  z-index: 1;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(5rem, 24vw, 14rem);
  line-height: 0.72;
  color: currentColor;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

.scene__title {
  margin-top: clamp(0.85rem, 2.6vh, 1.5rem);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-title);
  line-height: 0.98;
  letter-spacing: -0.008em;
}

.scene__sub {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 4.6vw, 1.5rem);
  line-height: 1.2;
  color: var(--scene-accent);
}

.scene__meta {
  margin-top: clamp(0.9rem, 2.4vh, 1.25rem);
  font-size: clamp(0.7rem, 2.7vw, 0.78rem);
  letter-spacing: 0.2em;
  line-height: 1.7;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 78%, transparent);
}

.scene__meta .tbc {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0.12em 0.4em;
  border: 1px solid color-mix(in srgb, currentColor 26%, transparent);
  border-radius: 3px;
  font-size: 0.86em;
  letter-spacing: 0.12em;
  opacity: 0.65;
  vertical-align: 0.08em;
}

.scene__rule {
  width: 2.75rem;
  height: 1px;
  margin-block: clamp(1.25rem, 3.2vh, 1.75rem);
  background: currentColor;
  opacity: 0.28;
}

.scene__venue {
  max-width: 21rem;
  font-size: clamp(0.72rem, 2.9vw, 0.78rem);
  line-height: 1.6;
  letter-spacing: 0.045em;
  color: color-mix(in srgb, currentColor 70%, transparent);
}

.scene__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: clamp(1.25rem, 3.2vh, 1.9rem);
}

/* --------------------------------------------------------------------------
   Per-chapter light + tone
   -------------------------------------------------------------------------- */

.scene--arrival {
  --scene-ink: #f6efe2;
  --scene-accent: #d8bb8a;
  --panel-bg: rgba(16, 13, 10, 0.62);
  padding-block: clamp(3rem, 8vh, 5rem) clamp(2.5rem, 6vh, 4rem);
}

.scene--paath {
  --scene-ink: #2a2018;
  --scene-accent: #8a6a3b;
  min-height: 108svh;
}

.scene--bhog {
  --scene-ink: #2c2119;
  --scene-accent: #9a6a30;
}

.scene--shagun {
  --scene-ink: #2b2116;
  --scene-accent: #a07a34;
}

.scene--haldi {
  --scene-ink: #2a2109;
  --scene-accent: #a3741a;
}

.scene--rest {
  --scene-ink: #2b251d;
  --scene-accent: #8c7a5e;
  min-height: 100svh;
}

.scene--baraat {
  --scene-ink: #2a1a10;
  --scene-accent: #7a3a1a;
}

.scene--wedding {
  --scene-ink: #3b2426;
  --scene-accent: #a86b5c;
  --fs-title: clamp(2.6rem, 12vw, 5.4rem);
  min-height: 132svh;
}

.scene--closing {
  --scene-ink: #f4ecdd;
  --scene-accent: #d8bb8a;
  --panel-bg: rgba(12, 11, 9, 0.6);
  min-height: 100svh;
  padding-block: clamp(4.5rem, 12vh, 8rem) clamp(2rem, 6vh, 4rem);
}

/* --------------------------------------------------------------------------
   Arrival / hero
   -------------------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.9rem, 2.6vh, 1.6rem);
  text-align: center;
}

.hero__eyebrow {
  font-size: var(--fs-kicker);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--scene-accent);
  opacity: 0.9;
}

.monogram {
  position: relative;
  width: clamp(8.75rem, 33vw, 11.5rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-block: clamp(0.2rem, 1vh, 0.6rem);
}

.monogram__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--scene-accent);
  opacity: 0.85;
}

.monogram__frame .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

/* Without JS the rings must simply be there. */
html:not(.js) .monogram__frame .draw { stroke-dashoffset: 0; }

.monogram__letters {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.06em;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.3rem, 9.5vw, 3.1rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.monogram__letters em {
  font-style: italic;
  font-size: 0.56em;
  color: var(--scene-accent);
  transform: translateY(-0.06em);
}

.hero__names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.26em;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-hero);
  line-height: 1;
  letter-spacing: 0.002em;
  white-space: nowrap;
}

.hero__amp {
  font-style: italic;
  font-size: 0.5em;
  color: var(--scene-accent);
  transform: translateY(-0.08em);
}

.hero__parents {
  display: grid;
  gap: 0.3rem;
  max-width: 30rem;
  font-size: clamp(0.7rem, 2.75vw, 0.78rem);
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--scene-ink) 72%, transparent);
}

.hero__tagline {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--scene-accent);
}

.countdown {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  margin-top: clamp(0.4rem, 1.6vh, 0.9rem);
}

.countdown__label {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.45;
}

.countdown__date {
  font-family: var(--font-display);
  font-size: clamp(1rem, 4vw, 1.22rem);
  letter-spacing: 0.04em;
  color: var(--scene-accent);
}

.countdown__date span {
  font-family: var(--font-sans);
  font-size: 0.62em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
}

.countdown__grid {
  display: flex;
  align-items: stretch;
  border-top: 1px solid color-mix(in srgb, var(--scene-ink) 16%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--scene-ink) 16%, transparent);
  padding-block: 0.55rem;
}

.countdown__grid li {
  min-width: 4.1rem;
  padding-inline: 0.55rem;
  text-align: center;
}

.countdown__grid li + li {
  border-left: 1px solid color-mix(in srgb, var(--scene-ink) 13%, transparent);
}

.countdown__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6.2vw, 1.85rem);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown__unit {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.47rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.45;
}

.countdown__passed {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--scene-accent);
}

/* Without JS the clock cannot tick, so the date stands on its own. */
html:not(.js) .countdown__grid { display: none; }
html:not(.js) .countdown__label { opacity: 0.55; }

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin-top: clamp(0.5rem, 2.4vh, 1.2rem);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--scene-accent);
  transition: opacity 0.6s var(--ease-soft);
}

.scroll-cue .icon {
  width: 1rem;
  height: 1rem;
  animation: cue-drift 2.9s ease-in-out infinite;
}

.scroll-cue::after {
  content: "";
  width: 1px;
  height: 2.2rem;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--scene-accent) 55%, transparent), transparent);
}

.scroll-cue.is-hidden { opacity: 0; pointer-events: none; }

@keyframes cue-drift {
  0%, 100% { transform: translateY(-2px); opacity: 0.55; }
  50%      { transform: translateY(3px); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Two-phase chapters (day → night inside one chapter)
   -------------------------------------------------------------------------- */

.scene--phased {
  display: block;
  padding: 0;
}

.phase {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: clamp(4.5rem, 12vh, 8rem) var(--gutter);
  overflow: clip;
}

.phase__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
}

.phase--night {
  color: var(--cream, #f6efe2);
  --scene-ink: #f4ecdd;
  --scene-accent: #dcc08d;
  --panel-bg: rgba(10, 12, 18, 0.62);
}

.phase--night .scene__venue { color: color-mix(in srgb, currentColor 58%, transparent); }

@media (min-width: 900px) {
  .phase--b .phase__inner {
    margin-left: auto;
    margin-right: 0;
    max-width: 33rem;
  }

  .phase--b .scene__numeral { left: auto; right: 8vw; }
}

/* --------------------------------------------------------------------------
   Chapter 6 date marker
   -------------------------------------------------------------------------- */

.date-mark {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  text-align: center;
}

.date-mark__day {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(6rem, 30vw, 13rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--scene-accent);
}

.date-mark__month {
  font-size: clamp(0.6rem, 2.6vw, 0.68rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 62%, transparent);
}

.date-mark__rule {
  width: 3.5rem;
  height: 1px;
  margin-block: 0.9rem;
  background: currentColor;
  opacity: 0.25;
}

.date-mark__event {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 4.6vw, 1.5rem);
  color: var(--scene-accent);
}

/* --------------------------------------------------------------------------
   Chapter 7 bloom
   -------------------------------------------------------------------------- */

.scene--wedding .scene__inner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: min(122%, 34rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    color-mix(in srgb, #fff4e2 62%, transparent) 0%,
    transparent 66%
  );
  opacity: 0.7;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Closing + week list
   -------------------------------------------------------------------------- */

.closing__venue {
  margin-top: clamp(1rem, 2.6vh, 1.5rem);
}

.closing__venue h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 8.6vw, 3.2rem);
  line-height: 1.02;
}

.closing__venue p {
  margin-top: 0.35rem;
  font-size: clamp(0.78rem, 3.2vw, 0.9rem);
  letter-spacing: 0.08em;
  color: color-mix(in srgb, currentColor 62%, transparent);
}

.closing__map { margin-top: clamp(1.1rem, 3vh, 1.6rem); }

.week {
  margin-top: clamp(2.4rem, 7vh, 3.75rem);
  text-align: left;
  border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

.week__title {
  margin-top: clamp(2rem, 5vh, 2.75rem);
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.45;
}

.week__row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: baseline;
  gap: 0.9rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.week__date {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--scene-accent);
  white-space: nowrap;
}

.week__name {
  font-size: clamp(0.8rem, 3.1vw, 0.88rem);
  line-height: 1.45;
}

.week__time {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
}

.week__add {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: center;
  min-height: 40px;
  padding: 0.5rem 0.1rem 0.35rem;
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 72%, transparent);
  border-bottom: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  transition: color 0.35s var(--ease-soft), border-color 0.35s var(--ease-soft);
  white-space: nowrap;
}

.week__add:hover { color: currentColor; border-color: currentColor; }
.week__add .icon { width: 0.8rem; height: 0.8rem; }

.week__note {
  margin-top: 0.9rem;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  line-height: 1.6;
  opacity: 0.38;
}

/* Narrow phones: the add link becomes an icon so the ceremony name keeps room. */
@media (max-width: 360px) {
  .week__row {
    grid-template-columns: 2.85rem 1fr auto;
    gap: 0.6rem;
  }

  .week__time { letter-spacing: 0.1em; }

  .week__add {
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding-inline: 0.35rem;
  }

  .week__add span { display: none; }
  .week__add .icon { width: 0.95rem; height: 0.95rem; }
}

.closing__line {
  margin-top: clamp(2.5rem, 7vh, 4rem);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 4.6vw, 1.5rem);
  line-height: 1.5;
  color: var(--scene-accent);
}

.closing__families {
  margin-top: 1.1rem;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.6;
}

.closing__share {
  margin-top: clamp(1.6rem, 4vh, 2.4rem);
  display: flex;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Decorative chapter motifs — placeholder line art, swap with final icons
   -------------------------------------------------------------------------- */

.motif {
  position: absolute;
  z-index: 1;
  width: clamp(8.5rem, 36vw, 15rem);
  color: var(--scene-accent);
  opacity: 0.3;
  pointer-events: none;
}

.motif svg {
  width: 100%;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.motif svg * { vector-effect: non-scaling-stroke; }

.motif--paath  { left: -1.5rem; bottom: 4%; transform: rotate(-6deg); }
.motif--bhog   { right: -1rem; bottom: 6%; transform: rotate(5deg); }
.motif--ring   { right: -1rem; bottom: 7%; transform: rotate(4deg); }
.motif--haldi  { left: -1.25rem; bottom: 5%; transform: rotate(-8deg); }
.motif--baraat { right: 2%; bottom: 12%; width: clamp(7rem, 30vw, 12rem); transform: rotate(4deg); }
.motif--wedding{ left: -1rem; bottom: 6%; transform: rotate(-5deg); }

@media (max-width: 620px) {
  .motif { opacity: 0.2; }
  .scene__numeral { opacity: 0.055; }
}

/* --------------------------------------------------------------------------
   No-JavaScript baseline: every chapter paints its own light, stacked
   -------------------------------------------------------------------------- */

html:not(.js) .scene--arrival {
  background:
    radial-gradient(90% 70% at 18% 8%, rgba(138, 90, 43, 0.55), transparent 60%),
    radial-gradient(80% 60% at 82% 92%, rgba(36, 26, 19, 0.9), transparent 70%),
    #0d0c0b;
}

html:not(.js) .scene--paath  { background: radial-gradient(90% 70% at 20% 10%, #fff3da, transparent 62%), #f4ebdc; }
html:not(.js) .scene--bhog   { background: radial-gradient(90% 70% at 20% 10%, #ffe9c0, transparent 62%), #f8eedb; }
html:not(.js) .scene--shagun { background: radial-gradient(80% 60% at 20% 10%, #ffdf9e, transparent 60%), #f6e6c8; }
html:not(.js) .scene--shagun .phase--night { background: linear-gradient(165deg, #0b1f2a, #0a1a17 60%, #101a2e); }
html:not(.js) .scene--haldi  { background: radial-gradient(84% 64% at 24% 8%, #ffe9a6, transparent 62%), #f6d979; }
html:not(.js) .scene--haldi .phase--night { background: linear-gradient(165deg, #1a1024, #120c1a 60%, #241206); }
html:not(.js) .scene--rest   { background: #f2eee5; }
html:not(.js) .scene--baraat { background: linear-gradient(180deg, #c87a44 0%, #8a4a2a 46%, #0c1422 100%); }
html:not(.js) .scene--wedding{ background: radial-gradient(90% 70% at 50% 100%, #ffe1c9, transparent 60%), #fbe6dc; }
html:not(.js) .scene--closing{ background: #12100e; }
