/* =========================================
   TOKENS
   ========================================= */
:root {
  --ivory:   #faf6f0;
  --cream:   #f5ede0;
  --cream-d: #ede0cc;
  --gold:    #c9a96e;
  --gold-l:  #ddc9a8;
  --gold-d:  #a07840;
  --warm:    #8a7355;
  --dark:    #2a2017;
  --text:    #4a3e2e;
  --text-l:  #7a6a56;
  --white:   #ffffff;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', system-ui, sans-serif;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --section-pad: clamp(80px, 10vw, 140px);
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--ivory);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* =========================================
   FLOATING PETALS
   ========================================= */
.petals {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -60px;
  font-size: 1.2rem;
  color: var(--gold-l);
  opacity: 0;
  animation: petalFall linear infinite;
}
.petal-1 { left: 5%;  animation-duration: 14s; animation-delay: 0s;   font-size: 1rem; }
.petal-2 { left: 15%; animation-duration: 18s; animation-delay: 3s;   font-size: 1.4rem; }
.petal-3 { left: 28%; animation-duration: 12s; animation-delay: 7s;   font-size: 0.9rem; }
.petal-4 { left: 42%; animation-duration: 20s; animation-delay: 1s;   font-size: 1.1rem; }
.petal-5 { left: 55%; animation-duration: 16s; animation-delay: 5s;   font-size: 1.3rem; }
.petal-6 { left: 68%; animation-duration: 13s; animation-delay: 9s;   font-size: 0.85rem; }
.petal-7 { left: 80%; animation-duration: 17s; animation-delay: 2s;   font-size: 1.1rem; }
.petal-8 { left: 92%; animation-duration: 15s; animation-delay: 6s;   font-size: 0.95rem; }

@keyframes petalFall {
  0%   { transform: translateY(0) rotate(0deg) translateX(0);   opacity: 0; }
  5%   { opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(110vh) rotate(360deg) translateX(40px); opacity: 0; }
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
.section__eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.section__eyebrow.light { color: var(--gold-l); }

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: 2rem;
}
.section__title.light { color: var(--ivory); }

/* =========================================
   REVEAL ANIMATIONS
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-block;
  padding: 1rem 2.6rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-100%);
  transition: transform 0.3s var(--ease);
}
.btn:hover::after { transform: translateX(0); }

.btn--gold {
  background: var(--gold);
  color: var(--white);
  border: 1.5px solid var(--gold);
}
.btn--gold:hover {
  background: var(--gold-d);
  border-color: var(--gold-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,169,110,0.4);
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn--outline:hover {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,169,110,0.35);
}

.btn--full { width: 100%; text-align: center; }

/* =========================================
   SECTION BASE
   ========================================= */
.section {
  padding: var(--section-pad) clamp(1.5rem, 6vw, 6rem);
  text-align: center;
  position: relative;
  z-index: 1;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(205,183,140,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201,169,110,0.12) 0%, transparent 55%),
    var(--ivory);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1' fill='%23c9a96e' opacity='0.12'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.hero__deco {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  opacity: 0;
  animation: decoFadeIn 2s 0.8s var(--ease) forwards;
}
.hero__deco--left  { left:  clamp(10px, 3vw, 60px); }
.hero__deco--right { right: clamp(10px, 3vw, 60px); }
@keyframes decoFadeIn {
  to { opacity: 1; }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.hero__monogram {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.5em;
  color: var(--gold);
  text-transform: uppercase;
}

.hero__salute {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  color: var(--dark);
  line-height: 1;
  letter-spacing: 0.02em;
}
.hero__title .heart {
  color: var(--gold);
  display: inline-block;
  animation: heartbeat 2.4s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  30%       { transform: scale(1.18); }
  50%       { transform: scale(1); }
  70%       { transform: scale(1.1); }
}

.hero__sub {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-l);
  max-width: 520px;
  line-height: 1.8;
}

.hero__date-line {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}
.hero__date-line .line {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero__scroll-hint span {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  margin: 0 auto;
  animation: scrollHint 2s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: scaleY(0); transform-origin: top; }
  50%       { transform: scaleY(1); transform-origin: top; }
}

/* =========================================
   COUPLE
   ========================================= */
.couple__tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
  color: var(--text-l);
  max-width: 500px;
  margin: 0 auto 4rem;
}

.couple__photos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  flex-wrap: wrap;
}

.couple__photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.couple__photo {
  width: clamp(160px, 22vw, 240px);
  aspect-ratio: 3/4;
  border: 1px solid var(--gold-l);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease);
}
.couple__photo:hover { transform: scale(1.02); }
.couple__photo::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid var(--gold-l);
  z-index: 2;
  pointer-events: none;
}
.couple__photo-inner { width: 100%; height: 100%; }
.couple__photo-inner svg { width: 100%; height: 100%; object-fit: cover; }

.couple__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--dark);
  letter-spacing: 0.08em;
}

.couple__divider {
  width: 50px;
  height: 160px;
  flex-shrink: 0;
}

/* =========================================
   COUNTDOWN
   ========================================= */
.countdown {
  background:
    linear-gradient(135deg, #2a2017 0%, #3a2f1a 50%, #2a2017 100%);
  position: relative;
  overflow: hidden;
}
.countdown::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Ccircle cx='40' cy='40' r='1' fill='%23c9a96e' opacity='0.08'/%3E%3C/svg%3E") repeat;
}

.countdown__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 2rem);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.countdown__num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 300;
  color: var(--ivory);
  line-height: 1;
  display: block;
  transition: transform 0.3s var(--ease);
}
.countdown__num.bump { transform: scale(1.06); }

.countdown__label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.5rem;
}

.countdown__sep {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--gold);
  opacity: 0.5;
  padding-bottom: 1.6rem;
}

/* =========================================
   DETAILS
   ========================================= */
.details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.detail-card {
  background: var(--white);
  border: 1px solid var(--cream-d);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
  position: relative;
}
.detail-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.4s var(--ease);
}
.detail-card:hover::before { width: 80%; }
.detail-card:hover {
  box-shadow: 0 12px 40px rgba(201,169,110,0.15);
  transform: translateY(-4px);
}

.detail-card__icon { font-size: 1.8rem; }
.detail-card__label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.detail-card__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--dark);
}

/* =========================================
   TIMELINE
   ========================================= */
.timeline__track {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  padding: 1rem 0;
}
.timeline__track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--gold-l);
  transform: translateX(-50%);
}

.timeline__item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.timeline__item:nth-child(odd) .timeline__time { text-align: right; order: 0; }
.timeline__item:nth-child(odd) .timeline__desc { order: 2; text-align: left; }
.timeline__item:nth-child(even) .timeline__time { text-align: left; order: 2; }
.timeline__item:nth-child(even) .timeline__dot  { order: 1; }
.timeline__item:nth-child(even) .timeline__desc { order: 0; text-align: right; }

.timeline__time {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--gold);
}

.timeline__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--gold);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: background 0.3s;
}
.timeline__item:hover .timeline__dot { background: var(--gold); }

.timeline__desc {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
  font-style: italic;
}

/* =========================================
   GALLERY
   ========================================= */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }

.gallery__item { overflow: hidden; position: relative; }

.gallery__placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.gallery__placeholder svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.5s var(--ease);
}
.gallery__item:hover .gallery__placeholder svg { transform: scale(1.04); }

.gallery__label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.6rem 1rem;
  background: linear-gradient(to top, rgba(42,32,23,0.65), transparent);
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery__item:hover .gallery__label { opacity: 1; }

/* =========================================
   LOCATION
   ========================================= */
.location__map {
  max-width: 800px;
  margin: 0 auto 2.5rem;
  border: 1px solid var(--cream-d);
  overflow: hidden;
}
.location__map-placeholder svg { width: 100%; height: auto; }

/* =========================================
   RSVP
   ========================================= */
.rsvp {
  background:
    linear-gradient(160deg, #2a2017 0%, #3d3020 60%, #2a2017 100%);
}
.rsvp__sub {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gold-l);
  margin-bottom: 3rem;
}

.rsvp__form-wrap {
  max-width: 560px;
  margin: 0 auto;
}

.rsvp__form-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.form-field label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-l);
}

.form-field input,
.form-field textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,169,110,0.3);
  color: var(--ivory);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
  border-radius: 0;
  width: 100%;
  -webkit-appearance: none;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(201,169,110,0.4); }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.09);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field input[type="number"] { width: 100px; }

.form-field--radio label:first-child { margin-bottom: 0.2rem; }

.radio-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.radio-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ivory);
  text-transform: none;
  letter-spacing: 0;
}
.radio-opt input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

.field-error {
  font-size: 0.78rem;
  color: #e5856a;
  min-height: 1.1em;
}

.rsvp__success {
  text-align: center;
  padding: 4rem 2rem;
  animation: fadeInUp 0.6s var(--ease);
}
.rsvp__success-icon {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
  animation: spinOnce 0.8s var(--ease);
}
.rsvp__success h3 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--ivory);
  margin-bottom: 0.5rem;
}
.rsvp__success p {
  color: var(--gold-l);
  font-size: 1.05rem;
}
.rsvp__success-accent {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--gold) !important;
  margin-top: 0.8rem;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spinOnce {
  from { transform: rotate(-90deg) scale(0); }
  to   { transform: rotate(0deg) scale(1); }
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--dark);
  color: var(--ivory);
  text-align: center;
  padding: 4rem 2rem 3rem;
}

.footer__ornament {
  color: var(--gold);
  letter-spacing: 0.6em;
  font-size: 1rem;
  margin-bottom: 2rem;
  opacity: 0.7;
}

.footer__love {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--gold-l);
  margin-bottom: 0.3rem;
}

.footer__names {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ivory);
  margin-bottom: 0.8rem;
}

.footer__date {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2.5rem;
}

.footer__line {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto;
  opacity: 0.4;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .hero__deco { display: none; }

  .couple__photos { gap: 1rem; }
  .couple__divider { height: 80px; }

  .gallery__grid {
    grid-template-columns: 1fr 1fr;
  }
  .gallery__item--tall { grid-row: span 1; }
  .gallery__item--wide { grid-column: span 2; }

  .timeline__track::before { left: 1rem; transform: none; }
  .timeline__item {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 0.4rem;
    padding-left: 2.5rem;
  }
  .timeline__time,
  .timeline__dot,
  .timeline__desc { order: unset !important; text-align: left !important; }
  .timeline__dot {
    position: absolute;
    left: 0.45rem;
    margin-top: 0.25rem;
  }
  .timeline__item { position: relative; margin-bottom: 2rem; }

  .countdown__sep { display: none; }
  .countdown__grid { gap: 1rem 1.5rem; }
}

@media (max-width: 480px) {
  .gallery__grid { grid-template-columns: 1fr; }
  .gallery__item--wide { grid-column: span 1; }

  .radio-group { flex-direction: column; gap: 0.75rem; }
}

/* =========================================
   REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
