/* Nikita weds Ayush — guest + shared styles. No external fonts; system serif stack. */

:root {
  --ivory: #fbf5e9;
  --ivory-deep: #f4e9d4;
  --paper: #fffdf8;
  --maroon: #7a1f2b;
  --maroon-deep: #5c1520;
  --marigold: #e8a317;
  --marigold-soft: #f8e3b0;
  --gold-text: #8a4a00;      /* AA on ivory */
  --ink: #2b1d1a;
  --muted: #65534e;          /* AA on ivory and paper */
  --line: #e4d3b4;
  --danger: #a3141f;
  --ok: #2f6b3a;
  --focus: #1d4ed8;

  --serif: "Cormorant Garamond", "Cormorant", "EB Garamond", Garamond, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(60 30 10 / 0.06), 0 8px 28px rgb(60 30 10 / 0.08);
  --max: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 4rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: var(--maroon); margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
a { color: var(--maroon); text-underline-offset: 0.2em; }
a:hover { color: var(--maroon-deep); }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--maroon); color: var(--ivory); padding: 0.6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: var(--ivory); }
.noscript { padding: 2rem; text-align: center; font-family: var(--serif); font-size: 1.25rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.6rem 1.4rem;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-lg { min-height: 3.25rem; padding: 0.8rem 2.2rem; font-size: 1rem; }
.btn-primary { background: var(--maroon); color: var(--ivory); }
.btn-primary:hover { background: var(--maroon-deep); color: var(--ivory); }
.btn-outline { background: transparent; color: var(--maroon); border-color: var(--maroon); }
.btn-outline:hover { background: var(--maroon); color: var(--ivory); }
.btn-ghost { background: transparent; color: var(--maroon); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--maroon); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.link-btn {
  background: none; border: 0; padding: 0.25rem 0; cursor: pointer;
  color: var(--maroon); text-decoration: underline; text-underline-offset: 0.2em; font-size: 0.95rem;
}
.link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }

/* Google sign-in button (follows Google branding: white, #747775 border, Roboto-like, G mark). */
.gsi-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  width: 100%; min-height: 2.75rem; padding: 0 0.75rem;
  background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 999px;
  font-family: Roboto, Arial, var(--sans); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.01em;
  cursor: pointer; transition: background-color 0.2s, box-shadow 0.2s;
}
.gsi-btn:hover { background: #f8faff; box-shadow: 0 1px 2px rgb(60 64 67 / 0.3), 0 1px 3px 1px rgb(60 64 67 / 0.15); }
.gsi-btn:disabled { opacity: 0.6; cursor: progress; }
.gsi-logo { width: 18px; height: 18px; flex: none; }

/* ---------- Forms ---------- */
.stack > * + * { margin-top: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label, legend { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
input[type="tel"], input[type="text"], select, textarea {
  width: 100%; min-height: 2.75rem; padding: 0.55rem 0.8rem;
  background: var(--paper); border: 1px solid #b9a588; border-radius: var(--radius-sm);
}
textarea { resize: vertical; min-height: 5rem; }
input:hover, select:hover, textarea:hover { border-color: var(--maroon); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field-hint { margin: 0; color: var(--muted); font-size: 0.85rem; }
.form-error { margin: 0; color: var(--danger); font-weight: 600; font-size: 0.9rem; }
.code-input { font-size: 1.6rem; letter-spacing: 0.5em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Loading ---------- */
.loading {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  font-family: var(--serif); font-size: 1.25rem; color: var(--maroon);
}
.spinner {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  border: 3px solid var(--marigold-soft); border-top-color: var(--marigold);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Gate (splash, phone, code) ---------- */
.gate {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-rows: auto 1fr;
  background: radial-gradient(ellipse at 50% 40%, #fffaf0, #f6ecd8 75%);
}
.gate-art { display: flex; justify-content: center; align-items: flex-end; padding: 0.75rem 0.75rem 0; }
.gate-art img { width: 100%; max-width: 30rem; max-height: 46vh; object-fit: contain; }
.gate--full .gate-art img { max-height: 72vh; max-height: 72dvh; }
.gate-panel {
  width: 100%; max-width: 28rem; margin: 0 auto; padding: 1.25rem var(--gutter) 2rem;
  text-align: center;
}
.gate-panel form { text-align: left; }
.gate-title { font-size: clamp(1.75rem, 6vw, 2.25rem); }
.gate-lede { color: var(--muted); }
.gate-message {
  font-family: var(--serif); font-size: 1.2rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.gate .btn-row { justify-content: center; }
.gate-foot { margin-top: 1.25rem; }
.gate-foot--split { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.gate-panel .gate-lede + .btn { margin-top: 0.25rem; }

@media (min-width: 56rem) {
  .gate { grid-template-rows: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
  .gate-art { align-items: center; padding: 2rem; }
  .gate-art img, .gate--full .gate-art img { max-height: 92vh; max-height: 92dvh; max-width: 40rem; }
  .gate-panel { text-align: left; padding: 2rem; }
  .gate .btn-row { justify-content: flex-start; }
}

/* ---------- Header & nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(251 245 233 / 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(8px);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; min-height: var(--header-h);
  display: flex; align-items: center; gap: 1rem; padding: 0 var(--gutter);
}
.brand {
  font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--maroon);
  text-decoration: none; white-space: nowrap; margin-right: auto;
}
.site-nav { order: 2; }
.header-actions { order: 3; display: flex; align-items: center; gap: 0.5rem; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.nav-list a {
  display: block; padding: 0.5rem 0.7rem; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-size: 0.92rem; letter-spacing: 0.03em;
}
.nav-list a:hover { color: var(--maroon); background: var(--ivory-deep); }
.nav-list a[aria-current="page"] { color: var(--maroon); box-shadow: inset 0 -2px 0 var(--marigold); }
.nav-admin a { color: var(--gold-text); font-weight: 600; }
.btn-rsvp { min-height: 2.5rem; padding: 0.4rem 1.2rem; }
.btn-rsvp[aria-current="page"] { background: var(--maroon-deep); }

.menu-btn {
  display: none; width: 2.75rem; height: 2.75rem; padding: 0; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.menu-icon { display: grid; gap: 5px; width: 1.25rem; }
.menu-icon span { display: block; height: 2px; background: var(--maroon); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.menu-btn[aria-expanded="true"] .menu-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 60rem) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ivory); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; padding: 0.5rem var(--gutter) 1rem; }
  .nav-list a { padding: 0.8rem 0.5rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--marigold); padding-left: 0.9rem; }
  .brand { font-size: 1.3rem; }
}

/* ---------- Page layout ---------- */
.site-main { display: block; min-height: 60vh; }
.page { max-width: var(--max); margin: 0 auto; padding: clamp(1.5rem, 5vw, 3.5rem) var(--gutter) 3rem; }
.page-head { text-align: center; margin-bottom: 2rem; }
.page-title { font-size: clamp(2.25rem, 8vw, 3.5rem); margin-bottom: 0.25rem; }
.page-sub { font-family: var(--serif); font-size: 1.35rem; font-style: italic; color: var(--gold-text); margin-top: 0.5rem; }
.page-intro, .prose--story { max-width: 42rem; margin-left: auto; margin-right: auto; }
.prose { font-size: 1.05rem; }
.prose--story p { font-family: var(--serif); font-size: 1.3rem; line-height: 1.7; }
.prose--story p:first-child::first-letter {
  float: left; font-size: 3.6em; line-height: 0.85; padding: 0.06em 0.1em 0 0; color: var(--maroon);
}
.empty { text-align: center; color: var(--muted); font-style: italic; padding: 2rem 0; }

.ornament { display: block; width: 7.5rem; height: 1rem; margin: 0.5rem auto 0; color: var(--marigold); }
.ornament--lg { width: 10rem; margin: 1rem auto; }

.section { margin: 0 auto; padding: 2.5rem 0 1rem; }
.section + .section { border-top: 1px solid var(--line); }
.section-title { text-align: center; font-size: clamp(1.9rem, 6vw, 2.6rem); margin-bottom: 1.5rem; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.1rem, 4vw, 1.75rem); box-shadow: var(--shadow);
}
.card-title { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--maroon); margin: 0 0 0.5rem; font-weight: 500; }
.card-note { display: block; color: var(--muted); margin: 0.5rem 0 0; }
.card-grid {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

/* ---------- Home ---------- */
.hero { text-align: center; padding: clamp(1rem, 6vw, 4rem) 0 2.5rem; }
.hero-kicker { text-transform: uppercase; letter-spacing: 0.25em; font-size: 0.8rem; color: var(--gold-text); font-weight: 600; }
.hero-names {
  display: flex; flex-direction: column; align-items: center;
  font-size: clamp(3.25rem, 15vw, 6.5rem); font-style: italic; line-height: 1; margin: 0.25rem 0 0;
}
.hero-amp { font-size: 0.35em; color: var(--gold-text); letter-spacing: 0.1em; margin: 0.35em 0; }
.hero-date { font-family: var(--serif); font-size: clamp(1.3rem, 4.5vw, 1.75rem); letter-spacing: 0.08em; color: var(--ink); }
.hero-tag { color: var(--gold-text); font-weight: 600; letter-spacing: 0.05em; }
.hero-intro { max-width: 38rem; margin: 1.5rem auto; }

.venue-card { display: grid; gap: 1.5rem; padding: 0; overflow: hidden; }
.venue-info { padding: clamp(1.1rem, 4vw, 2rem); }
.venue-name { font-size: 1.9rem; }
.venue-address { font-style: normal; color: var(--ink); margin-bottom: 1rem; }
.venue-notes { color: var(--muted); }
.venue-map-wrap { min-height: 18rem; background: var(--ivory-deep); }
.venue-map { display: block; width: 100%; height: 100%; min-height: 18rem; border: 0; }
@media (min-width: 48rem) {
  .venue-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0; }
  .venue-info { align-self: center; }
}

.day { max-width: 44rem; margin: 0 auto 2.5rem; }
.day-title {
  text-align: center; font-size: 1.5rem; color: var(--gold-text); font-style: italic;
  display: flex; align-items: center; gap: 1rem;
}
.day-title::before, .day-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 0.5rem; bottom: 0.5rem; left: 6.5rem; width: 2px; background: var(--marigold-soft);
}
.event { position: relative; display: grid; grid-template-columns: 6rem 1fr; gap: 1.5rem; padding: 0.9rem 0; }
.event::before {
  content: ""; position: absolute; left: calc(6.5rem - 6px); top: 1.35rem;
  width: 14px; height: 14px; border-radius: 50%; background: var(--marigold); border: 3px solid var(--ivory);
  box-shadow: 0 0 0 1px var(--marigold);
}
.event-time { margin: 0; text-align: right; font-weight: 600; font-size: 0.9rem; color: var(--gold-text); padding-top: 0.15rem; font-variant-numeric: tabular-nums; }
.event-body { padding-left: 0.5rem; }
.event-title { font-size: 1.45rem; margin-bottom: 0.15rem; }
.event-loc { margin: 0; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.event-details { margin: 0.25rem 0 0; color: var(--muted); }
@media (max-width: 30rem) {
  .timeline::before { left: 0.45rem; }
  .event { grid-template-columns: 1fr; gap: 0.1rem; padding-left: 2rem; }
  .event::before { left: 0; top: 1.1rem; }
  .event-time { text-align: left; }
  .event-body { padding-left: 0; }
}

/* ---------- Galleries ---------- */
.gallery { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.gallery--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.gallery--feature { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.gallery--strip { grid-template-columns: repeat(auto-fill, minmax(min(46%, 12rem), 1fr)); }
.gallery--masonry { display: block; columns: 2 10rem; column-gap: 0.75rem; }
.gallery--masonry li { break-inside: avoid; margin-bottom: 0.75rem; }
@media (min-width: 48rem) { .gallery--masonry { columns: 3 14rem; } }
.gallery-item {
  display: block; width: 100%; padding: 0; border: 0; background: var(--ivory-deep);
  border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in;
}
.gallery-item img { width: 100%; transition: transform 0.4s ease; }
.gallery--grid .gallery-item img, .gallery--strip .gallery-item img { aspect-ratio: 1; object-fit: cover; }
.gallery--feature .gallery-item img { aspect-ratio: 4 / 5; object-fit: cover; }
.gallery-item:hover img { transform: scale(1.03); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 0; border: 0; background: rgb(20 8 6 / 0.94); color: #fdf6ea;
}
.lightbox::backdrop { background: rgb(20 8 6 / 0.7); }
.lb-figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 0.75rem 1rem; }
.lb-img { max-width: 100%; max-height: calc(100% - 4rem); object-fit: contain; border-radius: 4px; }
.lightbox figcaption { text-align: center; padding-top: 0.75rem; }
.lb-caption { margin: 0; font-family: var(--serif); font-size: 1.2rem; }
.lb-count { margin: 0; font-size: 0.85rem; color: #e2d3bf; }
.lb-btn {
  position: absolute; width: 3rem; height: 3rem; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.35); background: rgb(0 0 0 / 0.35); color: #fff;
  font-size: 1.8rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { background: rgb(0 0 0 / 0.6); }
.lb-btn:focus-visible { outline-color: #ffd36b; }
.lb-close { top: 0.75rem; right: 0.75rem; }
.lb-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }

/* ---------- Dress code ---------- */
.dress-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; }
.dress-list dt { font-weight: 600; color: var(--gold-text); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 0.15rem; }
.dress-list dd { margin: 0; }
.dress-card { border-top: 4px solid var(--marigold); }

/* ---------- Q&A ---------- */
.accordion { max-width: 46rem; margin: 0 auto; }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-family: var(--serif); font-size: 1.35rem; color: var(--maroon);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 1.5rem; color: var(--gold-text); transition: transform 0.2s;
}
.qa[open] summary::after { content: "−"; }
.qa-answer { padding: 0 0 1.25rem; color: var(--ink); }

/* ---------- Registry ---------- */
.link-card {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.link-card:hover { transform: translateY(-2px); border-color: var(--marigold); color: var(--ink); }
.link-host { margin-top: auto; padding-top: 1rem; font-size: 0.85rem; font-weight: 600; color: var(--maroon); }

/* ---------- RSVP ---------- */
.rsvp-deadline { text-align: center; font-weight: 600; color: var(--gold-text); }
.rsvp-body { max-width: 34rem; margin: 1.5rem auto 0; }
.choice { border: 0; margin: 0; padding: 0; }
.choice legend { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; color: var(--maroon); margin-bottom: 0.75rem; }
.choice-row { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.choice-opt {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem;
  border: 1px solid #b9a588; border-radius: var(--radius-sm); background: var(--ivory);
  cursor: pointer; font-weight: 600; font-size: 1rem;
}
.choice-opt:hover { border-color: var(--maroon); }
.choice-opt:has(input:checked) { border-color: var(--maroon); background: #fbeee6; box-shadow: inset 0 0 0 1px var(--maroon); }
.choice-opt input { width: 1.2rem; height: 1.2rem; accent-color: var(--maroon); margin: 0; }
.rsvp-saved { text-align: center; }
.rsvp-note { margin: 1rem 0; padding: 0.75rem 1rem; border-left: 3px solid var(--marigold); background: var(--ivory); text-align: left; font-family: var(--serif); font-size: 1.15rem; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center; padding: 2.5rem var(--gutter) 3rem; border-top: 1px solid var(--line);
  background: var(--ivory-deep);
}
.footer-names { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--maroon); margin-bottom: 0.25rem; }
.footer-tag { color: var(--gold-text); font-weight: 600; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .page { animation: fade-up 0.45s ease both; }
  .gate-art img { animation: fade-in 0.8s ease both; }
}
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .spinner { animation: none; border-top-color: var(--marigold); }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .skip-link { display: none; }
}
