/* =========================================================================
   Rohit & Nathalia — Wedding Website
   Self-hosted clone of the Zola site. Edit colours/fonts in :root below.
   ========================================================================= */

:root {
  --cream:    #fbf7f1;  /* page background                      */
  --cream-2:  #efe7dd;  /* RSVP card / soft panels              */
  --bronze:   #6e5a3b;  /* script headings & accents            */
  --gold:     #a3813f;  /* buttons, dividers, links             */
  --gold-dk:  #876a30;  /* button hover                         */
  --text:     #4c4234;  /* body copy                            */
  --muted:    #7c7160;  /* secondary copy                       */
  --line:     #ded3bd;  /* hairline rules                       */

  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --serif:  "EB Garamond", Georgia, "Times New Roman", serif;

  --maxw: 1040px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 400; margin: 0; }

/* ---------- shared helpers ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 70px 0; text-align: center; }
.section--tight { padding: 48px 0; }
.center { text-align: center; }

.script   { font-family: var(--script); color: var(--bronze); line-height: 1.1; }
.script-xl { font-family: var(--script); color: var(--bronze); line-height: 1.05;
             font-size: clamp(2.8rem, 8vw, 5rem); }
.script-lg { font-family: var(--script); color: var(--bronze); line-height: 1.1;
             font-size: clamp(2.2rem, 6vw, 3.6rem); }
.script-md { font-family: var(--script); color: var(--bronze); line-height: 1.1;
             font-size: clamp(1.9rem, 5vw, 2.8rem); }

.eyebrow { font-size: 1.05rem; letter-spacing: .03em; color: var(--muted); margin: 0 0 .2em; }
.lede { max-width: 760px; margin: 0 auto; }
.muted { color: var(--muted); }

/* decorative sprig divider (gold leaf) */
.sprig { width: 150px; margin: 8px auto 20px; opacity: .92; }
.sprig--sm { width: 110px; margin: 4px auto 14px; }

/* button */
.btn {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
  background: var(--gold);
  padding: 14px 54px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background .2s ease;
  text-align: center;
}
.btn:hover { background: var(--gold-dk); text-decoration: none; color: #fff; }

/* =========================================================================
   Header / navigation
   ========================================================================= */
.site-header {
  background: var(--cream);
  padding: 34px 16px 14px;
  text-align: center;
  position: relative;
}
.site-header .brand {
  font-family: var(--script);
  color: var(--bronze);
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1;
  margin: 0 0 14px;
  display: inline-block;
}
.site-header .brand:hover { text-decoration: none; }

.main-nav { position: relative; }
.nav-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 30px;
}
.nav-links a {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--text);
  padding: 4px 2px;
  border-bottom: 1.5px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-links a:hover { color: var(--bronze); text-decoration: none; }
.nav-links a[aria-current="page"] {
  color: var(--bronze);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  position: absolute;
  top: -46px; right: 6px;
  background: none; border: none;
  font-size: 1.7rem; color: var(--bronze);
  cursor: pointer; line-height: 1;
}

/* =========================================================================
   Hero carousel (home)
   ========================================================================= */
.hero {
  position: relative;
  width: 100%;
  height: min(80vh, 720px);
  overflow: hidden;
  background: var(--cream);
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  background-size: cover;          /* blurred fill, taken from the slide's own photo */
  background-position: center;
}
.hero-slide::before {              /* soft blur so the full photo never has to be cropped */
  content: ""; position: absolute; inset: 0;
  backdrop-filter: blur(26px) brightness(.9);
  -webkit-backdrop-filter: blur(26px) brightness(.9);
}
.hero-slide img {                  /* the whole photo, never cut off */
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
}
.hero-slide.is-active { opacity: 1; }

/* =========================================================================
   Home — names wreath, date, countdown, story
   ========================================================================= */
.wreath {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 120px;
}
.wreath::before, .wreath::after {
  content: "";
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 150px; height: 310px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .9;
}
.wreath::before { left: 0;  background-image: url("../images/wreath-left.png"); }
.wreath::after  { right: 0; background-image: url("../images/wreath-right.png"); }
.wreath .and { font-family: var(--serif); font-style: italic; color: var(--muted);
               font-size: 1.3rem; margin: 6px 0; }

.countdown {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 8px 26px;
  font-size: 1.25rem; color: var(--bronze);
  margin: 10px 0 30px;
}
.countdown span b { font-weight: 600; }

.place { font-size: 1.2rem; color: var(--text); margin: 6px 0 24px; }

.story p { max-width: 760px; margin: 0 auto 1.1em; }
.story .subhead { font-size: 1.35rem; color: var(--bronze); margin-bottom: 1.4em; }

.full-photo { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.full-photo img { width: 100%; height: auto; display: block; border-radius: 6px; }

/* =========================================================================
   Schedule
   ========================================================================= */
.hearts { width: 54px; margin: 6px auto 30px; opacity: .8; }
.events { max-width: 720px; margin: 0 auto; }
.event {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}
.event:first-child { border-top: none; }
.event h3 { font-family: var(--serif); font-weight: 600; font-size: 1.7rem;
            color: var(--bronze); margin-bottom: .1em; }
.event .time { font-size: 1.2rem; color: var(--text); margin-bottom: 1em; }
.event .venue { font-size: 1.2rem; margin-bottom: .1em; }
.event .addr a { color: var(--gold); border-bottom: 1px solid var(--line); }
.event .note { color: var(--muted); max-width: 620px; margin: 1em auto; }
.event .desc { max-width: 620px; margin: 1em auto; }
.event-links { display: flex; justify-content: center; gap: 28px; margin-top: 10px; }
.event-links a { font-weight: 600; }

/* =========================================================================
   Travel / Things-to-do item lists
   ========================================================================= */
.items { max-width: 820px; margin: 0 auto; }
.item { padding: 40px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: none; }
.item .cat { font-family: var(--serif); color: var(--muted);
             font-size: 1.1rem; margin-bottom: .2em; }
.item .icon { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--gold); }
.item .icon svg { width: 100%; height: 100%; }
.item .addr { font-style: italic; color: var(--muted); margin: .3em 0 .9em; }
.item .body { max-width: 680px; margin: 0 auto; white-space: pre-line; }
.item .view { display: inline-block; margin-top: 14px; font-weight: 600; }

/* =========================================================================
   Wedding party
   ========================================================================= */
.party {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px 0;
}
.party .member { padding: 22px 30px; position: relative; }
.party .member:nth-child(odd)::after {
  content: ""; position: absolute; right: 0; top: 18%; bottom: 18%;
  width: 1px; background: var(--line);
}
.party .member .name { font-size: clamp(2rem, 4.4vw, 2.9rem); margin-bottom: .1em; }
.party .member .role { font-family: var(--serif); color: var(--text); font-size: 1.2rem; }

/* =========================================================================
   Gallery (masonry + lightbox)
   ========================================================================= */
.gallery {
  max-width: 1000px; margin: 0 auto;
  columns: 3; column-gap: 16px;
}
.gallery img {
  width: 100%; margin: 0 0 16px;
  border-radius: 10px;
  cursor: zoom-in;
  break-inside: avoid;
  transition: transform .25s ease, box-shadow .25s ease;
}
.gallery img:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(80,60,30,.22); }

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(30,24,16,.92);
  display: none;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 86vh; border-radius: 6px; }
.lightbox button {
  position: absolute; background: none; border: none; color: #f3ead9;
  font-size: 2.6rem; cursor: pointer; padding: 10px 18px; line-height: 1;
}
.lb-close { top: 10px; right: 14px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* =========================================================================
   Map (things to do)
   ========================================================================= */
.map-wrap { max-width: 900px; margin: 0 auto 10px; }
.map-wrap iframe {
  width: 100%; height: 380px; border: 0; border-radius: 8px;
  filter: saturate(.85);
}

/* =========================================================================
   RSVP
   ========================================================================= */
.rsvp-card {
  max-width: 680px; margin: 0 auto;
  background: var(--cream-2);
  border-radius: 14px;
  padding: 48px 46px;
  text-align: center;
}
.rsvp-card .intro { color: var(--text); margin-bottom: 26px; }
.form-row { text-align: left; margin: 0 0 20px; }
.form-row label { display: block; font-size: 1.05rem; color: var(--bronze); margin-bottom: 6px; }
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=number],
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: var(--serif); font-size: 1.1rem; color: var(--text);
  padding: 12px 14px;
  border: 1px solid #cdbfa6; border-radius: 4px;
  background: #fff;
}
.form-row textarea { min-height: 90px; resize: vertical; }
.form-row .hint { font-size: .9rem; color: var(--muted); margin-top: 5px; }
.choice { display: flex; gap: 22px; flex-wrap: wrap; }
.choice label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 1.1rem; }
.rsvp-card .btn { margin-top: 8px; width: 100%; }
.form-status { margin-top: 18px; font-size: 1.1rem; min-height: 1.2em; }
.form-status.ok { color: #4a7a3f; }
.form-status.err { color: #a8482f; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  text-align: center;
  padding: 56px 20px 44px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.site-footer .sprig { margin-bottom: 20px; }
.site-footer .tag { font-family: var(--script); color: var(--bronze); font-size: 2rem; }
.site-footer .names { color: var(--muted); margin-top: 6px; font-size: 1.05rem; letter-spacing: .04em; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 860px) {
  .gallery { columns: 2; }
  .wreath { padding: 30px 90px; }
  .wreath::before, .wreath::after { width: 100px; height: 230px; }
}
@media (max-width: 680px) {
  body { font-size: 18px; }
  .section { padding: 52px 0; }
  .hero { height: 58vh; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 0 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 9px 2px; font-size: 1.25rem; }
  .nav-toggle { display: block; }
  .main-nav { padding-top: 2px; }
  .party { grid-template-columns: 1fr; gap: 26px; }
  .party .member:nth-child(odd)::after { display: none; }
  .party .member { border-bottom: 1px solid var(--line); padding-bottom: 26px; }
  .party .member:last-child { border-bottom: none; }
  .wreath { padding: 20px 10px; }
  .wreath::before, .wreath::after { opacity: .5; width: 70px; height: 170px; }
  .gallery { columns: 1; }
  .event-links { flex-direction: column; gap: 12px; }
}

/* =========================================================================
   RSVP — name lookup, disambiguation, per-event blocks
   ========================================================================= */
.rsvp-choose { max-width: 680px; margin: 0 auto 10px; text-align: center; }
.rsvp-choose-title { color: var(--bronze); margin: 0 0 14px; }
.rsvp-choice {
  display: block; width: 100%;
  text-align: left; cursor: pointer;
  background: #fff; border: 1px solid #cdbfa6; border-radius: 6px;
  padding: 12px 16px; margin: 0 0 10px;
  font-family: var(--serif); font-size: 1.1rem; color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.rsvp-choice:hover { border-color: var(--gold); background: #fffdf8; }
.rsvp-choice span { display: block; color: var(--bronze); font-size: 1.2rem; }
.rsvp-choice small { color: var(--muted); }

.rsvp-party {
  text-align: center; color: var(--muted); font-style: italic;
  margin: -6px 0 22px; font-size: 1rem;
}
#rsvp-events {
  text-align: left; margin: 0 0 26px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: 4px 20px;
}
.rsvp-event { padding: 16px 0; border-top: 1px solid var(--line); }
.rsvp-event:first-child { border-top: none; }
.rsvp-event-head { margin-bottom: 8px; }
.rsvp-event-name { display: block; font-size: 1.3rem; color: var(--bronze); font-weight: 600; }
.rsvp-event-meta { display: block; font-size: .92rem; color: var(--muted); }
.rsvp-back {
  display: block; margin: 16px auto 0;
  background: none; border: none; cursor: pointer;
  font-family: var(--serif); font-size: 1rem; color: var(--gold);
}
.rsvp-back:hover { text-decoration: underline; }

/* =========================================================================
   Admin dashboard
   ========================================================================= */
.admin-title { font-family: var(--serif); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-size: .95rem; }
.admin-login { max-width: 420px; margin: 0 auto 30px; text-align: center; }
.admin-out { max-width: 1200px; margin: 0 auto; }
.btn-sm { font-size: .95rem; padding: 9px 22px; }

.admin-summary {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  margin: 0 0 24px;
}
.admin-summary .stat {
  background: var(--cream-2); border-radius: 10px; padding: 14px 20px;
  min-width: 110px; text-align: center;
}
.admin-summary .stat b { display: block; font-size: 1.6rem; color: var(--bronze); }
.admin-summary .stat span { font-size: .85rem; color: var(--muted); }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.admin-table { border-collapse: collapse; width: 100%; font-size: .92rem; background: #fff; }
.admin-table th, .admin-table td {
  border-bottom: 1px solid var(--line); padding: 8px 10px;
  text-align: left; vertical-align: top; white-space: nowrap;
}
.admin-table th { background: var(--cream-2); color: var(--bronze); position: sticky; top: 0; }
.admin-table td:nth-child(n+8) { white-space: normal; max-width: 220px; }
.admin-table tr.r-no { color: var(--muted); }
.admin-table .cell-attending { color: #3f7a3f; font-weight: 700; text-align: center; }
.admin-table .cell-declined  { color: #a8482f; font-weight: 700; text-align: center; }
.admin-table .cell- { text-align: center; color: var(--muted); }

/* =========================================================================
   RSVP wizard (one event per screen)
   ========================================================================= */
.rsvp-progress { text-align: center; color: var(--muted); font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.rsvp-step-title { text-align: center; margin-bottom: 10px; }
#rsvp-event { text-align: center; }
.rsvp-event-name { text-align: center; margin: 2px 0 10px; font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 400; color: var(--bronze); }
.rsvp-event-when  { font-size: 1.15rem; color: var(--text); margin-bottom: 4px; }
.rsvp-event-venue { font-size: 1.15rem; color: var(--bronze); }
.rsvp-event-addr  { font-style: italic; color: var(--muted); margin-bottom: 16px; }
.rsvp-event-dress { max-width: 600px; margin: 0 auto 10px; color: var(--text); }
.rsvp-event-desc  { max-width: 600px; margin: 0 auto 24px; color: var(--muted); }

.rsvp-attend { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.attend-opt {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #cdbfa6; border-radius: 6px; background: #fff;
  padding: 14px 28px; cursor: pointer; font-size: 1.15rem; color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.attend-opt:hover { border-color: var(--gold); }
.attend-opt:has(input:checked) { border-color: var(--gold); background: #fffdf6; color: var(--bronze); }
.rsvp-err { color: #a8482f; min-height: 1.1em; margin: 10px 0 0; font-size: .95rem; }

.rsvp-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.rsvp-nav .btn { min-width: 170px; }
.rsvp-back-btn { background: none; border: none; cursor: pointer; font-family: var(--serif); font-size: 1.05rem; color: var(--gold); padding: 8px 2px; }
.rsvp-back-btn:hover { text-decoration: underline; }

/* confirmation */
#rsvp-done { text-align: center; }
.rsvp-summary { max-width: 460px; margin: 22px auto 0; text-align: left; }
.rsvp-summary-title { text-align: center; color: var(--bronze); font-weight: 600; font-size: 1.1rem; margin: 0 0 12px; }
.rsvp-summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.rsvp-summary-row:first-of-type { border-top: none; }
.rsvp-summary-row b.yes { color: #3f7a3f; }
.rsvp-summary-row b.no  { color: var(--muted); font-weight: 500; }

@media (max-width: 680px) {
  .rsvp-nav { flex-direction: column-reverse; gap: 12px; }
  .rsvp-nav .btn { width: 100%; }
  .attend-opt { width: 100%; justify-content: center; }
}

/* per-event party size + meal (shown when attending) */
.rsvp-when-attending { max-width: 460px; margin: 18px auto 2px; text-align: left; }
.rsvp-when-attending .form-row { margin-bottom: 16px; }
.rsvp-when-attending label { color: var(--bronze); }
.rsvp-meal { justify-content: flex-start; gap: 22px; }

/* footer scripture verse */
.site-footer .tag { max-width: 620px; margin: 0 auto; line-height: 1.25; }
.site-footer .verse-ref { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.05rem; margin-top: 6px; letter-spacing: .03em; }
