:root {
  --ink: #2a241c;
  --wine: #6d2f2c;
  --olive: #3d4a34;
  --abig: #2e5c44;
  --david: #1d3b4e;
  --nabal: #8b3b30;
  --hand: #5c5348;
  --stage: #6f655b;
  --gold: #b08948;
  --paper: #f4efe6;
  --paper-2: #ebe3d4;
  --night: #1c1814;
  --line: rgba(42, 36, 28, 0.12);
  --serif: "Amiri", "Times New Roman", serif;
  --sans: "Cairo", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.95;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 6vw;
  background: rgba(244, 239, 230, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.brand {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--wine);
  text-decoration: none;
  letter-spacing: 0;
}
.top nav { display: flex; gap: 1.1rem; }
.top a {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink);
  text-decoration: none;
}
.top nav a:hover { color: var(--wine); }

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background:
    radial-gradient(ellipse at top, rgba(176, 137, 72, 0.18), transparent 55%),
    linear-gradient(180deg, #f7f2ea 0%, #efe4d2 100%);
}
.kicker, .eyebrow, .place, .meta {
  font-family: var(--sans);
  letter-spacing: 0.18em;
  color: var(--gold);
}
.kicker { margin: 0; font-size: 0.85rem; }
.hero h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: 1.25;
  font-weight: 700;
  color: var(--wine);
}
.meta { margin: 0.9rem 0 0; font-size: 0.82rem; }
.hero blockquote {
  margin: 1.6rem 0 0;
  font-style: italic;
  font-size: 1.45rem;
  color: var(--olive);
}
.hero blockquote::before { content: "«"; }
.hero blockquote::after { content: "»"; }

.cast {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 0.8rem 1.4rem;
  margin: 2.4rem 0 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--line);
  width: min(720px, 100%);
  text-align: right;
}
.cast li { display: flex; flex-direction: column; }
.cast span { font-family: var(--sans); font-weight: 700; font-size: 1rem; }
.cast small { color: var(--stage); font-family: var(--sans); font-size: 0.82rem; }
.nabal { color: var(--nabal); }
.david { color: var(--david); }
.abig { color: var(--abig); }
.hand { color: var(--hand); }

.scene { padding-bottom: 1rem; }
.scene figure { margin: 0; position: relative; }
.scene img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: cover;
  object-position: center;
}
.scene figcaption {
  position: absolute;
  right: 1.2rem;
  bottom: 1rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  background: rgba(28, 24, 20, 0.72);
  color: #f6f1e8;
  font-family: var(--sans);
  font-size: 0.85rem;
}

.script {
  width: min(740px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.2rem 0 4.5rem;
}
.eyebrow { margin: 0; font-size: 0.78rem; }
.script h2 {
  margin: 0.15rem 0 0.2rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.35;
  color: var(--olive);
}
.place { margin: 0 0 1.2rem; font-size: 0.95rem; letter-spacing: 0.08em; }
.stage, .act {
  color: var(--stage);
  font-style: italic;
  font-size: 1.05rem;
}
.stage { margin: 0.6rem 0 1.1rem; }
.act { margin: 0.1rem 0 0.15rem; font-size: 0.98rem; }
.who {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 1.35rem 0 0;
}
.line { margin: 0.15rem 0 0.35rem; }

.mountain { background: #f3eee6; }
.mountain .script h2 { color: var(--david); }
.road { background: #f7f3ea; }
.road .script h2 { color: var(--abig); }

.shock {
  background: #241e1a;
  color: #f3eadf;
  width: 100%;
  max-width: none;
  padding: 4.5rem 8vw 3.5rem;
}
.shock h2, .shock .line { color: #f6f1e8; }
.shock .stage, .shock .act { color: #cbbba6; }
.shock .eyebrow { color: #d7b56a; }
.blackout {
  margin: 2rem auto;
  max-width: 36rem;
  text-align: center;
  font-style: italic;
  color: #f6f1e8;
  border-top: 1px solid rgba(246, 241, 232, 0.25);
  border-bottom: 1px solid rgba(246, 241, 232, 0.25);
  padding: 1rem 0;
}
.joy h2 { color: var(--wine); }
.curtain {
  margin: 2.2rem 0 0;
  text-align: center;
  color: var(--wine);
  font-size: 1.45rem;
  letter-spacing: 0.08em;
}

@keyframes curtain {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.hero .kicker,
.hero h1,
.hero .meta,
.hero blockquote,
.hero .cast {
  animation: curtain 1.15s ease both;
}
.hero h1 { animation-delay: 0.18s; }
.hero .meta { animation-delay: 0.4s; }
.hero blockquote { animation-delay: 0.62s; }
.hero .cast { animation-delay: 0.9s; }

html.js .scene figure {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.15s ease, transform 1.15s ease;
}
html.js .scene figure.shown {
  opacity: 1;
  transform: none;
}
html.js .wedding figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #0c0a08;
  opacity: 1;
  transition: opacity 1.7s ease 0.65s;
  pointer-events: none;
}
html.js .wedding figure.shown::after { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .hero .kicker,
  .hero h1,
  .hero .meta,
  .hero blockquote,
  .hero .cast {
    animation: none;
  }
  html.js .scene figure,
  html.js .scene figure.shown {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html.js .wedding figure::after { content: none; }
}

@media (max-width: 720px) {
  body { font-size: 1.08rem; }
  .cast { grid-template-columns: 1fr 1fr; }
  .top { padding-inline: 1rem; }
  .scene img { max-height: 52vh; }
  .shock { padding-inline: 1.2rem; }
}

@page { size: A4; margin: 1.15cm 1.75cm; }

@media print {
  .top { display: none; }
  body {
    background: #fff;
    font-size: 11.5pt;
    line-height: 1.4;
  }
  .hero {
    min-height: 0;
    padding: 0 0 0.2cm;
    background: none;
    break-after: auto;
  }
  .hero .kicker,
  .hero h1,
  .hero .meta,
  .hero blockquote,
  .hero .cast {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hero h1 { font-size: 28pt; margin-top: 0.1rem; }
  .hero blockquote { margin-top: 0.45rem; font-size: 1.15rem; }
  .cast {
    width: 100%;
    margin-top: 0.7rem;
    gap: 0.35rem 1rem;
    padding-top: 0.45rem;
  }
  .scene { padding-bottom: 0; break-before: auto; }
  .scene + .scene { break-before: auto; }
  .scene figure,
  html.js .scene figure,
  html.js .scene figure.shown {
    opacity: 1;
    transform: none;
    transition: none;
    break-inside: avoid;
    margin: 0.35cm 0 0;
  }
  html.js .wedding figure::after { content: none; }
  .scene img { max-height: 4.8cm; }
  .script h2 { font-size: 18pt; break-after: avoid; }
  .eyebrow, .place { break-after: avoid; }
  .scene figcaption {
    position: static;
    background: none;
    color: var(--ink);
    padding: 0.15rem 0 0;
    text-align: right;
  }
  .script { width: 100%; padding: 0.25cm 0 0.15cm; }
  .who { margin-top: 0.45rem; break-after: avoid; }
  .act { margin-top: 0; break-after: avoid; }
  .stage { margin: 0.25rem 0 0.4rem; }
  .line, .stage, .act, .who { break-inside: auto; }
  .scene,
  .mountain,
  .road,
  .feast,
  .wedding,
  .script,
  .shock,
  .joy,
  .blackout {
    background: #fff;
    color: var(--ink);
  }
  .shock {
    padding: 0.25cm 0 0.15cm;
  }
  .shock h2,
  .shock .line { color: var(--ink); }
  .shock .stage,
  .shock .act,
  .blackout {
    color: var(--stage);
    border-color: rgba(42, 36, 28, 0.25);
  }
  .shock .eyebrow { color: var(--gold); }
  .blackout { margin: 0.45rem auto; }
  .curtain { margin-top: 0.15rem; break-before: avoid; }
  .nabal, .david, .abig, .hand, .script h2, .curtain, .eyebrow, .shock {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
