/* The Rose — a different side of the story, by M.
   Static production build ported from the Claude Design prototype. */

:root {
  --bg: #130d0c;
  --text: #e7dccd;
  --selection-bg: #7a1120;
  --selection-text: #f6ecdd;
  --link: #e9c9a0;
  --link-hover: #f6e6cc;
  --gold: #c9a069;
  --cream: #f2e9db;
  --cream-2: #f4ecdf;
  --muted: #b8a894;
  --muted-2: #a89684;
  --dim: #8a7866;
  --divider-line: #5f5145;
  --nav-inactive: #6f6154;
  --nav-dot-inactive: #4a3f36;
  --nav-active: #e9c9a0;
  --nav-dot-active: #d21526;
  --rule-faint: rgba(255, 255, 255, 0.04);
  --serif: 'EB Garamond', serif;
  --display: 'Cormorant Garamond', serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--selection-bg); color: var(--selection-text); }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

img { max-width: 100%; }

/* ---------- keyframes ---------- */

@keyframes rvl { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes glowpulse { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: .8; transform: scale(1.08); } }
@keyframes drift { 0% { transform: translateY(-12vh) rotate(0deg); opacity: 0; } 12% { opacity: .7; } 88% { opacity: .55; } 100% { transform: translateY(112vh) rotate(340deg); opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(9px); } }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(10px); opacity: 1; } }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- chrome: progress bar, vignette, nav ---------- */

.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px; width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #c1121f, #6b1018);
  z-index: 60;
  animation: progress linear;
  animation-timeline: scroll(root);
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

.chapter-nav {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}

.chapter-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--nav-inactive);
  transition: color .3s;
}

.chapter-nav__item:hover { color: var(--nav-inactive); }

.chapter-nav__label {
  opacity: 0;
  transition: opacity .3s;
}

.chapter-nav__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nav-dot-inactive);
  transition: all .3s;
}

.chapter-nav__item.is-active {
  color: var(--nav-active);
}

.chapter-nav__item.is-active .chapter-nav__label {
  opacity: 1;
}

.chapter-nav__item.is-active .chapter-nav__dot {
  background: var(--nav-dot-active);
  transform: scale(1.5);
  box-shadow: 0 0 10px rgba(210, 21, 38, 0.8);
}

.chapter-nav.is-hovering .chapter-nav__label { opacity: .75; }
.chapter-nav.is-hovering .chapter-nav__item.is-active .chapter-nav__label { opacity: 1; }

/* ---------- shared rose mark ---------- */

.rose-mark {
  -webkit-mask: url(rose.svg) center / contain no-repeat;
  mask: url(rose.svg) center / contain no-repeat;
}

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

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3rem 1.5rem;
  text-align: center;
}

.hero__petal {
  position: absolute;
  top: 0;
  animation: drift linear infinite;
}

.hero__petal--1 { left: 14%; width: 24px; height: 24px; background: #c1121f; animation-duration: 15s; animation-delay: -1s; }
.hero__petal--2 { left: 30%; width: 16px; height: 16px; background: #8a1622; animation-duration: 19s; animation-delay: -6s; }
.hero__petal--3 { left: 46%; width: 30px; height: 30px; background: #a01522; animation-duration: 22s; animation-delay: -12s; }
.hero__petal--4 { left: 63%; width: 18px; height: 18px; background: #6b1018; animation-duration: 17s; animation-delay: -3s; }
.hero__petal--5 { left: 80%; width: 22px; height: 22px; background: #c1121f; animation-duration: 20s; animation-delay: -9s; }
.hero__petal--6 { left: 90%; width: 14px; height: 14px; background: #8a1622; animation-duration: 24s; animation-delay: -15s; }

.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadein 1.6s ease both;
}

.hero__eyebrow {
  font-family: var(--serif);
  letter-spacing: .45em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--gold);
  margin-bottom: 2.2rem;
  padding-left: .45em;
}

.hero__figure {
  position: relative;
  width: min(58vw, 440px);
  height: min(58vw, 440px);
  margin-bottom: 1rem;
}

.hero__glow {
  position: absolute;
  inset: -18%;
  background: radial-gradient(circle, rgba(193, 18, 31, 0.5), transparent 62%);
  filter: blur(24px);
  animation: glowpulse 7s ease-in-out infinite;
}

.hero__rose {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #d21526, #8a0f1a);
  animation: breathe 8s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(120, 10, 20, 0.5));
}

.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  line-height: .92;
  color: var(--cream-2);
  letter-spacing: .01em;
}

.hero__byline {
  margin-top: 1.6rem;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--muted-2);
}

.hero__byline-name { color: var(--link); }

.hero__cue {
  position: absolute;
  bottom: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  animation: cue 2.4s ease-in-out infinite;
}

.hero__cue-label {
  font-family: var(--serif);
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .68rem;
}

.hero__cue-arrow { font-size: 1.2rem; line-height: 1; }

/* ---------- chapter shell ---------- */

.chapter {
  position: relative;
  overflow: hidden;
  padding: 8rem 1.5rem;
}

.chapter--ruled { border-top: 1px solid var(--rule-faint); }

.chapter__watermark {
  position: absolute;
  pointer-events: none;
}

.chapter__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.chapter__header {
  text-align: center;
  margin: 0 auto 3.2em;
}

.chapter__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  margin-bottom: 1.8rem;
}

.chapter__divider-line {
  height: 1px;
  width: 56px;
  background: linear-gradient(90deg, transparent, var(--divider-line));
}

.chapter__divider-line--right {
  background: linear-gradient(90deg, var(--divider-line), transparent);
}

.chapter__divider-mark {
  animation: bob 6s ease-in-out infinite;
}

.chapter__kicker {
  font-family: var(--serif);
  letter-spacing: .35em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--gold);
  margin-bottom: .5rem;
}

.chapter__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 1;
  color: var(--cream);
}

.chapter__title--italic {
  font-style: italic;
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  line-height: 1.05;
}

/* ---------- text components ---------- */

.p {
  margin: 0 0 1.5em;
  font-size: 1.3rem;
  line-height: 1.9;
  text-wrap: pretty;
  animation: rvl both;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}

.p:last-child { margin-bottom: 0; }

.accent { color: var(--gold); }

.week-label {
  color: var(--gold);
  font-variant: small-caps;
  letter-spacing: .04em;
}

.subhead {
  margin: 3em 0 1.2em;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--cream);
  animation: rvl both;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}

.pull-quote {
  margin: 2.4em 0;
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.25;
  color: var(--link);
  text-align: center;
  text-wrap: balance;
  animation: rvl both;
  animation-timeline: view();
  animation-range: entry 0% cover 25%;
}

.pull-quote--sm { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.3; }
.pull-quote--lg { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.2; margin: 2.6em 0; }

.quiet-line {
  margin: 2.4em 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.7rem;
  color: var(--muted);
  text-align: center;
  text-wrap: balance;
  animation: rvl both;
  animation-timeline: view();
  animation-range: entry 0% cover 25%;
}

.quiet-line--pose { margin: 2.2em 0 0; font-size: 1.6rem; }

.quiet-line--note { margin: 2.6em 0 0; line-height: 1.5; }

.quiet-line--left {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.9;
  text-wrap: pretty;
  color: var(--muted);
  font-style: italic;
  text-align: left;
  animation: rvl both;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}

.blockquote {
  margin: 2em 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--accent, var(--gold));
  font-family: var(--display);
  font-style: italic;
  font-size: 1.7rem;
  line-height: 1.4;
  color: var(--link);
  animation: rvl both;
  animation-timeline: view();
  animation-range: entry 0% cover 22%;
}

.dialogue {
  margin: 2em 0;
  padding: 1.6rem 1.8rem;
  border: 1px solid rgba(201, 160, 105, 0.22);
  background: rgba(94, 18, 32, 0.12);
  border-radius: 2px;
  font-family: var(--display);
  animation: rvl both;
  animation-timeline: view();
  animation-range: entry 0% cover 22%;
}

.dialogue__line {
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.9;
  color: #d8c4ab;
}

.dialogue__note { color: var(--dim); font-size: 1.05rem; }

.name-highlight {
  color: #e9738a;
  font-style: italic;
}

/* ---------- per-chapter theming ---------- */
/* --accent drives the rose-mark colour, the watermark tint and blockquote rules.
   Watermark geometry (size / position / rotation / opacity) is set per section
   since it varies deliberately from chapter to chapter. */

#pose {
  background: #1a0f10;
  --accent: #c1121f;
}
#pose .chapter__watermark { top: 6%; left: -10%; width: min(48vw, 540px); height: min(48vw, 540px); opacity: .05; transform: rotate(-12deg); }
#pose .chapter__divider-mark { width: 42px; height: 42px; }

#ch1 { --accent: #b3121f; }
#ch1 .chapter__watermark { top: 8%; right: -8%; width: min(46vw, 560px); height: min(46vw, 560px); opacity: .05; transform: rotate(9deg); }
#ch1 .chapter__divider-mark { width: 44px; height: 44px; }

#ch2 { --accent: #9e1420; }
#ch2 .chapter__watermark { top: 10%; left: -9%; width: min(46vw, 560px); height: min(46vw, 560px); opacity: .055; transform: rotate(-10deg); }
#ch2 .chapter__divider-mark { width: 44px; height: 44px; }

#ch3 { --accent: #8a1622; }
#ch3 .chapter__watermark { top: 6%; right: -8%; width: min(46vw, 560px); height: min(46vw, 560px); opacity: .06; transform: rotate(11deg); }
#ch3 .chapter__divider-mark { width: 44px; height: 44px; }

#ch4 { --accent: #741622; }
#ch4 .chapter__watermark { top: 9%; left: -9%; width: min(46vw, 560px); height: min(46vw, 560px); opacity: .065; transform: rotate(-9deg); }
#ch4 .chapter__divider-mark { width: 44px; height: 44px; }

#heart {
  background: #1c0e10;
  --accent: #6b1220;
}
#heart .chapter__watermark { bottom: -12%; left: 50%; width: min(70vw, 680px); height: min(70vw, 680px); opacity: .06; transform: translateX(-50%); }
#heart .chapter__divider-mark { width: 40px; height: 40px; }

#ch5 { --accent: #5e1220; }
#ch5 .chapter__watermark { top: 8%; right: -8%; width: min(46vw, 560px); height: min(46vw, 560px); opacity: .07; transform: rotate(10deg); }
#ch5 .chapter__divider-mark { width: 44px; height: 44px; }

#ch6 { --accent: #521018; }
#ch6 .chapter__watermark { top: 9%; left: -9%; width: min(46vw, 560px); height: min(46vw, 560px); opacity: .075; transform: rotate(-11deg); }
#ch6 .chapter__divider-mark { width: 44px; height: 44px; }

#ready { background: #1c0e0e; }

#note {
  background: #0f0908;
  --accent: #3a0f0c;
}
#note .chapter__watermark { top: 50%; left: 50%; width: min(80vw, 760px); height: min(80vw, 760px); opacity: .06; transform: translate(-50%, -50%); }
#note .chapter__divider-mark { width: 44px; height: 44px; }

.chapter__watermark { background: var(--accent); }
.chapter__divider-mark { background: var(--accent); }

/* ---------- "ready" interlude rose pair ---------- */

.rose-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2.4rem;
  margin-bottom: 2.2rem;
}

.rose-pair__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
}

.rose-pair__icon {
  width: 62px;
  height: 62px;
  animation: bob 7s ease-in-out infinite;
}

.rose-pair__icon--red { background: linear-gradient(160deg, #5c1420, #3a0d0c); }
.rose-pair__icon--white { background: linear-gradient(160deg, #efe6d3, #cbbda3); animation-delay: -3s; }

.rose-pair__label {
  font-family: var(--serif);
  font-style: italic;
  font-size: .82rem;
  letter-spacing: .12em;
  color: #9a7b6a;
}

/* ---------- final note ---------- */

.signature {
  text-align: center;
  margin-top: 1.4rem;
  font-family: var(--display);
  font-size: 1.9rem;
  color: var(--link);
  animation: rvl both;
  animation-timeline: view();
  animation-range: entry 0% cover 25%;
}

.epigraph {
  margin: 3.4em 0 0;
  padding: 2.2rem 2rem;
  border-top: 1px solid rgba(201, 160, 105, 0.25);
  border-bottom: 1px solid rgba(201, 160, 105, 0.25);
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.5;
  color: #d8c4ab;
  text-align: center;
  text-wrap: balance;
  animation: rvl both;
  animation-timeline: view();
  animation-range: entry 0% cover 25%;
}

.dedication {
  margin: 3.2em 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.25;
  color: var(--cream);
  text-align: center;
  text-wrap: balance;
  animation: rvl both;
  animation-timeline: view();
  animation-range: entry 0% cover 25%;
}

.site-footer {
  max-width: 640px;
  margin: 6rem auto 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 2rem;
  font-family: var(--serif);
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--divider-line);
}
