/* ══════════════════════════════════════════════
   TOKENS
══════════════════════════════════════════════ */
:root {
  --ink:       #0b0a12;
  --ink2:      #13111f;
  --gold:      #e8b84b;
  --gold-lt:   #f7d98b;
  --gold-glow: rgba(232,184,75,0.18);
  --rose:      #c4637a;
  --rose-lt:   #e89aaa;
  --cream:     #fdf6ee;
  --cream-dim: rgba(253,246,238,0.75);
  --cream-faint: rgba(253,246,238,0.12);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-script:  'Great Vibes', cursive;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.7;
}
img, video { display: block; max-width: 100%; }

/* ── PETAL CANVAS ── */
#petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* ── CONTAINERS ── */
.container        { max-width: 1000px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
.container--narrow { max-width: 680px; }

/* ── UTILITY: fade-up (hero) ── */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  animation: fadeUp 0.9s cubic-bezier(.22,1,.36,1) var(--d, 0s) forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}

/* ── UTILITY: scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.85s cubic-bezier(.22,1,.36,1), transform 0.85s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--pd, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════
   SECTION 1 — OPENING
══════════════════════════════════════════════ */
.opening {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 60px 24px 80px;
  z-index: 1;
}

.opening__bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 30%, rgba(232,184,75,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(196,99,122,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.opening__content { position: relative; z-index: 2; }

.tag {
  font-family: var(--font-script);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--rose-lt);
  margin-bottom: 20px;
  display: block;
}

.opening__title {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.opening__title .line1 {
  font-size: clamp(3.5rem, 10vw, 7rem);
  color: var(--cream);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.opening__title .line2 {
  font-size: clamp(4rem, 13vw, 9.5rem);
  line-height: 0.95;
  background: linear-gradient(125deg, var(--gold-lt) 10%, var(--gold) 45%, var(--rose-lt) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
}
.opening__title .line2 em {
  font-style: italic;
  font-weight: 600;
}

.opening__to {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--cream-dim);
  margin-bottom: 64px;
  letter-spacing: 0.02em;
}

/* ── PHOTO FRAME ── */
.opening__photo-wrap { margin-bottom: 64px; }

.photo-frame {
  position: relative;
  display: inline-block;
  width: clamp(260px, 38vw, 380px);
  height: clamp(260px, 38vw, 380px);
}

.photo-frame__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: pulse-ring 3s ease-in-out infinite;
}
.ring1 {
  border: 1.5px solid rgba(232,184,75,0.5);
  inset: -12px;
  animation-delay: 0s;
}
.ring2 {
  border: 1px solid rgba(196,99,122,0.35);
  inset: -26px;
  animation-delay: 1.5s;
}
@keyframes pulse-ring {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.03); }
}

.photo-frame__halo {
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,184,75,0.2) 0%, transparent 70%);
  animation: halo-pulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes halo-pulse {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

.photo-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow:
    0 0 0 6px rgba(232,184,75,0.1),
    0 24px 80px rgba(0,0,0,0.6),
    0 0 60px rgba(232,184,75,0.2);
  position: relative;
  z-index: 2;
  animation: heartbeat 3.2s ease-in-out infinite;
}
@keyframes heartbeat {
  0%,100% { transform: scale(1); }
  10%      { transform: scale(1.035); }
  20%      { transform: scale(1); }
  30%      { transform: scale(1.02); }
  40%      { transform: scale(1); }
}

.photo-frame__shine {
  position: absolute;
  top: 8%;
  left: 10%;
  width: 35%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.14) 0%, transparent 80%);
  z-index: 3;
  pointer-events: none;
  border-radius: 50%;
}

/* ── SCROLL CUE ── */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.scroll-cue:hover { opacity: 1; }
.scroll-cue span {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 500;
}
.scroll-cue__arrow {
  width: 22px;
  height: 22px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg);
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob {
  0%,100% { transform: rotate(45deg) translateY(0); }
  50%      { transform: rotate(45deg) translateY(5px); }
}

/* ══════════════════════════════════════════════
   SECTION 2 — LETTER
══════════════════════════════════════════════ */
.letter-section {
  position: relative;
  padding: 120px 0 100px;
  z-index: 1;
}
.letter-section__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(232,184,75,0.04) 40%, transparent 100%);
  pointer-events: none;
}

.letter-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(232,184,75,0.04) 100%);
  border: 1px solid rgba(232,184,75,0.18);
  border-radius: 4px;
  padding: clamp(40px, 8vw, 80px) clamp(32px, 7vw, 72px);
  position: relative;
  overflow: hidden;
}
.letter-card::before {
  /* aged paper texture line at top */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--rose), var(--gold), transparent);
}
.letter-card::after {
  content: '"';
  position: absolute;
  top: -10px;
  right: 32px;
  font-family: var(--font-display);
  font-size: 200px;
  color: rgba(232,184,75,0.05);
  line-height: 1;
  pointer-events: none;
  font-weight: 700;
}

.letter-card__deco-top {
  text-align: center;
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 32px;
  letter-spacing: 0.3em;
}

.letter-card__from {
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gold);
  margin-bottom: 28px;
}

.letter-card__body {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 300;
  line-height: 1.95;
  color: var(--cream-dim);
}
.letter-card__body p + p { margin-top: 22px; }
.letter-card__body strong { color: var(--cream); font-weight: 600; }
.letter-card__body em     { color: var(--gold-lt); font-style: italic; }

.letter-card__sig {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--font-display);
}
.letter-card__sig span {
  font-size: 0.95rem;
  color: var(--cream-dim);
  font-style: italic;
}
.letter-card__sig strong {
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--rose-lt);
  font-weight: 400;
}

.letter-card__deco-bot {
  text-align: center;
  color: rgba(232,184,75,0.4);
  font-size: 0.9rem;
  margin-top: 40px;
  letter-spacing: 0.4em;
}

/* ══════════════════════════════════════════════
   SECTION TITLES
══════════════════════════════════════════════ */
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.18;
  text-align: center;
  margin-bottom: 70px;
  color: var(--cream);
}
.section-title em {
  font-style: italic;
  color: var(--gold);
}

/* ══════════════════════════════════════════════
   SECTION 3 — PILLARS
══════════════════════════════════════════════ */
.pillars-section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}
.pillars-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(196,99,122,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.pillar {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.pillar::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.pillar:hover {
  border-color: rgba(232,184,75,0.25);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 30px rgba(232,184,75,0.07);
  transform: translateY(-4px);
}
.pillar:hover::before { opacity: 1; }

.pillar__icon {
  font-size: 2rem;
  margin-bottom: 18px;
}
.pillar h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold-lt);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
.pillar p {
  font-size: 0.93rem;
  color: rgba(253,246,238,0.6);
  line-height: 1.75;
}

/* ══════════════════════════════════════════════
   SECTION 4 — VIDEO
══════════════════════════════════════════════ */
.video-section {
  padding: 100px 0 110px;
  position: relative;
  z-index: 1;
  text-align: center;
}
.video-section__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(232,184,75,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.video-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
}
.video-wrap__border {
  position: absolute;
  inset: -1px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--rose) 50%, var(--gold) 100%);
  z-index: 0;
  animation: border-rotate 4s linear infinite;
  background-size: 200%;
}
@keyframes border-rotate {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.video-wrap video {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
  display: block;
  margin: 1px;
  width: calc(100% - 2px);
  border-radius: 5px;
}

.video-wrap__caption {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232,184,75,0.55);
  font-family: var(--font-body);
  font-weight: 500;
}

/* ══════════════════════════════════════════════
   SECTION 5 — TIMELINE
══════════════════════════════════════════════ */
.timeline-section {
  padding: 100px 0 110px;
  position: relative;
  z-index: 1;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold) 20%, var(--rose) 80%, transparent);
}

.tl-item {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 0 0 52px 0;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink2);
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 20px rgba(232,184,75,0.2);
}

.tl-body h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold-lt);
  margin-bottom: 10px;
  margin-top: 10px;
}
.tl-body p {
  font-size: 0.95rem;
  color: rgba(253,246,238,0.62);
  line-height: 1.8;
}

/* ══════════════════════════════════════════════
   SECTION 6 — CLOSING
══════════════════════════════════════════════ */
.closing {
  position: relative;
  padding: 120px 24px 100px;
  text-align: center;
  overflow: hidden;
  z-index: 1;
}
.closing__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(232,184,75,0.1) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 50% 80%, rgba(196,99,122,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.closing__content { position: relative; z-index: 2; }

.closing__eyebrow {
  font-family: var(--font-script);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--rose-lt);
  margin-bottom: 28px;
  display: block;
}

.closing__wish {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  line-height: 1.25;
  color: var(--cream);
  margin-bottom: 36px;
}
.closing__wish em {
  font-style: italic;
  background: linear-gradient(90deg, var(--gold-lt), var(--rose-lt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 400;
}

.closing__sig {
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gold);
  margin-bottom: 48px;
}

.closing__divider {
  font-size: 0.9rem;
  letter-spacing: 0.4em;
  color: rgba(232,184,75,0.3);
  margin-bottom: 24px;
}

.closing__footer {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253,246,238,0.2);
  font-family: var(--font-body);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .pillars { grid-template-columns: 1fr 1fr; gap: 14px; }
  .pillar { padding: 24px 18px; }
  .timeline::before { left: 18px; }
  .tl-dot { width: 38px; height: 38px; font-size: 1rem; }
  .letter-card { padding: 32px 22px; }
}
@media (max-width: 400px) {
  .pillars { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, .fade-up, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}
