/* ══════════════════════════════════════════════════════════
   Nischitartham · Meghana & Puneeth
   Palette drawn from the printed invitation: blush, gold, sage
   ══════════════════════════════════════════════════════════ */

:root {
  --cream:      #fdf6ef;
  --blush:      #f7dfe0;
  --peach:      #f8e3d1;
  --rose:       #dfa4ae;
  /* Readable counterpart to --rose. The soft rose sits at ~1.7:1 on the blush
     background, which is unreadable at small sizes; this clears 5:1. */
  --rose-deep:  #98485c;
  --gold:       #b8933f;
  --gold-deep:  #8f6f2a;
  --gold-light: #d9bd7a;
  --sage:       #7d9070;
  --sage-deep:  #5b6f52;
  --ink:        #6b4a35;
  --ink-soft:   #8a6b56;
  --stone:      #cbb4a4;

  --serif:   'Cormorant Garamond', Georgia, serif;
  --display: 'Marcellus', Georgia, serif;
  --caps:    'Cinzel', Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/* The washed sky sits on its own fixed layer rather than on `background-attachment:
   fixed`, which breaks compositing on long pages and misbehaves on iOS Safari. */
html::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 70% at 50% 0%,   #fdeee6 0%, transparent 60%),
    radial-gradient(100% 60% at 12% 30%,  #f6dde2 0%, transparent 55%),
    radial-gradient(110% 65% at 88% 55%,  #fae4cf 0%, transparent 55%),
    radial-gradient(120% 80% at 50% 100%, #eef0e2 0%, transparent 60%),
    linear-gradient(180deg, #fdf3ec 0%, #f8e6e4 45%, #f6ecdc 75%, #eff1e6 100%);
}

/* soft bokeh sparkle over the whole page */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.75) 0 3px, transparent 4px),
    radial-gradient(circle at 76% 14%, rgba(255,255,255,.6)  0 6px, transparent 8px),
    radial-gradient(circle at 62% 46%, rgba(255,255,255,.5)  0 4px, transparent 6px),
    radial-gradient(circle at 28% 68%, rgba(255,255,255,.55) 0 5px, transparent 7px),
    radial-gradient(circle at 88% 78%, rgba(255,255,255,.5)  0 3px, transparent 5px),
    radial-gradient(circle at 8%  88%, rgba(255,255,255,.45) 0 4px, transparent 6px);
}

/* ─────────── decorative frame ─────────── */
.frame { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.pillar { position: absolute; top: 0; height: 100%; width: clamp(48px, 7vw, 104px); opacity: .85; }
.pillar-l { left: 0; }
.pillar-r { right: 0; }

.canopy {
  position: absolute; top: 0; left: 0; right: 0;
  height: clamp(190px, 26vw, 300px);
  pointer-events: none; z-index: 2;
}
.canopy svg { width: 100%; height: 100%; }
.bell-swing { transform-origin: center top; animation: sway 5.5s ease-in-out infinite; }
@keyframes sway {
  0%,100% { transform: rotate(-2.5deg); }
  50%     { transform: rotate(2.5deg); }
}

main { position: relative; z-index: 3; }

/* ─────────── shared section rhythm ─────────── */
section, footer {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 104px) clamp(24px, 8vw, 40px);
  text-align: center;
}

.hero { padding-top: clamp(180px, 26vw, 300px); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bell-swing { animation: none; }
}

/* ─────────── hero ─────────── */
.om { width: 54px; height: 54px; display: block; margin: 0 auto 4px; }

.invocation {
  font-family: var(--display);
  font-size: clamp(15px, 3.4vw, 19px);
  letter-spacing: .04em;
  color: var(--gold-deep);
  margin: 0 0 clamp(28px, 6vw, 44px);
}

.monogram {
  position: relative;
  display: inline-block;
  margin-bottom: clamp(24px, 5vw, 40px);
  line-height: 1;
}
.m-letter, .m-amp {
  font-family: var(--display);
  font-size: clamp(64px, 15vw, 108px);
}
.m-letter { color: var(--sage-deep); }
.m-amp    { color: var(--gold); margin-left: -.22em; }
.m-sprig  { position: absolute; right: -26px; bottom: 18%; width: 40px; }

/* Cinzel caps are wide — "NISCHITARTHAM" is 13 of them, so the size and
   tracking have to shrink faster than the viewport to stay on one line. */
.title {
  font-family: var(--caps);
  font-weight: 600;
  font-size: clamp(21px, 6.6vw, 54px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
@media (min-width: 700px) { .title { letter-spacing: .1em; } }

.rule {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--gold-light);
  margin: clamp(22px, 4vw, 32px) auto;
  max-width: 300px;
  font-size: 13px;
}
.rule span {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

.couple { margin-top: 6px; }
.person h2 {
  font-family: var(--caps);
  font-weight: 500;
  font-size: clamp(28px, 7.4vw, 46px);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
}
.person p {
  font-size: clamp(15px, 3.6vw, 19px);
  color: var(--ink-soft);
  margin: 0;
}
.amp {
  font-style: italic;
  font-size: clamp(17px, 4vw, 22px);
  color: var(--rose);
  margin: clamp(18px, 3.6vw, 26px) 0;
}

/* ─────────── invitation card ─────────── */
.card {
  position: relative;
  padding: clamp(34px, 7vw, 54px) clamp(26px, 6vw, 44px);
  background: rgba(255,252,248,.6);
  border: 1px solid rgba(184,147,63,.28);
  backdrop-filter: blur(3px);
}
.corner {
  position: absolute; width: 20px; height: 20px;
  border: 1.5px solid var(--gold-light);
}
.corner.tl { top: -1px; left: -1px;  border-right: 0; border-bottom: 0; }
.corner.tr { top: -1px; right: -1px; border-left: 0;  border-bottom: 0; }
.corner.bl { bottom: -1px; left: -1px;  border-right: 0; border-top: 0; }
.corner.br { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; }

.lede {
  margin: 0;
  font-size: clamp(18px, 4.4vw, 24px);
  line-height: 1.65;
  color: var(--gold-deep);
}

/* ─────────── date & venue ─────────── */
.eyebrow {
  font-family: var(--caps);
  font-weight: 500;
  font-size: 12.5px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--rose-deep);
  margin: 0 0 16px;
}
.date {
  font-family: var(--caps);
  font-weight: 500;
  font-size: clamp(20px, 5.2vw, 31px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 14px;
}
.date sup { font-size: .5em; letter-spacing: 0; }
.time { font-size: clamp(18px, 4.4vw, 24px); color: var(--ink); margin: 0 0 8px; }
.time em { color: var(--ink-soft); }
.sub { font-style: italic; color: var(--ink-soft); font-size: clamp(15px, 3.6vw, 18px); margin: 0; }

.venue {
  font-family: var(--display);
  font-size: clamp(24px, 6vw, 36px);
  color: var(--gold);
  margin: 0 0 14px;
}
.addr { font-size: clamp(17px, 4.2vw, 21px); line-height: 1.6; color: var(--ink); margin: 0 0 26px; }

/* Venue photograph — thin gold rule and a soft warm wash so a plain
   photo still sits inside the invitation's palette. */
.venue-photo {
  margin: 0 0 26px;
  padding: 8px;
  background: rgba(255,252,248,.55);
  border: 1px solid rgba(184,147,63,.3);
}
.venue-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: saturate(.92) brightness(1.02);
}

/* ─────────── countdown ─────────── */
.countdown {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: clamp(10px, 3vw, 22px);
  margin: clamp(32px, 6vw, 46px) 0 clamp(28px, 5vw, 38px);
}
.unit {
  min-width: 68px;
  padding: 14px 10px 11px;
  background: rgba(255,252,248,.55);
  border: 1px solid rgba(184,147,63,.25);
}
.unit b {
  display: block;
  font-family: var(--display);
  font-size: clamp(23px, 5.6vw, 32px);
  color: var(--gold-deep);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.unit span {
  display: block; margin-top: 3px;
  font-family: var(--caps);
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
}

.cal-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─────────── buttons ─────────── */
.ghost {
  display: inline-block;
  padding: 11px 24px;
  font-family: var(--caps);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(184,147,63,.5);
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.ghost:hover { background: rgba(184,147,63,.12); border-color: var(--gold); }

.submit {
  width: 100%;
  margin-top: 8px;
  padding: 15px 24px;
  font-family: var(--caps);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: #fffdf9;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  border: 0; cursor: pointer;
  transition: filter .25s, transform .15s;
}
.submit:hover:not(:disabled) { filter: brightness(1.08); }
.submit:active:not(:disabled) { transform: translateY(1px); }
.submit:disabled { opacity: .6; cursor: progress; }

/* ─────────── RSVP form ─────────── */
.rsvp-form { margin-top: clamp(28px, 5vw, 40px); text-align: left; }

.field { display: block; margin-bottom: 20px; border: 0; padding: 0; }
.field > span, .field > legend {
  display: block; margin-bottom: 7px; padding: 0;
  font-family: var(--caps);
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft);
}
.field i { color: var(--rose); font-style: normal; }
.field small { letter-spacing: .06em; text-transform: none; font-size: 10px; opacity: .8; }

.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=number],
.field textarea {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  background: rgba(255,253,250,.75);
  border: 1px solid rgba(184,147,63,.3);
  border-radius: 0;
  transition: border-color .25s, background .25s;
  -webkit-appearance: none;
}
.field input:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--gold);
  background: #fffdfa;
}
.field textarea { resize: vertical; line-height: 1.5; }

.field input::placeholder, .field textarea::placeholder { color: #c3ac99; font-style: italic; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; gap: 0; } }

.pills { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .pills { grid-template-columns: 1fr; } }
.pills label { cursor: pointer; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span {
  display: block; padding: 14px 12px; text-align: center;
  font-size: 16px; color: var(--ink-soft);
  background: rgba(255,253,250,.6);
  border: 1px solid rgba(184,147,63,.3);
  transition: all .25s;
}
.pills input:checked + span {
  color: var(--gold-deep);
  background: rgba(184,147,63,.14);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(184,147,63,.35);
}
.pills input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }

#guestsField { transition: opacity .3s, max-height .3s; overflow: hidden; }
#guestsField.hidden { opacity: 0; max-height: 0; margin-bottom: 0; pointer-events: none; }

/* Inline per-field errors. `.field small` already styles the tiny
   "(including yourself)" hint, so this needs the extra specificity to undo
   its size, tracking and opacity. */
.field small.field-err {
  display: block;
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 14.5px;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
  color: #b3475c;
  line-height: 1.4;
}
.field small.field-err:empty { display: none; }

/* "Please share at least one" — sits tight under the email/phone pair */
.contact-req { margin-top: -12px; }
.contact-req .hint {
  display: block;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
  color: var(--ink-soft);
  font-style: italic;
}

.field.invalid input,
.field.invalid textarea { border-color: #b3475c; }

.form-msg { min-height: 20px; margin: 12px 0 0; text-align: center; font-size: 16px; }
.form-msg.err { color: #b3475c; }

/* ─────────── thank-you ─────────── */
.thanks { margin-top: clamp(28px, 5vw, 40px); }
.lotus { width: 56px; height: 56px; display: block; margin: 0 auto 10px; }
.thanks h4 {
  font-family: var(--display);
  font-size: clamp(24px, 6vw, 34px);
  color: var(--gold);
  margin: 0 0 12px;
  font-weight: 400;
}
.thanks p { font-size: clamp(17px, 4.2vw, 20px); line-height: 1.6; color: var(--ink); margin: 0 0 26px; }

/* ─────────── footer ─────────── */
footer { padding-bottom: clamp(70px, 12vw, 110px); }
.fnames {
  font-family: var(--display);
  font-size: clamp(22px, 5.4vw, 30px);
  color: var(--gold);
  margin: 0 0 8px;
}
.fsub {
  font-family: var(--caps);
  font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
