/* ============================================================
   Chiara & Luke: wedding site
   Palette (from couple): #c1e9ff light blue · #fdfdc2 pale yellow · #ffffff white
   Extended with deeper, legible tints of the same hues.
   ============================================================ */

:root {
  /* Base palette */
  --white: #ffffff;
  --blue-pale: #c1e9ff;
  --yellow-pale: #fdfdc2;

  /* Extended, legible tints */
  --cream: #fffdf4;          /* soft page background */
  --blue-mist: #eaf6ff;      /* very light blue wash */
  --yellow-mist: #fefee9;    /* very light yellow wash */
  --blue: #2f6f9e;           /* mid blue: links, buttons */
  --blue-deep: #1c4a70;      /* deep blue: accents */
  --ink: #143049;            /* primary text (deep navy) */
  --ink-soft: #40566b;       /* secondary text */
  --gold: #b8912a;           /* text-safe gold accent */
  --gold-soft: #d9b64a;      /* decorative gold */
  --line: #e7e2d0;           /* hairline borders */

  --shadow-sm: 0 2px 10px rgba(20, 48, 73, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 48, 73, 0.10);
  --shadow-lg: 0 20px 50px rgba(20, 48, 73, 0.14);

  --radius: 16px;
  --radius-lg: 26px;
  --maxw: 1120px;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* JS shows/hides sections with the hidden attribute */

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--blue-deep); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 .4em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); }

p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 1.1em;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { padding: clamp(56px, 9vw, 110px) 0; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(36px, 5vw, 60px); }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

.tint-blue { background: var(--blue-mist); }
.tint-yellow { background: var(--yellow-mist); }
.tint-white { background: var(--white); }

/* Decorative divider */
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto 1.2em; color: var(--gold-soft); }
.divider::before, .divider::after { content: ""; height: 1px; width: 54px; background: linear-gradient(to right, transparent, var(--gold-soft)); }
.divider::after { background: linear-gradient(to left, transparent, var(--gold-soft)); }
.divider span { font-size: 1.1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 15px 30px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--blue-deep); transition: all .2s ease; white-space: nowrap;
}
.btn-primary { background: var(--blue-deep); color: #fff; }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--blue-deep); }
.btn-ghost:hover { background: var(--blue-deep); color: #fff; transform: translateY(-2px); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
}
.brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--ink); letter-spacing: .04em; }
.brand span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: .82rem; letter-spacing: .04em; color: var(--ink-soft); font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: all .18s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--blue-mist); }
.nav-links a.active { color: var(--blue-deep); font-weight: 700; }
.nav-links .btn { padding: 10px 20px; font-size: .72rem; margin-left: 6px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; border-radius: 2px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
    background: rgba(255,255,255,.98); backdrop-filter: blur(12px);
    padding: 12px 20px 24px; gap: 2px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .22s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 10px; border-radius: 10px; font-size: .95rem; }
  .nav-links .btn { margin: 8px 0 0; justify-content: center; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; padding: 0; display: flex;
  min-height: calc(100vh - 68px); min-height: calc(100svh - 68px); /* fill the screen below the header */
  align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden;
}
/* Size/position are set in main.js (positionHero) to keep our faces centred above the countdown;
   the values here are the no-JS fallback. */
.hero-bg { position: absolute; inset: 0; background: 43% 52%/cover no-repeat; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,48,73,.32) 0%, rgba(20,48,73,.10) 32%, rgba(20,48,73,.10) 60%, rgba(20,48,73,.50) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 40px 24px; max-width: 900px; }
.hero .eyebrow { color: #fff; opacity: .92; }
.hero-welcome { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 3vw, 1.45rem); color: var(--yellow-pale); margin: 0 0 .6em; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.hero h1 { color: #fff; font-size: clamp(3rem, 11vw, 7rem); font-weight: 500; text-shadow: 0 2px 24px rgba(0,0,0,.28); margin-bottom: .1em; }
.hero .amp { font-style: italic; color: var(--yellow-pale); font-weight: 400; }
.hero-meta { font-family: var(--serif); font-size: clamp(1.2rem, 3vw, 1.7rem); letter-spacing: .04em; margin-top: .3em; text-shadow: 0 2px 14px rgba(0,0,0,.3); }
.hero-meta .dot { margin: 0 .5em; color: var(--yellow-pale); }
.hero-meta .nw { white-space: nowrap; }
@media (max-width: 600px) {
  .hero-meta .dot { display: none; }
  .hero-meta .nw { display: block; }
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-actions .btn-primary { background: rgba(255,255,255,.96); color: var(--ink); border-color: transparent; }
.hero-actions .btn-primary:hover { background: #fff; color: var(--ink); }
.hero-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,.8); }
.hero-actions .btn-ghost:hover { background: #fff; color: var(--ink); border-color:#fff; }
.hero-scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; opacity: .8; font-size: 1.4rem; animation: bob 2s infinite; }
/* Short landscape screens (e.g. 1366x768 laptops): tighten the hero so our faces fit above the countdown */
@media (max-height: 760px) and (min-width: 700px) {
  .hero-inner { padding: 20px 24px; }
  .hero .eyebrow { margin-bottom: .6em; }
  .hero h1 { font-size: clamp(3rem, 12.5vh, 7rem); }
  .hero-meta { font-size: clamp(1.1rem, 3.2vh, 1.7rem); }
  .count-box { padding: 9px 8px; }
  .count-box .num { font-size: 1.8rem; }
  .hero-actions { margin-top: 20px; }
  .hero-actions .btn { padding: 12px 26px; }
}
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* ---------- Countdown ---------- */
.countdown { display: flex; gap: 10px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.count-box {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  border-radius: 14px; padding: 12px 8px; min-width: 82px; backdrop-filter: blur(4px);
}
.count-box .num { font-family: var(--serif); font-size: 2.1rem; line-height: 1; display: block; }
.count-box .lbl { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; opacity: .85; margin-top: 6px; display: block; }
@media (max-width: 520px) {
  .countdown { flex-wrap: nowrap; gap: 8px; }
  .count-box { min-width: 0; flex: 0 1 74px; padding: 10px 4px; }
  .count-box .num { font-size: 1.65rem; }
  .count-box .lbl { letter-spacing: .12em; }
}

/* ============================================================
   Cards / grids
   ============================================================ */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 30px; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .icon { font-size: 1.9rem; margin-bottom: 10px; }
.card h3 { margin-bottom: .3em; }
.card .when { color: var(--gold); font-weight: 600; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6em; }
.card p { color: var(--ink-soft); margin-bottom: .6em; }
.card p:last-child { margin-bottom: 0; }

/* Intro / welcome */
.welcome { text-align: center; max-width: 780px; margin: 0 auto; }
.welcome p { font-size: 1.16rem; color: var(--ink-soft); }
.names-script { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--gold); }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,5vw,64px); align-items: center; }
.split.reverse .split-media { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.reverse .split-media { order: 0; } }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; object-fit: cover; }
.split-body .eyebrow { text-align: left; }

/* ============================================================
   Timeline (schedule)
   ============================================================ */
.timeline { max-width: 760px; margin: 0 auto; position: relative; }
.timeline::before { content: ""; position: absolute; left: 22px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--blue-pale), var(--gold-soft)); }
.tl-item { position: relative; padding: 0 0 34px 66px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: 13px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); box-shadow: 0 0 0 4px var(--blue-mist); }
.tl-time { font-family: var(--serif); font-size: 1.3rem; color: var(--blue-deep); font-weight: 600; }
.tl-title { font-weight: 600; margin: 2px 0 4px; }
.tl-desc { color: var(--ink-soft); font-size: .96rem; }

/* Venue cards */
.venue { display: grid; grid-template-columns: 1fr; gap: 8px; align-content: start; }
.venue .addr { color: var(--ink-soft); font-size: .96rem; }

/* ============================================================
   Gallery
   ============================================================ */
.gallery-grid { columns: 3; column-gap: 16px; }
@media (max-width: 860px) { .gallery-grid { columns: 2; } }
@media (max-width: 520px) { .gallery-grid { columns: 1; } }
.gallery-grid figure { margin: 0 0 16px; break-inside: avoid; }
.gallery-grid img {
  width: 100%; border-radius: 14px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.gallery-grid img:hover { transform: scale(1.015); box-shadow: var(--shadow-md); }

/* Photo strip (home) */
.strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.strip img { aspect-ratio: 1/1; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow-sm); }
@media (max-width: 700px){ .strip { grid-template-columns: repeat(2,1fr);} }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(15,30,45,.92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 30px; }
.lightbox.open { display: flex; }
.lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 84vh; border-radius: 10px; box-shadow: var(--shadow-lg); background: #000; }
.lightbox figcaption { color: #dfe8f0; font-size: .85rem; }
.lightbox figcaption a { color: var(--yellow-pale); margin-left: 10px; }
.lightbox.single .lb-nav { display: none; }
.lightbox .lb-close { position: absolute; top: 20px; right: 26px; font-size: 2rem; color: #fff; background: none; border: 0; cursor: pointer; line-height: 1; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.4rem; color: #fff; background: none; border: 0; cursor: pointer; padding: 10px 18px; opacity: .8; }
.lightbox .lb-nav:hover { opacity: 1; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }

/* ============================================================
   Forms (RSVP)
   ============================================================ */
.form-card { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px,4vw,48px); box-shadow: var(--shadow-md); }
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 8px; color: var(--ink); }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: .82rem; }
.field input[type=text], .field input[type=email], .field textarea, .field select {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: var(--sans); font-size: 1rem; color: var(--ink); background: var(--cream); transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); background: #fff; }
.field textarea { min-height: 90px; resize: vertical; }
.radio-row { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-pill { flex: 1; min-width: 130px; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill label {
  display: block; text-align: center; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px;
  cursor: pointer; font-weight: 600; margin: 0; background: var(--cream); transition: all .18s;
}
.radio-pill input:checked + label { border-color: var(--blue); background: var(--blue-mist); color: var(--blue-deep); }

/* Notice / callout */
.notice { background: var(--yellow-mist); border: 1px solid var(--gold-soft); border-radius: var(--radius); padding: 18px 22px; color: var(--ink-soft); font-size: .95rem; display: flex; gap: 12px; }
.notice .ic { color: var(--gold); font-size: 1.2rem; }
.placeholder-tag { display:inline-block; background: var(--yellow-pale); color: var(--gold); border:1px dashed var(--gold-soft); border-radius: 999px; padding: 3px 12px; font-size:.7rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; margin-bottom: 14px;}

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 22px 44px 22px 4px; font-family: var(--serif); font-size: 1.3rem; color: var(--ink); cursor: pointer; position: relative; }
.faq-q::after { content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--gold); transition: transform .2s; }
.faq-item.open .faq-q::after { transform: translateY(-50%) rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; color: var(--ink-soft); }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 4px 22px; margin: 0; }

/* Page hero (interior pages) */
.page-hero { text-align: center; padding: clamp(56px,8vw,96px) 0 clamp(30px,4vw,48px); background: linear-gradient(180deg, var(--blue-mist), var(--cream)); }
.page-hero .eyebrow { color: var(--gold); }
.page-hero p { max-width: 660px; margin: 0 auto; color: var(--ink-soft); font-size: 1.08rem; }

/* Info list */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.info-list li:last-child { border-bottom: 0; }
.info-list .k { font-weight: 600; min-width: 130px; color: var(--ink); }
.info-list .v { color: var(--ink-soft); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink); color: #cdd9e4; padding: 60px 0 30px; text-align: center; }
.site-footer .brand { color: #fff; font-size: 2rem; display: block; margin-bottom: 8px; }
.site-footer .brand span { color: var(--gold-soft); }
.site-footer .f-meta { color: #9fb2c2; font-size: .95rem; margin-bottom: 22px; }
.site-footer a { color: var(--blue-pale); }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; list-style: none; padding: 0; }
.footer-links a { color: #cdd9e4; font-size: .85rem; letter-spacing: .04em; }
.footer-links a:hover { color: #fff; }
.f-contact { font-size: .9rem; margin-bottom: 20px; }
.f-copy { font-size: .78rem; color: #7d92a3; border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; }

/* Password gate */
.gate { position: fixed; inset: 0; background: var(--cream); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate-card { max-width: 420px; text-align: center; background:#fff; border:1px solid var(--line); border-radius: var(--radius-lg); padding: 46px 36px; box-shadow: var(--shadow-lg); }
.gate-card .brand { font-family: var(--serif); font-size: 2.2rem; color: var(--ink); margin-bottom: 6px; }
.gate-card .brand span { color: var(--gold); }
.gate-card input { width:100%; text-align:center; padding: 13px; border:1.5px solid var(--line); border-radius: 12px; font-size:1rem; margin: 18px 0 14px; }
.gate-err { color:#b23b3b; font-size:.85rem; min-height: 1.2em; }

.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-up.in { opacity: 1; transform: none; }

.center { text-align: center; }
.mt-lg { margin-top: 40px; }

/* ============================================================
   Admin (RSVP dashboard)
   ============================================================ */
.admin-tag { font-family: var(--sans); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin-left: 8px; vertical-align: middle; }
.admin-actions { display: flex; align-items: center; gap: 20px; font-size: .88rem; }
.admin-actions form { margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }
.linklike:hover { color: var(--blue-deep); text-decoration: underline; }
.linklike.danger { color: #b23b3b; font-size: .82rem; }
.admin { padding-top: 44px; padding-bottom: 80px; }
.admin section { padding: 0; } /* tab panels, not page sections */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.admin-head h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin: 0; }
.admin-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-tools .btn { padding: 11px 20px; font-size: .72rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 700px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat .num { display: block; font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--blue-deep); }
.stat .lbl { display: block; margin-top: 6px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.admin-note { color: var(--ink-soft); font-size: .85rem; margin: 16px 0 26px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.rsvp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rsvp-table th { text-align: left; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--cream); white-space: nowrap; }
.rsvp-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rsvp-table tr:last-child td { border-bottom: 0; }
.rsvp-table .empty { text-align: center; color: var(--ink-soft); padding: 40px 16px; }
.rsvp-table .nowrap { white-space: nowrap; color: var(--ink-soft); }
.rsvp-table .sub { font-size: .75rem; color: var(--ink-soft); }
.rsvp-table tr.superseded td { opacity: .5; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pill.yes { background: var(--blue-mist); color: var(--blue-deep); }
.pill.no { background: #f6eeee; color: #8a3a3a; }

/* RSVP form extras */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: #b23b3b; font-size: .9rem; min-height: 1.2em; margin: 0 0 12px; }

/* ============================================================
   Photo & video uploads
   ============================================================ */
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 34px 20px; margin: 4px 0 18px;
  background: var(--cream); color: var(--ink-soft); transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.over { border-color: var(--blue); background: var(--blue-mist); }
.dropzone .dz-icon { font-size: 2rem; }
.dropzone strong { color: var(--ink); }
.dropzone .dz-hint { font-size: .82rem; }
.up-admin-note { background: var(--blue-mist); color: var(--blue-deep); border-radius: 12px; padding: 12px 16px; font-size: .88rem; margin: 0 0 20px; }
.up-list { list-style: none; margin: 0 0 14px; padding: 0; }
.up-list li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
.up-row { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; }
.up-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-size { color: var(--ink-soft); white-space: nowrap; }
.up-bar { height: 5px; border-radius: 99px; background: var(--blue-mist); margin: 8px 0 6px; overflow: hidden; }
.up-bar span { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 99px; transition: width .2s; }
.up-status { font-size: .78rem; color: var(--ink-soft); }
.up-list li.done .up-bar span { background: #3f8f5c; }
.up-list li.done .up-status { color: #2f7a4b; }
.up-list li.bad { border-color: #e6c3c3; background: #fdf6f6; }
.up-list li.bad .up-status { color: #b23b3b; }

/* Video tiles get a play badge; videos without a thumbnail get a placeholder */
.is-video { position: relative; }
.is-video::after {
  content: "\25B6"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; background: rgba(20,48,73,.65); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1rem; padding-left: 3px; pointer-events: none;
}
.vid-ph { aspect-ratio: 4/3; border-radius: 14px; background: linear-gradient(135deg, var(--blue-deep), var(--ink)); }
.gallery-grid .g-item { cursor: pointer; }

/* Admin: tabs + review queue */
.admin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.admin-tabs a { padding: 12px 16px; color: var(--ink-soft); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tabs a.active { color: var(--blue-deep); border-bottom-color: var(--blue-deep); }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--gold); color: #fff; font-size: .72rem; text-align: center; margin-left: 4px; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; padding: 9px 16px; border-radius: 999px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.seg button.active { background: var(--blue-deep); color: #fff; }
.seg button span { opacity: .75; margin-left: 4px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.review-grid .empty { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); padding: 40px 0; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.review-media { display: block; aspect-ratio: 1/1; background: var(--blue-mist); }
.review-media img, .review-media .vid-ph { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.review-meta { padding: 12px 14px 6px; font-size: .85rem; }
.review-meta strong { display: block; }
.review-meta span { color: var(--ink-soft); font-size: .76rem; }
.review-actions { display: flex; gap: 8px; padding: 8px 14px 14px; margin-top: auto; align-items: center; flex-wrap: wrap; }
.review-actions .btn { padding: 9px 14px; font-size: .68rem; flex: 1; justify-content: center; }
.review-actions .linklike { font-size: .82rem; }
.btn-danger { color: #b23b3b; border-color: #e3bcbc; }
.btn-danger:hover { background: #b23b3b; border-color: #b23b3b; color: #fff; }

/* Where to stay */
.stay-card { display: flex; flex-direction: column; }
.stay-card .price { font-weight: 600; color: var(--ink); font-size: .92rem; }
.stay-card a { margin-top: auto; padding-top: 6px; }

/* Numbered / bulleted steps inside cards */
.steps { margin: 0 0 1em; padding-left: 1.2em; color: var(--ink-soft); }
.steps li { margin-bottom: .55em; padding-left: .2em; }

/* Admin: invitations */
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 22px 0; box-shadow: var(--shadow-sm); }
.admin-panel h3 { margin-bottom: .6em; }
.admin-panel textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-family: var(--sans); font-size: .95rem; background: var(--cream); }
.inv-table { margin-top: 22px; }
.inv-table .ps-cell { max-width: 280px; color: var(--ink-soft); font-size: .85rem; }
.inv-table td:nth-child(4) { white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.row-actions .linklike { font-size: .82rem; }
.btn-xs { padding: 7px 12px; font-size: .64rem; }
.muted { color: var(--ink-soft); opacity: .75; font-size: .85rem; }
.waiting { background: var(--yellow-mist); border: 1px solid var(--gold-soft); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 22px; font-size: .9rem; }
.waiting strong { display: block; margin-bottom: 8px; }
.chip { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; margin: 0 6px 6px 0; font-size: .82rem; }

/* Homepage weekend cards with a photo fading into the card behind the text */
.photo-card { position: relative; overflow: hidden; padding-top: 215px; }
.photo-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 250px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0, rgba(255,255,255,.08) 40%, rgba(255,255,255,.94) 84%, #fff 100%),
    var(--bg) center 30% / cover no-repeat;
}
.photo-card > * { position: relative; } /* text sits above the photo */
/* The photo URL comes from the card's --bg; it must be a root path (/assets/...) because
   url() inside a custom property resolves relative to this stylesheet, not the page. */
.card-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }

/* Our Story: printed-snapshot style photos */
.story .split + .split { margin-top: clamp(48px, 7vw, 88px); }
.story-text p { font-family: var(--serif); font-size: clamp(1.15rem, 2.4vw, 1.35rem); line-height: 1.65; color: var(--ink); }
.story-text .eyebrow { font-family: var(--sans); font-size: .72rem; color: var(--gold); }
.story-sign { font-family: var(--serif) !important; font-style: italic; font-size: 1.8rem !important; color: var(--gold) !important; margin-top: .4em; }
.snapshot { margin: 0 auto; max-width: 340px; background: #fff; padding: 12px 12px 14px; box-shadow: var(--shadow-md); border-radius: 4px; }
.snapshot img { width: 100%; border-radius: 2px; box-shadow: none; }
.snapshot figcaption { font-family: var(--serif); font-style: italic; text-align: center; color: var(--ink-soft); margin-top: 10px; font-size: 1.05rem; }
.split-media .snapshot img { border-radius: 2px; box-shadow: none; }
.tilt-left { transform: rotate(-2.5deg); }
.tilt-right { transform: rotate(2deg); }
.proposal-shot { max-width: 760px; margin-top: 26px; }
.snapshot video { display: block; width: 100%; border-radius: 2px; background: #000; }
.story-text .perspective { font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin-bottom: .35em; }
.story-solo { max-width: 720px; margin: 0 auto; } /* Luke's Perspective: one column of text, no photo */

/* RSVP: several song suggestions */
.song-list { display: flex; flex-direction: column; gap: 8px; }
.add-song { margin-top: 10px; font-size: .88rem; font-weight: 600; }

/* Toastmaster photos */
.person-photo { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 14px; border: 4px solid #fff; box-shadow: var(--shadow-md); }

/* Homepage: the proposal painting, nearly full-screen, with text sitting on its yellow mat.
   Positions are fractions of the cropped photo: the top border is 13% of its height,
   the bottom 14.8%, the sides 10.4% of its width. */
.painting-section { padding: clamp(40px, 6vw, 80px) 0; }
.painting {
  position: relative; container-type: inline-size; margin: 0 auto;
  width: min(94vw, calc((100vh - 120px) * 1.3065));
  box-shadow: 0 24px 60px rgba(20, 48, 73, .22), 0 3px 8px rgba(20, 48, 73, .12);
}
.painting img { display: block; width: 100%; height: auto; }
.painting-top, .painting-bottom {
  position: absolute; left: 10.4%; right: 10.4%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.painting-top { top: 0; height: 13%; gap: .45cqw; }
.painting-bottom { bottom: 0; height: 14.8%; }
.painting-top .eyebrow { margin: 0; color: var(--ink); opacity: .75; font-size: max(11px, 1.05cqw); }
.painting-top h2 { margin: 0; font-size: max(24px, 3.3cqw); line-height: 1.1; }
.painting-top p:not(.eyebrow) { margin: 0; font-family: var(--serif); font-style: italic; font-size: max(15px, 1.6cqw); color: var(--ink); }
.painting-bottom .btn { font-size: max(11px, 1.05cqw); padding: max(10px, 1.1cqw) max(22px, 2.8cqw); }
/* Phones: the mat is too thin for text, so it sits above and below the painting instead. */
@media (max-width: 780px) {
  .painting { width: 100%; box-shadow: 0 10px 30px rgba(20, 48, 73, .18); }
  .painting-top, .painting-bottom { position: static; height: auto; padding: 0 24px; }
  .painting-top { margin-bottom: 22px; gap: 6px; }
  .painting-bottom { margin-top: 24px; }
  .painting { display: flex; flex-direction: column; }
  .painting img { order: 1; }
  .painting-top { order: 0; }
  .painting-bottom { order: 2; }
  .painting { box-shadow: none; }
  .painting img { box-shadow: 0 10px 30px rgba(20, 48, 73, .18); }
}

/* ============================================================
   Background music button + "Now playing" note (js/music.js)
   ============================================================ */
.music { position: fixed; left: 16px; bottom: 16px; z-index: 150; display: flex; align-items: center;
  pointer-events: none; } /* only the round button takes taps; the space for the note mustn't block what's behind it */
.music-btn { pointer-events: auto; }
.music-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; flex: none; position: relative; z-index: 1;
  background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(20, 48, 73, .28); transition: transform .2s;
}
.music-btn:hover { transform: scale(1.06); }
.music-btn svg { width: 20px; height: 20px; fill: currentColor; margin-left: 2px; }
.music .i-bars { display: none; align-items: flex-end; gap: 3px; height: 16px; }
.music .i-bars i { display: block; width: 3px; background: var(--yellow-pale); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.music .i-bars i:nth-child(2) { animation-delay: -.35s; }
.music .i-bars i:nth-child(3) { animation-delay: -.7s; }
.music.playing .i-bars { display: flex; }
.music.playing .i-play { display: none; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
.music-note {
  margin-left: -23px; padding: 8px 18px 8px 34px; border-radius: 0 999px 999px 0;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(20, 48, 73, .14);
  display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap;
  opacity: 0; transform: translateX(-12px); pointer-events: none; transition: opacity .35s, transform .35s;
}
.music.open .music-note,
.music-btn:hover + .music-note,
.music-btn:focus-visible + .music-note { opacity: 1; transform: none; } /* hovering the button shows the note again */
.music-label { font-family: var(--sans); font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.music-title { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .music .i-bars i { animation: none; height: 10px; } }

/* While the next page is loading in */
.page-loading #site-header ~ :not(#site-footer):not(script):not(.music):not(.lightbox) { opacity: .55; transition: opacity .2s; }

/* "Open your invitation again" button, bottom-right (guests who came via their invitation link) */
.reopen { position: fixed; right: 16px; bottom: 16px; z-index: 150; display: flex; align-items: center; pointer-events: none; }
.reopen-btn {
  pointer-events: auto; width: 46px; height: 46px; border-radius: 50%; flex: none; position: relative; z-index: 1;
  background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(20, 48, 73, .28); transition: transform .2s;
}
.reopen-btn:hover { transform: scale(1.06); color: #fff; }
.reopen-btn svg { width: 21px; height: 21px; fill: none; stroke: var(--yellow-pale); stroke-width: 1.7; stroke-linejoin: round; }
.reopen-note {
  order: -1; margin-right: -23px; padding: 10px 34px 10px 18px; border-radius: 999px 0 0 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(20, 48, 73, .14);
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink); white-space: nowrap;
  opacity: 0; transform: translateX(12px); transition: opacity .35s, transform .35s;
}
.reopen:hover .reopen-note, .reopen-btn:focus-visible ~ .reopen-note, .reopen:focus-within .reopen-note { opacity: 1; transform: none; }
