/* ============================================
   Tomorrow, just you & me.
   ============================================ */

:root {
  --ivory: #FAF4EC;
  --champagne: #F1E6D6;
  --blush: #E3C9C1;
  --gold: #B8935E;
  --gold-soft: #CBA772;
  --espresso: #2E241E;
  --espresso-soft: #4A3B32;
  --ink: #3A2E27;
  --line: rgba(74, 59, 50, 0.14);

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ivory);
  color: var(--espresso);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

::selection {
  background: var(--blush);
  color: var(--espresso);
}

/* ---------- Texture & Glow ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

.glow {
  position: fixed;
  top: -20%;
  left: 50%;
  width: 140vw;
  height: 90vh;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 45% at 50% 20%, rgba(203, 167, 114, 0.16), transparent 70%);
  animation: breathe 9s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.04); }
}

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

.particle {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-soft);
  opacity: 0;
  animation: float-up linear infinite;
}

.particle {
  --max-opacity: 0.28;
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  10% {
    opacity: var(--max-opacity);
  }
  90% {
    opacity: calc(var(--max-opacity) * 0.6);
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) translateX(20px);
  }
}

/* ---------- Layout ---------- */

.section, .hero {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
}

.section-inner {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.section-inner.narrow {
  max-width: 560px;
}

/* ---------- Reveal animation base ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 1.4s var(--ease) forwards;
}

.reveal[data-delay="0"] { animation-delay: 0.2s; }
.reveal[data-delay="1"] { animation-delay: 0.55s; }
.reveal[data-delay="2"] { animation-delay: 1.15s; }
.reveal[data-delay="3"] { animation-delay: 1.55s; }
.reveal[data-delay="4"] { animation-delay: 2.2s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

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

/* stagger children within a visible section */
.timeline-item.reveal-on-scroll:nth-child(2) { transition-delay: 0.05s; }
.timeline-item.reveal-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.timeline-item.reveal-on-scroll:nth-child(4) { transition-delay: 0.25s; }

/* ============================================
   1. HERO
   ============================================ */

.hero {
  flex-direction: column;
  text-align: center;
  padding-bottom: 4vh;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 5.2rem);
  line-height: 1.08;
  color: var(--espresso);
  letter-spacing: 0.005em;
}

.hero-title .amp {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

.hero-sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.6;
  color: var(--espresso-soft);
  max-width: 380px;
}

.hero-datetime {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: var(--espresso);
  letter-spacing: 0.01em;
}

.divider-dot {
  color: var(--gold);
  font-style: normal;
}

.scroll-hint {
  margin-top: 8vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  opacity: 0.55;
}

.scroll-arrow {
  font-size: 14px;
  animation: soft-bob 2.6s ease-in-out infinite;
}

@keyframes soft-bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 0.9; }
}

/* ============================================
   2. THE EVENING
   ============================================ */

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  color: var(--espresso);
  margin-bottom: 16px;
}

.section-title.center {
  text-align: center;
}

.section-sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.98rem, 2.2vw, 1.08rem);
  color: var(--espresso-soft);
  line-height: 1.7;
  margin-bottom: 6vh;
}

.timeline {
  position: relative;
  text-align: left;
  margin-top: 4vh;
  padding-left: 8px;
}

.timeline-line {
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold) 8%, var(--gold) 92%, transparent);
  opacity: 0.35;
}

.timeline-item {
  position: relative;
  padding-left: 42px;
  padding-bottom: 6vh;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 3px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ivory);
  border: 1.5px solid var(--gold);
}

.timeline-marker::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold-soft);
  opacity: 0.7;
}

.timeline-label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 500;
}

.timeline-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  color: var(--espresso);
  margin-bottom: 8px;
}

.timeline-text {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--espresso-soft);
  max-width: 460px;
}

/* ============================================
   3. DRESS CODE
   ============================================ */

.dresscode {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--champagne) 50%, var(--ivory) 100%);
}

.dresscode-card {
  background: rgba(255, 253, 249, 0.55);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.8rem, 6vw, 4rem);
  box-shadow: 0 30px 70px -40px rgba(74, 46, 24, 0.25), inset 0 1px 0 rgba(255,255,255,0.6);
  backdrop-filter: blur(2px);
}

.card-label {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 20px;
}

.card-label.center {
  display: block;
}

.dresscode-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  line-height: 1.18;
  color: var(--espresso);
  margin-bottom: 26px;
}

.dresscode-sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.7;
  color: var(--espresso-soft);
  max-width: 440px;
  margin: 0 auto;
}

/* ============================================
   4. NO PHONES / ONE RULE
   ============================================ */

.rule {
  background: var(--espresso);
  color: var(--champagne);
}

.rule .card-label {
  color: var(--gold-soft);
  opacity: 0.9;
}

.rule-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px 0 30px;
}

.rule-divider::before,
.rule-divider::after {
  content: '';
  width: 46px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
}

.rule-divider::after {
  background: linear-gradient(to left, transparent, var(--gold));
}

.candle-mark {
  font-size: 6px;
  color: var(--gold);
  animation: flicker 3.4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(203, 167, 114, 0.8));
}

@keyframes flicker {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  45% { opacity: 1; transform: scale(1.15); }
  55% { opacity: 0.85; transform: scale(0.95); }
}

.rule-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 7vw, 3.4rem);
  color: #FAF4EC;
  line-height: 1.14;
  margin-bottom: 26px;
}

.rule-text {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.98rem, 2.3vw, 1.08rem);
  line-height: 1.75;
  color: rgba(241, 230, 214, 0.78);
  margin-bottom: 24px;
}

.rule-italic {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  color: var(--gold-soft);
}

/* ============================================
   5. YOUR ONLY RESPONSIBILITY
   ============================================ */

.responsibility-time {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 13vw, 6rem);
  color: var(--gold);
  line-height: 1;
  margin: 18px 0 22px;
  letter-spacing: 0.01em;
}

.responsibility-text {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.05rem, 2.6vw, 1.2rem);
  color: var(--espresso-soft);
  margin-bottom: 10px;
}

.responsibility-job {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--espresso);
  margin-top: 14px;
}

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

/* ============================================
   6. CLOSING
   ============================================ */

.closing {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--champagne) 100%);
  padding-top: 12vh;
  padding-bottom: 12vh;
}

.closing-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 6.5vw, 3.2rem);
  color: var(--espresso);
  margin-bottom: 34px;
}

.closing-line {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  color: var(--espresso-soft);
  line-height: 1.7;
  margin-bottom: 14px;
}

.closing-line.pause {
  margin-top: 24px;
  margin-bottom: 44px;
  font-style: italic;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  color: var(--espresso);
}

.closing-emotional {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 5.5vw, 2.6rem);
  color: var(--espresso);
  line-height: 1.35;
  margin-bottom: 52px;
}

.closing-signoff {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 3.4vw, 1.7rem);
  color: var(--espresso);
  margin-bottom: 14px;
}

.closing-signature {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--gold);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 640px) {
  .section, .hero {
    padding: 10vh 7vw;
  }

  .hero-datetime {
    flex-direction: column;
    gap: 4px;
  }

  .divider-dot {
    display: none;
  }

  .timeline {
    padding-left: 2px;
  }

  .dresscode-card {
    border-radius: 20px;
    padding: 3rem 1.6rem;
  }
}

@media (min-width: 641px) {
  .hero-inner {
    gap: 26px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-on-scroll, .glow, .scroll-arrow, .candle-mark, .particle {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
