/* For Andrea — cinematic, mobile-first */
:root {
  --night: #0a0610;
  --night-deep: #07040a;
  --wine: #1a0a12;
  --rose-shadow: #3d1520;
  --rose: #c45c6a;
  --blush: #e8c4bc;
  --ivory: #f7efe8;
  --gold: #d4af8a;
  --gold-soft: #c9a28a;
  --cream: #f3e6d8;
  --polaroid: #f6efe6;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --display: "Cinzel", "Cormorant Garamond", serif;
  --script: "Great Vibes", "Cormorant Garamond", cursive;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100%;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(140, 40, 60, 0.28), transparent 60%),
    radial-gradient(900px 600px at 80% 40%, rgba(80, 20, 40, 0.18), transparent 55%),
    var(--night-deep);
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.petals {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -12vh;
  width: 10px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, #f3d0cc, #b85a66 70%);
  border-radius: 80% 0 80% 0;
  opacity: 0.28;
  animation: fall linear infinite;
  filter: blur(0.2px);
}

.grain,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
}

.grain {
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.vignette {
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.45) 100%);
}

main {
  position: relative;
  z-index: 2;
}

.scene {
  position: relative;
  padding: 4.5rem 1.35rem;
}

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: calc(4rem + var(--safe-top));
  padding-bottom: calc(5rem + var(--safe-bottom));
}

.kicker {
  margin: 0;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}

.name {
  margin: 1.1rem 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.6rem, 18vw, 9.5rem);
  letter-spacing: 0.14em;
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--ivory);
  text-shadow: 0 0 60px rgba(196, 92, 106, 0.25);
}

.ornament {
  display: block;
  width: 56px;
  height: 1px;
  margin: 1.6rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.lede {
  max-width: min(36rem, 90vw);
  margin: 1.5rem auto 0;
  font-size: clamp(1.15rem, 3.6vw, 1.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--blush);
}

.scroll {
  position: absolute;
  bottom: calc(1.6rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 0.62rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-soft);
  opacity: 0.8;
}

.scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 32px;
  margin: 0.55rem auto 0;
  background: linear-gradient(to bottom, var(--gold-soft), transparent);
  animation: pulse 2.8s var(--ease) infinite;
}

.portrait,
.gallery,
.ask {
  display: flex;
  justify-content: center;
}

.portrait {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.frame {
  margin: 0;
  position: relative;
}

.frame img {
  width: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.frame.cinematic {
  width: min(100%, 28rem);
  padding: 0.45rem;
  background: linear-gradient(160deg, rgba(212, 175, 138, 0.65), rgba(90, 40, 50, 0.4));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(212, 175, 138, 0.2);
}

.frame.cinematic img {
  display: block;
}

.letter {
  display: flex;
  justify-content: center;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.letter-body {
  max-width: 36rem;
}

.salutation {
  font-family: var(--display);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  letter-spacing: 0.08em;
  margin-top: 0;
}

.letter-body p {
  margin: 0 0 1.35rem;
  font-size: clamp(1.15rem, 3.3vw, 1.4rem);
  font-weight: 400;
  color: #f3e6de;
}

.gallery {
  flex-wrap: wrap;
  gap: 2.2rem 1.6rem;
  align-items: flex-end;
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

.frame.polaroid {
  width: min(100%, 20.5rem);
  background: var(--polaroid);
  padding: 0.7rem 0.7rem 2.4rem;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

.frame.polaroid img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(0.96) contrast(1.04);
}

.tilt-left {
  transform: rotate(-3.2deg);
}

.tilt-right {
  transform: rotate(2.8deg);
}

.promises {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.section-title {
  margin: 0.85rem 0 2.4rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.7rem, 5.5vw, 2.5rem);
  letter-spacing: 0.06em;
  text-align: center;
}

.vows {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 36rem;
  width: 100%;
  counter-reset: vow;
}

.vows li {
  counter-increment: vow;
  padding: 1.35rem 0 1.45rem;
  border-top: 1px solid rgba(212, 175, 138, 0.22);
}

.vows li:last-child {
  border-bottom: 1px solid rgba(212, 175, 138, 0.22);
}

.vows h3 {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3.6vw, 1.55rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
  color: var(--ivory);
}

.vows h3::before {
  content: counter(vow, upper-roman) ".";
  display: inline-block;
  min-width: 1.8em;
  margin-right: 0.35rem;
  font-family: var(--display);
  font-style: normal;
  font-size: 0.72em;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.vows p {
  margin: 0;
  padding-left: 2.15em;
  color: var(--blush);
  font-size: clamp(1.02rem, 2.9vw, 1.18rem);
}

.ask {
  flex-direction: column;
  align-items: center;
  gap: 2.6rem;
  min-height: 100svh;
  padding-top: 3rem;
  padding-bottom: calc(4.5rem + var(--safe-bottom));
}

.ask .kiss {
  width: min(100%, 26rem);
}

.ask-copy {
  max-width: 34rem;
  text-align: center;
}

.ask-copy p {
  margin: 0 0 1.1rem;
  font-size: clamp(1.15rem, 3.3vw, 1.4rem);
  color: #f3e6de;
}

.name-soft {
  font-family: var(--display) !important;
  font-size: clamp(1.6rem, 5vw, 2.2rem) !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.3rem !important;
}

.the-ask {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 6.2vw, 2.5rem) !important;
  line-height: 1.25;
  color: var(--ivory) !important;
  margin: 1.6rem 0 !important;
  text-shadow: 0 0 40px rgba(196, 92, 106, 0.2);
}

.sign {
  margin-top: 2.1rem !important;
  font-family: var(--script) !important;
  font-size: clamp(2.6rem, 10vw, 4rem) !important;
  font-style: normal !important;
  color: var(--blush) !important;
  line-height: 1;
}

/* Reveals */
.reveal {
  opacity: 0;
  transform: translateY(22px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 1.15s var(--ease), transform 1.15s var(--ease);
}

.hero .reveal {
  animation: fade-up 1.15s var(--ease) forwards;
}
.hero .kicker { animation-delay: 0.15s; }
.hero .name { animation-delay: 0.4s; }
.hero .ornament { animation-delay: 0.75s; }
.hero .lede { animation-delay: 0.95s; }

html.shot .reveal,
html.shot .hero .reveal {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

html.shot {
  scroll-behavior: auto;
}
html.shot-section .hero {
  min-height: 0;
  padding-top: 3rem;
  padding-bottom: 3rem;
}


.scene[id] {
  scroll-margin-top: 0.5rem;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.letter-body .reveal.is-in:nth-child(1) { transition-delay: 0.05s; }
.letter-body .reveal.is-in:nth-child(2) { transition-delay: 0.15s; }
.letter-body .reveal.is-in:nth-child(3) { transition-delay: 0.28s; }
.letter-body .reveal.is-in:nth-child(4) { transition-delay: 0.4s; }
.letter-body .reveal.is-in:nth-child(5) { transition-delay: 0.52s; }

@keyframes fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 40px), 115vh, 0) rotate(280deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.85); }
  50% { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 479px) {
  .name {
    letter-spacing: 0.08em;
    font-size: clamp(3.15rem, 16.5vw, 4.4rem);
  }
  .section-title {
    letter-spacing: 0.04em;
    font-size: 1.65rem;
  }
}

@media (min-width: 768px) {
  body { font-size: 1.2rem; }
  .scene { padding-left: 2rem; padding-right: 2rem; }
  .gallery {
    gap: 3rem;
    padding-top: 3rem;
    padding-bottom: 5rem;
  }
  .frame.polaroid { width: min(42vw, 22rem); }
  .ask {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    padding-left: 3rem;
    padding-right: 3rem;
  }
  .ask .kiss { width: min(42vw, 28rem); flex: 0 0 auto; }
  .ask-copy { text-align: left; }
  .ask-copy p { margin-bottom: 1.2rem; }
}

@media (min-width: 1100px) {
  .portrait { padding: 3rem 0 2rem; }
  .frame.cinematic { width: min(32vw, 30rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .petal, .scroll::after { animation: none !important; }
  .reveal,
  .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
}
