:root {
  color-scheme: light;
  --ink: #321525;
  --muted: #6b3d5c;
  --night: #fff5fa;
  --plum: #ffffff;
  --violet: #d4147a;
  --gold: #e91e8c;
  --gold-pale: #d4147a;
  --line: rgba(233, 30, 140, 0.24);
  --pink: #e91e8c;
  --pink-deep: #d4147a;
  --pink-light: #ff6eb4;
  --pink-pastel: #ffd6ec;
  --pink-blush: #fff5fa;
  --pink-soft: #fce8f3;
  --pink-mist: #fff0f7;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 30%, rgba(255, 110, 180, 0.14), transparent 34rem),
    radial-gradient(circle at 88% 72%, rgba(233, 30, 140, 0.08), transparent 32rem),
    var(--night);
  font-family: var(--sans);
  font-kerning: normal;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(233,30,140,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233,30,140,0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, black 84%, transparent);
}

img {
  display: block;
  max-width: 100%;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 3px;
  background: rgba(233,30,140,0.08);
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--pink-light), var(--pink-deep));
  box-shadow: 0 0 15px rgba(233,30,140,0.45);
  transition: width 80ms linear;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(5rem, 11vw, 9rem) clamp(1.25rem, 6vw, 6rem);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,240,247,0.96) 48%, rgba(255,214,236,0.92)),
    radial-gradient(circle, rgba(233,30,140,0.12), transparent 55%);
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  border: 1px solid var(--line);
  transform: rotate(45deg);
}

.hero::before {
  width: min(70vw, 720px);
  aspect-ratio: 1;
  opacity: 0.55;
}

.hero::after {
  width: min(54vw, 560px);
  aspect-ratio: 1;
  border-color: rgba(233,30,140,0.14);
}

.hero__glow {
  position: absolute;
  z-index: -2;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.2;
  animation: drift 14s ease-in-out infinite alternate;
}

.hero__glow--one {
  top: -16rem;
  right: -10rem;
  background: var(--pink-light);
}

.hero__glow--two {
  bottom: -18rem;
  left: -12rem;
  background: var(--pink);
  animation-delay: -7s;
}

.hero__content {
  width: min(1040px, 100%);
  text-align: center;
}

.hero h1 {
  max-width: 1000px;
  margin: 0 auto;
  padding-block: 0.12em;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.55rem, 5.8vw, 5.9rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.026em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
  text-shadow: 0 16px 38px rgba(212,20,122,0.09);
}

.dek {
  max-width: 760px;
  margin: clamp(2rem, 4vw, 3.25rem) auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.78;
}

.hero__ornament {
  position: absolute;
  top: clamp(2.2rem, 6vw, 4.5rem);
  left: 50%;
  display: flex;
  width: min(300px, 46vw);
  align-items: center;
  gap: 0.75rem;
  transform: translateX(-50%);
}

.hero__ornament span {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero__ornament span:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero__ornament i {
  width: 10px;
  height: 10px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.hero__line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1px;
  height: 8vh;
  background: linear-gradient(to bottom, transparent, var(--gold));
}

.story {
  padding: clamp(5rem, 10vw, 10rem) 0 7rem;
}

.prose {
  width: min(760px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.prose p,
.closing-quote {
  margin: 0 0 1.65em;
  font-size: clamp(1.12rem, 1.45vw, 1.36rem);
  line-height: 1.88;
}

.prose--opening > p:first-child::first-letter {
  float: left;
  margin: 0.06em 0.12em 0 0;
  color: var(--gold-pale);
  font-size: 5.2em;
  line-height: 0.78;
}

em {
  color: var(--pink-deep);
}

.feature {
  position: relative;
  width: min(1180px, calc(100% - 2.5rem));
  margin: clamp(4.5rem, 10vw, 9rem) auto;
}

.feature::before {
  position: absolute;
  inset: -2.25rem auto auto -2.25rem;
  z-index: -1;
  width: 42%;
  height: 44%;
  content: "";
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
  opacity: 0.48;
}

.feature:nth-of-type(even)::before {
  inset: auto -2.25rem -2.25rem auto;
  border: 0;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.feature__frame {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid rgba(233,30,140,0.14);
  background: #fff;
  box-shadow: 0 34px 90px rgba(92,24,62,0.18);
}

.feature__frame::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.32);
}

.feature img {
  width: 100%;
  height: auto;
  transition: transform 900ms cubic-bezier(.2,.75,.25,1), filter 500ms ease;
}

.feature:hover img,
.feature:focus-within img {
  transform: scale(1.025);
  filter: saturate(1.05) contrast(1.02);
}

.feature__shine {
  position: absolute;
  inset: -80% auto -80% -38%;
  width: 24%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: rotate(12deg);
  transition: left 1.2s ease;
}

.feature:hover .feature__shine {
  left: 120%;
}

.feature figcaption {
  max-width: 800px;
  margin: 1.15rem auto 0;
  color: var(--gold-pale);
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  font-style: italic;
  line-height: 1.55;
  text-align: center;
}

.feature--panorama {
  width: min(1280px, calc(100% - 2.5rem));
}

.feature--portrait {
  width: min(980px, calc(100% - 2.5rem));
}

.prose--crown {
  position: relative;
  padding: clamp(2.3rem, 6vw, 4.5rem) clamp(1.4rem, 5vw, 4.5rem);
  border: 1px solid rgba(233,30,140,0.28);
  background: linear-gradient(135deg, #ffffff 0%, var(--pink-mist) 58%, var(--pink-soft) 100%);
  box-shadow: 0 28px 70px rgba(92,24,62,0.11);
}

.prose--crown::before,
.prose--crown::after {
  position: absolute;
  width: 24px;
  height: 24px;
  content: "";
  border-color: var(--gold);
  opacity: 0.75;
}

.prose--crown::before {
  top: 12px;
  left: 12px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.prose--crown::after {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.prose--crown p {
  margin-bottom: 0;
}

.prose--profiles {
  counter-reset: profiles;
}

.prose--profiles p {
  position: relative;
  padding-left: clamp(1rem, 3vw, 2rem);
  border-left: 1px solid rgba(233,30,140,0.24);
}

.feature--finale {
  width: min(1320px, calc(100% - 2rem));
}

.feature--finale .feature__frame {
  box-shadow: 0 40px 110px rgba(92,24,62,0.19), 0 0 70px rgba(233,30,140,0.08);
}

.prose--ending {
  padding-top: clamp(1rem, 4vw, 3rem);
}

.closing-quote {
  position: relative;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding: clamp(2.25rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
  color: var(--ink);
  font-size: clamp(1.4rem, 2.7vw, 2.25rem);
  line-height: 1.55;
  text-align: center;
  text-wrap: balance;
  font-family: var(--serif);
  font-weight: 600;
}

.closing-quote::before {
  position: absolute;
  top: -0.3em;
  left: 50%;
  color: rgba(233,30,140,0.18);
  content: "“";
  font-size: 8rem;
  line-height: 1;
  transform: translateX(-50%);
}

.source {
  margin-top: 2.5rem !important;
  color: var(--gold-pale);
  font-size: 1rem !important;
  text-align: right;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 900ms cubic-bezier(.2,.75,.25,1), transform 900ms cubic-bezier(.2,.75,.25,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 50;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(233,30,140,0.45);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, rgba(233,30,140,0.9), rgba(212,20,122,0.94));
  backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 300ms ease, transform 300ms ease, background 300ms ease;
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.to-top:hover {
  background: linear-gradient(135deg, var(--pink-light), var(--pink-deep));
}

.to-top::before {
  width: 10px;
  height: 10px;
  content: "";
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(-135deg) translate(-2px, -2px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  padding: 4rem clamp(1rem, 4vw, 4rem) 2rem;
  place-items: center;
  background: rgba(50,21,37,0.95);
  backdrop-filter: blur(20px);
  animation: fade-in 250ms ease;
}

.lightbox__stage {
  display: grid;
  max-width: min(1400px, 100%);
  max-height: 88vh;
  justify-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  box-shadow: 0 34px 90px rgba(0,0,0,0.5);
}

.lightbox p {
  max-width: 850px;
  margin: 1rem 0 0;
  color: #ffd6ec;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border: 0;
  color: #fff;
  background: transparent;
  font: 300 2.2rem/1 var(--sans);
  cursor: pointer;
}

body.lightbox-open {
  overflow: hidden;
}

@keyframes drift {
  to { transform: translate3d(3rem, 2rem, 0) scale(1.08); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 700px) {
  .hero {
    min-height: 92svh;
    padding-inline: 1.2rem;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 10.6vw, 4.05rem);
    line-height: 1.24;
    letter-spacing: -0.02em;
  }

  .dek {
    font-size: 1rem;
    line-height: 1.62;
  }

  .story {
    padding-top: 4.5rem;
  }

  .prose p,
  .closing-quote {
    font-size: 1.08rem;
    line-height: 1.72;
  }

  .feature {
    margin-block: 4.75rem;
  }

  .feature::before {
    inset: -1rem auto auto -0.55rem;
  }

  .feature:nth-of-type(even)::before {
    inset: auto -0.55rem -1rem auto;
  }

  .closing-quote {
    font-size: 1.42rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
