:root {
  --cream: #faf2e2;
  --cream-deep: #f3e7cf;
  --ink: #43243a;
  --ink-soft: #6b3a4d;
  --rose: #d68b9e;
  --rose-pale: #f4d3d8;
  --rose-deep: #b56575;
  --sage: #a8b59a;
  --gold: #c89e5a;

  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'EB Garamond', Georgia, serif;
  --font-script: 'Caveat', 'Brush Script MT', cursive;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(ellipse 60% 40% at 18% 0%, rgba(244, 211, 216, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 90% 30%, rgba(200, 158, 90, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(168, 181, 154, 0.30) 0%, transparent 70%),
    radial-gradient(ellipse 80% 30% at 0% 70%, rgba(214, 139, 158, 0.18) 0%, transparent 60%);
  background-attachment: fixed;
  background-size: 100% 100%;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Paper grain overlay — gives a tactile, hand-printed feel */
.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.20 0 0 0 0 0.28 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}

/* Falling petals layer */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.petal-fall {
  position: absolute;
  top: -10vh;
  animation: fall linear infinite;
  will-change: transform;
}
.petal-sway {
  animation: sway ease-in-out infinite;
  will-change: transform;
}
.petal-rotate {
  display: block;
  animation: spin linear infinite;
  will-change: transform;
}

@keyframes fall {
  from { transform: translateY(-12vh); }
  to   { transform: translateY(112vh); }
}
@keyframes sway {
  0%, 100% { transform: translateX(-30px); }
  50%      { transform: translateX(30px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────
   Letter container
   ───────────────────────────────────── */
.letter {
  position: relative;
  z-index: 3;
  max-width: 38rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
}

/* ─────────────────────────────────────
   Hero
   ───────────────────────────────────── */
.hero {
  text-align: center;
  padding: 2rem 0 4rem;
  animation: fadeUp 1.6s ease-out both;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--rose-deep);
  margin-bottom: 3rem;
  font-weight: 500;
  font-variant: small-caps;
}

.title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4rem, 14vw, 8.5rem);
  line-height: 0.92;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.title em {
  font-style: italic;
  font-weight: 500;
  color: var(--rose-deep);
  display: inline-block;
  position: relative;
  padding: 0 0.06em;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.title em::after {
  content: '';
  position: absolute;
  left: 0.04em;
  right: 0.04em;
  bottom: 0.14em;
  height: 0.28em;
  background: linear-gradient(180deg, transparent 0%, rgba(214, 139, 158, 0.22) 50%, transparent 100%);
  z-index: -1;
  border-radius: 50%;
  filter: blur(2px);
}

.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--ink-soft);
  margin-top: 1.6rem;
  letter-spacing: 0.01em;
  font-variation-settings: 'opsz' 36;
}

.ornament {
  margin: 3.5rem auto 0;
  width: 120px;
  color: var(--rose);
  opacity: 0.75;
}
.ornament svg { width: 100%; height: auto; display: block; }

/* ─────────────────────────────────────
   Sections & prose
   ───────────────────────────────────── */
section { margin: 5rem 0; }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  color: var(--ink);
  margin-bottom: 1.8rem;
  text-align: center;
  letter-spacing: -0.005em;
  line-height: 1.15;
  font-variation-settings: 'opsz' 60;
}
.section-title em {
  font-style: italic;
  color: var(--rose-deep);
  font-weight: 500;
}

.prose {
  font-family: var(--font-body);
  font-size: 1.13rem;
  line-height: 1.85;
  color: var(--ink);
  hyphens: auto;
}
.prose + .prose { margin-top: 1.2rem; }
.prose em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--rose-deep);
  font-weight: 500;
}

.dropcap {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 4.6rem;
  line-height: 0.82;
  float: left;
  padding: 0.42rem 0.7rem 0 0;
  color: var(--rose-deep);
  font-variation-settings: 'opsz' 144;
}

.year {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.45rem;
  color: var(--gold);
  letter-spacing: 0.01em;
  margin-right: 0.2em;
}

/* ─────────────────────────────────────
   Love list
   ───────────────────────────────────── */
.love-list ul {
  list-style: none;
  max-width: 30rem;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.love-list li {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.28rem;
  color: var(--ink);
  padding: 0.7rem 0;
  text-align: center;
  position: relative;
  font-variation-settings: 'opsz' 36;
  transition: transform 0.5s ease, color 0.5s ease;
}
.love-list li:nth-child(odd)  { transform: rotate(-0.25deg); }
.love-list li:nth-child(even) { transform: rotate(0.25deg); }
.love-list li:hover { color: var(--rose-deep); transform: rotate(0deg) scale(1.015); }

.love-list li:not(:last-child)::after {
  content: '✿';
  display: block;
  color: var(--rose);
  font-size: 0.68rem;
  margin-top: 0.55rem;
  opacity: 0.55;
  letter-spacing: 0.5em;
  padding-left: 0.5em;
}

.quote {
  font-family: var(--font-script);
  font-weight: 600;
  font-size: 1.35em;
  color: var(--rose-deep);
  letter-spacing: 0.005em;
}

/* ─────────────────────────────────────
   Closing
   ───────────────────────────────────── */
.closing {
  text-align: center;
  margin-top: 6rem;
}
.closing-divider {
  color: var(--rose);
  width: 60px;
  margin: 0 auto 2.5rem;
  opacity: 0.7;
}
.closing-divider svg { width: 100%; height: auto; display: block; }

.closing-text {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
  font-variation-settings: 'opsz' 36;
  line-height: 1.85;
}

.signature {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 7vw, 3.2rem);
  color: var(--rose-deep);
  margin-top: 2.5rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.005em;
  transform: rotate(-2deg);
}
.signoff {
  font-family: var(--font-script);
  font-size: 1.55rem;
  color: var(--ink);
  margin-top: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.signoff .heart {
  color: var(--rose-deep);
  display: inline-block;
  margin-left: 0.1em;
  font-size: 1.1em;
  transition: transform 0.4s cubic-bezier(.34,1.56,.64,1);
  cursor: default;
}
.signoff .heart:hover {
  transform: scale(1.35) rotate(-8deg);
}
.signoff .heart.pulse {
  animation: pulse 0.9s ease-out;
}
@keyframes pulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.6) rotate(-12deg); }
  60%  { transform: scale(1.1) rotate(4deg); }
  100% { transform: scale(1); }
}

/* ─────────────────────────────────────
   Footer mark
   ───────────────────────────────────── */
.footer {
  text-align: center;
  margin-top: 5rem;
  padding-bottom: 1.5rem;
}
.petal-mark {
  width: 22px;
  height: 22px;
  color: var(--rose);
  opacity: 0.45;
  display: inline-block;
}

/* ─────────────────────────────────────
   Reveal animation
   ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 1.4s cubic-bezier(.22,.61,.36,1),
    transform 1.4s cubic-bezier(.22,.61,.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────
   Reduced motion
   ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .petals { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─────────────────────────────────────
   Mobile
   ───────────────────────────────────── */
@media (max-width: 480px) {
  body { font-size: 17px; }
  .letter { padding: 3.5rem 1.25rem 2.5rem; }
  .hero { padding: 1rem 0 3rem; }
  .eyebrow { margin-bottom: 2.2rem; }
  .ornament { margin-top: 2.8rem; }
  section { margin: 4rem 0; }
  .closing { margin-top: 4.5rem; }
  .dropcap { font-size: 3.8rem; padding-right: 0.55rem; }
}
