/* =============================================
   ROOT & RESET
   ============================================= */
:root {
  --paper:    #f5f3ee;
  --white:    #fdfcf8;
  --ink:      #2d4870;
  --ink-mid:  #4d6a93;
  --ink-soft: #7a96bb;
  --gold:     #c9a84c;
  --gold-lt:  #e8ddb5;
  --deep:     #1c3356;
}

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

html { scroll-behavior: smooth; }

/* overflow-x belongs on html alone. On body it also forces overflow-y to
   compute as auto, which turns body into a scroll container that can never
   scroll - the trackpad wheel gesture latches onto that dead scroller instead
   of the page. */
html {
  overflow-x: hidden;
}

body {
  font-family: "Cormorant Garamond", "Noto Serif Georgian", Georgia, serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   STICKY NAV
   ============================================= */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(245, 243, 238, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gold-lt);
  transform: translateY(-100%);
  transition: transform .35s ease;
}

.site-nav.visible { transform: translateY(0); }

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.1rem;
  font-style: italic;
  letter-spacing: .08em;
  color: var(--ink-mid);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
  position: relative;
  transition: color .2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .2s;
}

.nav-links a:hover { color: var(--deep); }
.nav-links a:hover::after { transform: scaleX(1); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 12rem 1.5rem 5rem;
  max-width: 780px;
  width: 100%;
}

.hero-eyebrow {
  font-size: clamp(.7rem, 1.3vw, .85rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 1.6rem;
}

.hero-eyebrow.hidden { display: none; }

/* Guest personalisation - dear + bridge */
.hero-dear {
  display: none;
  font-family: "Noto Serif Georgian", "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(1.15rem, 2.6vw, 1.8rem);
  line-height: 1.3;
  color: var(--ink-mid);
  letter-spacing: .04em;
  margin-bottom: .4rem;
}

.hero-dear.visible { display: block; }

.hero-bridge {
  display: none;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(.85rem, 1.7vw, 1.1rem);
  letter-spacing: .14em;
  color: var(--ink-mid);
  margin-bottom: .3rem;
}

.hero-bridge.visible { display: block; }

.hero-names {
  font-family: "Noto Serif Georgian", "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  line-height: 1.05;
  color: var(--deep);
  letter-spacing: .02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .05em;
}

.hero-amp {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 300;
  font-size: .55em;
  color: var(--gold);
  line-height: 1.2;
}

.hero-rule {
  width: min(300px, 60%);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold) 25%, var(--gold) 75%, transparent);
  margin: 2rem auto;
}

.hero-date {
  font-size: clamp(.85rem, 1.7vw, 1.1rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 2.2rem;
}

/* Countdown */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(.6rem, 2.2vw, 1.6rem);
  margin-bottom: 2.8rem;
}

.cu {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3rem;
}

.cn {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 300;
  color: var(--deep);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.cl {
  font-size: clamp(.55rem, 1vw, .7rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: .4rem;
}

.cs {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  color: var(--gold);
  line-height: 1;
  align-self: flex-start;
  padding-top: .05em;
  font-weight: 300;
}

/* CTA button */
.cta-btn {
  display: inline-block;
  padding: .9rem 3rem;
  border: 1px solid var(--gold);
  color: var(--deep);
  font-family: inherit;
  font-size: clamp(.75rem, 1.4vw, .9rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  transition: background .25s, color .25s;
}

.cta-btn:hover {
  background: var(--gold);
  color: var(--white);
}

/* Scroll hint arrow */
.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.scroll-down span {
  display: block;
  width: .65rem;
  height: .65rem;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { opacity: .4; transform: rotate(45deg) translate(-.15rem, -.15rem); }
  50%       { opacity: 1;  transform: rotate(45deg) translate(.1rem, .1rem); }
}

/* =============================================
   SHARED SECTION STYLES
   ============================================= */
.section {
  padding: clamp(4.5rem, 11vw, 7.5rem) 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.section.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section-wrap {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.section-tag {
  font-size: clamp(.65rem, 1.2vw, .75rem);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .85rem;
  display: block;
}

.section-heading {
  font-family: "Noto Serif Georgian", "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  color: var(--deep);
  letter-spacing: .03em;
  margin-bottom: .5rem;
}

.ornament {
  font-size: .95rem;
  color: var(--gold);
  letter-spacing: .2em;
  margin: .8rem 0 2.8rem;
  display: block;
}

/* =============================================
   DETAILS SECTION
   ============================================= */
.details-section { background: var(--white); }

.detail-cards {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.detail-card {
  flex: 1;
  max-width: 340px;
  padding: 2.8rem 2.2rem;
}

.detail-sep {
  width: 1px;
  background: linear-gradient(to bottom, transparent 5%, var(--gold-lt) 40%, var(--gold-lt) 60%, transparent 95%);
  align-self: stretch;
  flex-shrink: 0;
}

.card-label {
  font-size: clamp(.62rem, 1.1vw, .72rem);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}

.card-venue {
  font-family: "Noto Serif Georgian", "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--deep);
  margin-bottom: .6rem;
}

.card-info {
  font-size: clamp(.88rem, 1.5vw, 1rem);
  color: var(--ink-mid);
  letter-spacing: .04em;
  line-height: 1.55;
}

.card-time {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  color: var(--ink);
  font-weight: 500;
  margin-top: .2rem;
}

.card-line {
  width: 2rem;
  height: 1px;
  background: var(--gold-lt);
  margin: 1.3rem auto;
}

.card-addr {
  font-size: clamp(.82rem, 1.4vw, .95rem);
  color: var(--ink-soft);
  line-height: 1.7;
  font-style: italic;
}

.addr-num {
  font-style: normal;
  font-variant-numeric: lining-nums;
  letter-spacing: .04em;
  color: var(--ink-mid);
}

/* =============================================
   RSVP SECTION
   ============================================= */
.rsvp-section { background: var(--paper); }

.rsvp-wrap { max-width: 520px; }

.rsvp-sub {
  font-size: clamp(.95rem, 1.7vw, 1.1rem);
  color: var(--ink-mid);
  letter-spacing: .02em;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.form-label {
  font-size: clamp(.62rem, 1.1vw, .72rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

.form-input {
  width: 100%;
  padding: .85rem 1.1rem;
  border: 1px solid var(--gold-lt);
  border-radius: 0;
  background: var(--white);
  font-family: inherit;
  font-size: clamp(.95rem, 1.7vw, 1.05rem);
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
}

.form-input:focus { border-color: var(--gold); }
.form-input::placeholder { color: var(--ink-soft); }

.guest-count-input { max-width: 8rem; }
.guest-count-input::-webkit-inner-spin-button,
.guest-count-input::-webkit-outer-spin-button { opacity: .5; }

/* Radio cards */
.radio-group {
  display: flex;
  gap: .9rem;
}

.radio-card { flex: 1; cursor: pointer; }

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-face {
  display: block;
  padding: .8rem 1rem;
  border: 1px solid var(--gold-lt);
  background: var(--white);
  font-family: inherit;
  font-size: clamp(.88rem, 1.5vw, 1rem);
  color: var(--ink-mid);
  text-align: center;
  letter-spacing: .05em;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.radio-card input[type="radio"]:checked + .radio-face {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--white);
}

.radio-card:hover .radio-face { border-color: var(--gold); }

/* Select */
.select-wrap { position: relative; }

.select-wrap::after {
  content: "?";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  color: var(--gold);
  pointer-events: none;
  font-size: .75rem;
}

.form-select {
  width: 100%;
  padding: .85rem 2.5rem .85rem 1.1rem;
  border: 1px solid var(--gold-lt);
  background: var(--white);
  font-family: inherit;
  font-size: clamp(.95rem, 1.7vw, 1.05rem);
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color .2s;
}

.form-select:focus { border-color: var(--gold); }

/* Submit button */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  width: 100%;
  padding: 1.05rem;
  background: var(--deep);
  border: none;
  font-family: inherit;
  font-size: clamp(.78rem, 1.4vw, .9rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white);
  cursor: pointer;
  transition: background .25s, transform .15s;
}

.submit-btn:hover { background: var(--gold); transform: translateY(-1px); }
.submit-btn:active { transform: translateY(0); }

.submit-arrow { transition: transform .2s; }
.submit-btn:hover .submit-arrow { transform: translateX(5px); }

/* Success message */
.rsvp-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
  padding: 1.8rem;
  border: 1px solid var(--gold-lt);
  background: var(--white);
  text-align: center;
  color: var(--ink-mid);
  font-size: 1.05rem;
  letter-spacing: .03em;
}

.rsvp-success.show {
  display: flex;
  animation: fadeIn .5s ease;
}

.success-icon {
  font-size: 1.5rem;
  color: var(--gold);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--deep);
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3rem;
}

.footer-link-label {
  font-size: clamp(.6rem, 1.1vw, .7rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .4rem;
}

.footer-link-url {
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  letter-spacing: .08em;
  color: var(--gold-lt);
}

.footer-link-url strong { color: var(--gold); }

.footer-ornament {
  color: var(--gold);
  letter-spacing: .3em;
  font-size: .85rem;
}

.footer-credit {
  font-size: clamp(.65rem, 1.2vw, .75rem);
  letter-spacing: .1em;
  color: var(--ink-soft);
}

.footer-credit strong { color: var(--gold-lt); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 640px) {
  .hero-content { padding-top: 7rem; }

  .detail-cards { flex-direction: column; align-items: center; }

  .detail-sep {
    width: min(180px, 55%);
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold-lt), transparent);
    align-self: auto;
  }

  .detail-card { max-width: 100%; width: 100%; padding: 2.2rem 1.2rem; }

  .nav-links { gap: 1.3rem; }
  .nav-links a { font-size: .72rem; }
}


/* ===========================================================================
   Viewport pin + loading screen
   ---------------------------------------------------------------------------
   Shared across every Weddsite template; only the palette below is per design.

   --vh is written by the inline script in <head> and re-measured on width
   changes only, so Instagram's and Messenger's sliding nav bar cannot resize
   the layout. `vh`, `svh`, `lvh` and `dvh` all move with it, which is why the
   pin has to come from JS. The 100vh/100svh floors stay as the no-JS fallback
   and MUST be declared before the .vh-lock rule that overrides them.

   The loader exists so `font-display: block` is safe: the block period is spent
   behind the spinner instead of on an invisible page. It also holds the entry
   animation (via .is-loading) so the intro is not played out behind it.
   =========================================================================== */

:root {
    --vh: 1vh;
}

html {
    overscroll-behavior-y: none;
}

.vh-lock .hero {
    min-height: calc(var(--vh) * 100);
}

/* Entry animations must not play out behind the spinner - a guest who uncovers a
   finished, static scene has been shown nothing. `is-loading` is set by the
   inline script in <head> before first paint and removed on reveal, so a paused
   animation resumes from frame zero exactly when the guest can first see it.
   The spinner itself is excluded, and with JS off the class never lands. */
.is-loading body *:not(.loader):not(.loader__spinner) {
    animation-play-state: paused !important;
}

.loader {
    position: fixed;
    inset: 0;
    /* Out-ranks every entry overlay (envelopes / curtains / clouds live at 9999+). */
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f3ee;
    opacity: 1;
    transition: opacity 0.55s ease;
}

.loader.is-hidden {
    opacity: 0;
}

.loader.is-gone {
    display: none;
}

.loader__spinner {
    display: block;
    width: 40px;
    height: 40px;
    border: 2px solid #e8ddb5;
    border-top-color: #2d4870;
    border-radius: 50%;
    animation: loader-spin 0.9s linear infinite;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}
