@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&display=swap");

/* =========================
   Emre & Sydney — Wedding Theme
   Cream / warm taupe / muted olive
========================= */
:root {
  --paper: #faf6ef;
  --ink: #766452;
  --ink-soft: #928170;
  --olive: #6f7052;
  --border: rgba(118, 100, 82, 0.36);
  --english-font: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; min-height: 100%; }
html { background: var(--paper); }
body { background: var(--paper); color: var(--ink); font-family: var(--english-font); overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, video { display: block; }
[hidden] { display: none !important; }
body.lock-scroll { overflow: hidden; height: 100svh; }
body.ready-scroll { overflow-x: hidden; overflow-y: auto; height: auto; }

/* Center a mobile-size invitation on large desktop screens. */
.stamp-screen, .wedding-content {
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
}
.wedding-content { background: var(--paper); }

/* =========================
   1. Stamp / opening
========================= */
.stamp-screen {
  height: 100svh;
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
.stamp-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}
.open-invitation {
  position: absolute;
  bottom: calc(64px + env(safe-area-inset-bottom));
  left: 0;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: #655746;
  font-family: var(--english-font);
  font-size: clamp(18px, 4.5vw, 23px);
  font-weight: 500;
  letter-spacing: 1px;
  text-align: center;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.92);
  cursor: pointer;
  animation: gentlePulse 2.5s ease-in-out infinite;
}
.open-invitation.fade-out { animation: textFadeOut 0.4s ease forwards; }

/* =========================
   White transition stamp -> card
========================= */
.white-transition {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  pointer-events: none;
  background: #fff;
  opacity: 0;
}
.white-transition.show {
  display: block;
  animation: whiteIn 0.6s ease forwards;
}
.white-transition.fade-out {
  display: block;
  animation: whiteOut 0.7s ease forwards;
}

/* =========================
   2. Artwork sections — no cropping
========================= */
.art-section, .location-section {
  margin: 0;
  padding: 0;
  width: 100%;
  line-height: 0;
  background: var(--paper);
}
.art-section img, .location-art > img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0;
  padding: 0;
}

/* =========================
   3. Countdown — supplied countdown.png artwork
   Landscape artwork is shown fully, without cropping.
   Live numbers sit in its intentionally empty lower area.
========================= */
.countdown-section {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 1536 / 1024;
  background-color: var(--paper);
  background-image: url("assets/countdown.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  overflow: hidden;
}
.countdown-inner {
  position: absolute;
  z-index: 2;
  top: 64%;
  left: 50%;
  transform: translateX(-50%);
  width: 83%;
  max-width: 470px;
  text-align: center;
}
.countdown-display {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  align-items: start;
  column-gap: clamp(1px, 0.5vw, 5px);
  width: 100%;
  direction: ltr;
}
.countdown-unit {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown-unit span,
.countdown-colon {
  color: var(--olive);
  font-family: var(--english-font);
  font-size: clamp(24px, 7.7vw, 43px);
  font-weight: 400;
  line-height: 0.95;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.6px;
}
.countdown-colon {
  line-height: 0.8;
}
.countdown-unit small {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: clamp(6px, 1.6vw, 10px);
  letter-spacing: 0.8px;
  font-weight: 400;
  white-space: nowrap;
}

/* =========================
   4. Location artwork and clickable VIEW MAP
========================= */
.location-art { position: relative; width: 100%; }
.location-map-hotspot {
  position: absolute;
  top: 85%;
  left: 27%;
  width: 46%;
  height: 8%;
  z-index: 4;
  cursor: pointer;
  border-radius: 20px;
}
.location-map-hotspot:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
}

/* =========================
   5. RSVP — same warm palette as artwork
========================= */
.rsvp-section {
  padding: 44px clamp(18px, 6vw, 34px) 68px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}
.rsvp-card { max-width: 440px; margin: 0 auto; }
.rsvp-card h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--english-font);
  font-size: clamp(41px, 10vw, 56px);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: 3px;
}
.rsvp-subtitle {
  margin: 8px 0 26px;
  color: var(--ink-soft);
  font-size: clamp(17px, 4.2vw, 21px);
  line-height: 1.5;
}
.rsvp-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rsvp-choice-btn {
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.rsvp-choice-btn.active,
.rsvp-choice-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.rsvp-form {
  margin-top: 26px;
  text-align: left;
  animation: formReveal 0.4s ease both;
}
.rsvp-form label {
  display: block;
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 17px;
}
.rsvp-form input,
.rsvp-form textarea,
.rsvp-form select {
  display: block;
  width: 100%;
  min-height: 47px;
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  outline: none;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  font-family: var(--english-font);
  font-size: 18px;
}
.rsvp-form textarea { resize: vertical; min-height: 92px; }
.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder { color: #a49789; }
.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(118,100,82,0.08); }
.submit-rsvp {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #fff;
  font-size: 18px;
  letter-spacing: 2px;
  cursor: pointer;
}
.submit-rsvp:disabled { opacity: 0.5; cursor: wait; }
.rsvp-status {
  margin: 20px 0 0;
  padding: 12px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
  border: 1px solid var(--border);
}
.rsvp-status.error { color: #8a403c; border-color: rgba(138,64,60,0.4); }
.rsvp-status.success { color: #536a4e; border-color: rgba(83,106,78,0.4); }

/* =========================
   Small white logo footer — after RSVP
========================= */
.final-logo-footer {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.final-footer-logo {
  display: block;
  width: auto;
  height: 72px;
  max-width: 92px;
  object-fit: contain;
}

/* =========================
   Animations
========================= */
@keyframes gentlePulse { 0%, 100% { opacity: 0.78; } 50% { opacity: 1; } }
@keyframes textFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes whiteIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes whiteOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes formReveal { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 380px) {
  .countdown-inner { top: 63%; width: 88%; }
  .countdown-unit span, .countdown-colon { font-size: 7.6vw; }
  .countdown-unit small { font-size: 1.65vw; letter-spacing: 0.5px; }
  .final-footer-logo { height: 64px; }
  .rsvp-choice { gap: 8px; }
  .rsvp-choice-btn { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .open-invitation { animation: none; }
}

/* =========================
   Bigger Final Footer Logo
========================= */

.final-small-logo {
  width: 130px !important;
  height: auto !important;
  max-width: none !important;
}
