/* ==========================================================================
   Rasha & Divij — Wedding site styles
   Palette: ivory / blush / dusty harbour blue / eucalyptus / soft gold
   ========================================================================== */

:root {
  --ivory: #fdfaf3;
  --ink: #3b3a36;
  --ink-soft: #6b6a63;
  --gold: #b98d4f;
  --gold-soft: #d9bc8c;
  --blush: #e8c8c4;
  --harbour: #7fa8bd;
  --eucalyptus: #5d7263;
  --card-bg: rgba(253, 250, 243, 0.86);
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Great Vibes", cursive;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--ivory);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* While the envelope is sealed, the page cannot scroll */
body.is-sealed { overflow: hidden; height: 100dvh; }

/* ==========================================================================
   ENVELOPE OVERLAY
   ========================================================================== */

#envelope-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  background:
    radial-gradient(ellipse at 50% 40%, #fdf6e9 0%, #f3e3d3 55%, #e8cfc2 100%);
}

.envelope {
  position: relative;
  width: min(360px, 82vw);
  aspect-ratio: 36 / 24;
  border: none;
  background: transparent;
  cursor: pointer;
  perspective: 900px;
  animation: env-float 4.5s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.envelope:focus-visible { outline: 3px solid var(--gold); outline-offset: 12px; border-radius: 8px; }

@keyframes env-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.envelope > span { position: absolute; display: block; }

/* back of the envelope */
.env-back {
  inset: 0;
  background: linear-gradient(160deg, #f7ecd9, #eeddc2);
  border-radius: 6px;
  box-shadow: 0 24px 48px -18px rgba(90, 60, 30, 0.45);
}

/* the invitation card that slides out */
.env-card {
  left: 5%; right: 5%; top: 6%; bottom: 10%;
  background: var(--ivory);
  border-radius: 4px;
  border: 1px solid #e4d7bd;
  box-shadow: 0 4px 14px rgba(90, 60, 30, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.env-card-inner { text-align: center; padding: 0.5rem; }
.env-card-script {
  display: block;
  font-family: var(--script);
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  color: var(--gold);
  line-height: 1.1;
}
.env-card-line {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

/* front pocket (the two side folds + bottom fold) */
.env-pocket {
  inset: 0;
  z-index: 3;
  border-radius: 6px;
  background: linear-gradient(200deg, #f3e5cc, #e9d5b4);
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 -2px 6px rgba(120, 85, 40, 0.15);
}

/* the flap that lifts open */
.env-flap {
  inset: 0;
  z-index: 4;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(170deg, #f6ead4, #ecd9ba);
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  transform-origin: top center;
  transform: rotateX(0deg);
  filter: drop-shadow(0 3px 3px rgba(120, 85, 40, 0.22));
}

/* wax seal */
.envelope > .env-seal {
  z-index: 5;
  left: 50%; top: 52%;
  width: 68px; height: 68px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #d98a80, #a83f3a 60%, #8c2f2d);
  box-shadow:
    0 3px 8px rgba(90, 25, 20, 0.4),
    inset 0 0 0 5px rgba(255, 235, 225, 0.16),
    inset 0 2px 4px rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.env-seal span {
  font-family: var(--script);
  font-size: 1.35rem;
  color: #fbe9df;
  text-shadow: 0 1px 2px rgba(80, 20, 15, 0.55);
}

.envelope-hint {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9c7a55;
  animation: hint-pulse 2.6s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* ==========================================================================
   FIXED SCENE
   ========================================================================== */

#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
#harbour-svg { width: 100%; height: 100%; display: block; }

/* gentle drifting water */
.wave { animation: wave-drift 14s linear infinite; }
.wave-2 { animation-duration: 19s; animation-direction: reverse; }
.wave-3 { animation-duration: 26s; }
@keyframes wave-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-1440px); }
}

/* drifting clouds */
.cloud { animation: cloud-drift 60s linear infinite; }
.cloud-b { animation-duration: 85s; }
.cloud-c { animation-duration: 70s; animation-delay: -30s; }
@keyframes cloud-drift {
  from { transform: translateX(-300px); }
  to   { transform: translateX(1740px); }
}

/* ferry chugging across the harbour */
#ferry { animation: ferry-cross 55s linear infinite; transform: translate(-120px, 690px); }
@keyframes ferry-cross {
  from { transform: translate(-120px, 690px); }
  to   { transform: translate(1560px, 690px); }
}

@media (prefers-reduced-motion: reduce) {
  .wave, .cloud, #ferry, .envelope, .envelope-hint, .scroll-cue { animation: none !important; }
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

#content { position: relative; z-index: 1; }

.section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 10vh, 7rem) 1.25rem;
}

.card {
  width: min(560px, 100%);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(185, 141, 79, 0.28);
  border-radius: 14px;
  box-shadow: 0 18px 44px -20px rgba(60, 50, 30, 0.35);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
}
.card-wide { width: min(680px, 100%); }

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5.5vw, 2.7rem);
  letter-spacing: 0.06em;
  color: var(--ink);
}

.flourish {
  color: var(--gold);
  font-size: 1.3rem;
  margin: 0.6rem 0 1.4rem;
}

.card p { font-size: 1.12rem; line-height: 1.65; color: var(--ink-soft); }
.card p + p { margin-top: 1rem; }

.placeholder-copy em { color: #b0a893; font-size: 0.92em; }

.photo-placeholder {
  margin-top: 1.6rem;
  padding: 2.4rem 1rem;
  border: 1.5px dashed var(--gold-soft);
  border-radius: 10px;
  color: #b0a893;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

/* --- HERO ----------------------------------------------------------- */

.section-hero { text-align: center; position: relative; }
/* soft ivory glow so the names stay legible over the bridge/water */
.section-hero::before {
  content: "";
  position: absolute;
  inset: 8% 0;
  background: radial-gradient(ellipse 62% 48% at 50% 46%, rgba(253, 250, 243, 0.85) 0%, rgba(253, 250, 243, 0.55) 55%, rgba(253, 250, 243, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.hero-eyebrow {
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}

.hero-names {
  font-family: var(--script);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
  text-shadow: 0 2px 18px rgba(253, 250, 243, 0.9);
}
.hero-name { font-size: clamp(3.4rem, 11vw, 6.2rem); }
.hero-amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-tagline {
  margin-top: 1.6rem;
  font-style: italic;
  font-size: clamp(1.1rem, 3.2vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 34ch;
}

.hero-date {
  margin-top: 1.1rem;
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  animation: cue-bob 2.2s ease-in-out infinite;
}
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); opacity: 0.65; }
  50%      { transform: translateY(8px); opacity: 1; }
}

/* --- COUNTDOWN -------------------------------------------------------- */

.countdown-lede { font-style: italic; margin-bottom: 1.6rem; }

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.5rem, 2vw, 1rem);
}
.count-tile {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(185, 141, 79, 0.3);
  border-radius: 10px;
  padding: 1rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.count-num {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 600;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.count-label {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --- SCHEDULE ---------------------------------------------------------- */

.timeline { list-style: none; text-align: left; margin-top: 0.4rem; }
.timeline li {
  display: grid;
  grid-template-columns: 5.2rem 20px 1fr;
  gap: 0 1rem;
  align-items: start;
  position: relative;
  padding-bottom: 2rem;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(5.2rem + 1rem + 9px);
  top: 22px;
  bottom: 2px;
  width: 2px;
  background: var(--gold-soft);
}
.timeline-time {
  font-weight: 600;
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  padding-top: 1px;
}
.timeline-dot {
  width: 14px; height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--blush);
  border: 3px solid var(--gold);
}
.timeline-what { font-size: 1.08rem; line-height: 1.5; color: var(--ink-soft); }
.timeline-what strong { color: var(--ink); font-size: 1.14rem; }

/* --- VENUE -------------------------------------------------------------- */

.venue-name { font-size: 1.7rem !important; color: var(--ink) !important; font-weight: 500; }
.venue-address { letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.95rem !important; margin-top: 0.3rem !important; }
.venue-blurb { margin-top: 1.1rem !important; }

.map-wrap {
  margin-top: 1.6rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(185, 141, 79, 0.3);
  aspect-ratio: 16 / 10;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* --- RSVP FORM ----------------------------------------------------------- */

.rsvp-lede { margin-bottom: 1.8rem; }

#rsvp-form { text-align: left; }

.form-row { margin-bottom: 1.25rem; }
.form-row label, .form-attending legend {
  display: block;
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 0.45rem;
  letter-spacing: 0.02em;
}
.optional { color: var(--ink-soft); font-style: italic; font-size: 0.9em; }

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #d8c9a8;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185, 141, 79, 0.18);
}
textarea { resize: vertical; }

.form-attending { border: none; }
.radio-row { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.radio-pill { position: relative; cursor: pointer; }
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill span {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1.5px solid #d8c9a8;
  background: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  transition: all 0.2s;
}
.radio-pill input:checked + span {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.radio-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(185, 141, 79, 0.35); }

#guest-details { transition: opacity 0.35s; }
#guest-details.is-hidden { display: none; }

.btn-submit {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(160deg, var(--gold), #a2793f);
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 10px 22px -10px rgba(140, 100, 45, 0.6);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(140, 100, 45, 0.7); }
.btn-submit:active { transform: translateY(0); }
.btn-submit[disabled] { opacity: 0.6; cursor: wait; transform: none; }

#form-status { margin-top: 1rem; font-size: 1.05rem; min-height: 1.4em; }
#form-status.ok { color: var(--eucalyptus); }
#form-status.err { color: #a83f3a; }

/* --- FOOTER --------------------------------------------------------------- */

.site-footer {
  position: relative;
  text-align: center;
  padding: 4rem 1rem 3rem;
  color: var(--ivory);
}
.footer-script {
  font-family: var(--script);
  font-size: 2.4rem;
  text-shadow: 0 2px 12px rgba(20, 25, 50, 0.5);
}
.footer-date {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 600px) {
  .countdown-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline li { grid-template-columns: 4rem 16px 1fr; gap: 0 0.7rem; }
  .timeline li:not(:last-child)::after { left: calc(4rem + 0.7rem + 7px); }
  .card { padding: 1.6rem 1.2rem; }
  .radio-row { flex-direction: column; }
  .radio-pill span { display: block; text-align: center; }
}
