/* Shared by every view: tokens, reset, buttons, and the modal shell the
   RSVP form and the role proposal both sit in. */

:root {
  --olive: #636B2F;
  --olive-mid: #555C27;
  --olive-deep: #4B5124;
  --sienna: #A63F00;
  --gold: #DBA400;
  --cream: #FBF6EB;
  --cream-2: #F5EEDD;
  --nude: #EFE6D3;
  --charcoal: #2B2A24;
  --charcoal-soft: #48473d;

  --font-script: 'Luxurious Script', cursive;
  --font-handwritten: 'Covered By Your Grace';
  --font-calligraphy: 'Lavishly Yours';
  --font-signature: 'Alex Brush', cursive;
  /* The couple names are hand-lettered artwork (assets/name-*.png), not type.
     This is only the fallback shown if those images fail to load. */
  --font-name: 'Great Vibes', 'Alex Brush', cursive;
  /* the ampersand between them — the one glyph still set in a real font */
  --font-amp: 'Allura', 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Jost', sans-serif;
  --font-body: 'Montserrat', sans-serif;

  --edge: clamp(1.25rem, 6vw, 4rem);
  --vvh: 100vh;
  --vv-offset: 0px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

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

.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: clamp(0.78rem, 1.6vw, 0.88rem);
  padding: 1.15em 3.6em;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--charcoal);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
}

.btn-primary:hover {
  background: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
}

/* ---------- RSVP MODAL (bottom-sheet card) ---------- */
.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  top: var(--vv-offset);
  left: 0;
  right: 0;
  height: 100vh;
  height: var(--vvh);
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(180deg, rgba(43, 42, 36, 0.35) 0%, rgba(43, 42, 36, 0.72) 60%);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s ease;
}

/* Modal Card */
/* No background here: the cream lives on .rsvp-body. Painting it on the
   card too would let it peek through the anti-aliased rounded corners
   behind the olive header. The card's overflow clip rounds both. */
.modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  max-height: calc(var(--vvh) * 0.92);
  /* Header stays put; only .rsvp-body scrolls, so the scrollbar lives
     inside the form instead of a gutter running past the header. */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 55px rgba(0, 0, 0, 0.35);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(.22, 1, .36, 1);
}

.modal.open .modal-content {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .modal {
    align-items: center;
    padding: 2rem;
  }

  .modal-content {
    border-radius: 24px;
    max-height: 88vh;
    transform: translateY(30px) scale(0.96);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(.22, 1, .36, 1), opacity 0.35s ease;
  }

  .modal.open .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  border: none;
  background: rgba(251, 246, 235, 0.14);
  color: var(--cream);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.close-modal:hover {
  background: rgba(251, 246, 235, 0.28);
  transform: rotate(90deg);
}

@keyframes rsvp-thankyou-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.deadline-highlight {
  color: var(--gold);
  font-weight: 600;
  background: rgba(219, 164, 0, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
}

/* Only one view is on screen at a time (main.js toggles hidden). */
.view[hidden] {
  display: none !important;
}
