:root {
  --gold: #c9a45c;
  --gold-hi: #ecd29a;
  --gold-lo: #a8833f;
  --on-gold: #14110b;
  --radius: 14px;
  --gold-grad: linear-gradient(135deg, var(--gold-lo) 0%, var(--gold-hi) 45%, var(--gold) 60%, var(--gold-lo) 100%);
  color-scheme: light;
  /* light theme (default) — ivory & gold, like the inside of the invitation */
  --bg: #f8f4ec;
  --bg-glow: #fffdf8;
  --text: #1d1913;
  --muted: #6b6255;
  --accent: #8a6a2e;
  --accent-2: #9a7638;
  --panel: #ffffff;
  --panel-2: #f3ede2;
  --panel-hover: #fffaf0;
  --field: #fffdf9;
  --field-line: #d9ccb4;
  --line: rgba(154, 118, 56, 0.35);
  --line-soft: #e6dccb;
  --danger: #b2442f;
  --shadow: 0 8px 30px rgba(80, 60, 20, 0.08);
  --logo: linear-gradient(135deg, #8f6d2f, #b8913f 50%, #8f6d2f);
}
[data-theme="dark"] {
  color-scheme: dark;
  /* dark theme — black & gold, like the invitation cover */
  --bg: #0b0b0b;
  --bg-glow: #1c1810;
  --text: #f5efe4;
  --muted: #b9b0a0;
  --accent: #ecd29a;
  --accent-2: #c9a45c;
  --panel: #171512;
  --panel-2: #100f0d;
  --panel-hover: #1d1a15;
  --field: #0f0e0c;
  --field-line: #3a3226;
  --line: rgba(201, 164, 92, 0.35);
  --line-soft: #2c261d;
  --danger: #e6907e;
  --shadow: none;
  --logo: linear-gradient(135deg, #a8833f, #ecd29a 45%, #c9a45c 60%, #a8833f);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(120% 70% at 50% 0%, var(--bg-glow) 0%, var(--bg) 60%) fixed, var(--bg);
  transition: background-color .25s ease, color .25s ease;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }

.wrap { width: min(640px, 100%); margin: 0 auto; padding: 22px 20px 56px; }
.wrap.wide { width: min(1100px, 100%); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.top .mark { width: 54px; height: 54px; }
.back {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-2); text-decoration: none; padding: 10px 0;
}
.back::before { content: '‹ '; font-size: 16px; }

.eyebrow {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 600; font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--accent-2); margin: 0 0 6px; text-align: center;
}
.script {
  font-family: 'Pinyon Script', 'Great Vibes', cursive;
  font-weight: 400; color: var(--text); text-align: center;
  font-size: clamp(42px, 11.5vw, 72px); line-height: 1.15; margin: 0; white-space: nowrap;
}
.script .amp { font-size: .7em; color: var(--accent-2); margin: 0 .12em; }
h1.page-title { font-family: 'Pinyon Script', cursive; font-weight: 400; font-size: clamp(48px, 14vw, 72px); text-align: center; margin: 0 0 4px; line-height: 1.1; }
.lede { text-align: center; color: var(--muted); margin: 0 auto 28px; max-width: 30em; }
.dots { width: 160px; height: 2px; margin: 16px auto; background: radial-gradient(circle, var(--gold) 1px, transparent 1.5px) 0 0 / 6px 2px repeat-x; opacity: .8; }

/* ---------- home ---------- */
.hero-logo { width: min(170px, 44vw); margin: 0 auto 10px; filter: drop-shadow(0 6px 24px rgba(201,164,92,.18)); }
.hero-photo {
  margin: 26px auto 8px; border-radius: 999px 999px var(--radius) var(--radius);
  overflow: hidden; border: 1px solid var(--line); aspect-ratio: 3 / 4; max-width: 360px;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.thanks { text-align: center; font-size: 19px; margin: 6px auto 22px; max-width: 26em; }
.thanks em { color: var(--accent); font-style: italic; }

.choices { display: grid; gap: 14px; }
.choice {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.choice:hover, .choice:focus-visible { border-color: var(--accent-2); transform: translateY(-1px); background-color: var(--panel-hover); }
.choice .icon {
  flex: 0 0 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold-grad); color: var(--on-gold);
}
.choice .icon svg { width: 24px; height: 24px; }
.choice .label { font-family: 'Montserrat', system-ui, sans-serif; font-weight: 600; letter-spacing: .28em; font-size: 15px; color: var(--accent); }
.choice .sub { display: block; color: var(--muted); font-size: 17px; margin-top: 2px; }
.choice .chev { margin-left: auto; color: var(--accent-2); font-size: 26px; }

.footer {
  margin-top: 44px; text-align: center; color: var(--muted);
  font-family: 'Montserrat', system-ui, sans-serif; font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
}

/* ---------- forms & buttons ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
label { display: block; font-family: 'Montserrat', system-ui, sans-serif; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 6px; }
input[type=text], input[type=password], textarea {
  width: 100%; font: inherit; font-size: 18px; color: var(--text);
  background: var(--field); border: 1px solid var(--field-line); border-radius: 10px; padding: 12px 14px;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(201,164,92,.18); }
textarea { min-height: 140px; resize: vertical; }
.field { margin-bottom: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 16px 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--gold-grad); color: var(--on-gold);
  font-family: 'Montserrat', system-ui, sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .24em; text-transform: uppercase;
  text-decoration: none; transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.99); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn.small { width: auto; padding: 9px 14px; font-size: 11px; }

.note { color: var(--muted); font-size: 16px; text-align: center; margin: 12px 0 0; }
.status { margin-top: 14px; text-align: center; min-height: 1.4em; }
.status.ok { color: var(--accent); }
.status.err { color: var(--danger); }

/* ---------- upload ---------- */
.drop {
  display: grid; place-items: center; text-align: center; gap: 8px;
  padding: 34px 18px; border: 1.5px dashed var(--gold); border-radius: var(--radius);
  background: rgba(201,164,92,.05); cursor: pointer; margin-bottom: 16px; text-transform: none; letter-spacing: 0;
}
.drop.drag { background: rgba(201,164,92,.12); }
.drop svg { width: 46px; height: 46px; color: var(--accent-2); }
.drop strong { font-family: 'Montserrat', system-ui, sans-serif; letter-spacing: .18em; font-size: 13px; text-transform: uppercase; color: var(--accent); }
.drop span { color: var(--muted); font-size: 17px; font-family: 'Cormorant Garamond', Georgia, serif; letter-spacing: 0; text-transform: none; }
.drop input { display: none; }

.queue { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.queue li { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px; }
.queue .thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--panel-2); display: grid; place-items: center; color: var(--accent-2); font-size: 11px; font-family: 'Montserrat', sans-serif; }
.queue .meta { min-width: 0; }
.queue .fname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.queue .bar { height: 4px; background: var(--line-soft); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.queue .bar i { display: block; height: 100%; width: 0; background: var(--gold-grad); transition: width .2s; }
.queue .st { font-family: 'Montserrat', sans-serif; font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.queue .st.done { color: var(--accent); }
.queue .st.err { color: var(--danger); }
.queue .rm { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; padding: 4px 8px; }

/* ---------- download ---------- */
.section { margin-top: 26px; }
.section h2 { font-family: 'Montserrat', system-ui, sans-serif; font-weight: 600; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 4px; text-align: center; }
.section p.desc { text-align: center; color: var(--muted); margin: 0 0 14px; font-size: 17px; }
.track { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.track .t-title { font-size: 20px; margin: 0 0 2px; }
.track .t-sub { color: var(--muted); font-size: 15px; margin: 0 0 10px; }
.track audio, .track video { width: 100%; margin-bottom: 10px; border-radius: 8px; }
.track video { background: #000; }
.track .row { display: flex; gap: 10px; flex-wrap: wrap; }
.coming { text-align: center; color: var(--muted); font-style: italic; padding: 18px; border: 1px dashed var(--field-line); border-radius: var(--radius); }

/* ---------- messages ---------- */
.wall { display: grid; gap: 14px; margin-top: 28px; }
.msg { background: var(--panel); border: 1px solid var(--line-soft); border-left: 3px solid var(--gold); border-radius: 10px; padding: 16px 18px; }
.msg p { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 19px; }
.msg .by { font-family: 'Pinyon Script', cursive; font-size: 26px; color: var(--accent); }
.msg .when { font-family: 'Montserrat', sans-serif; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.empty { text-align: center; color: var(--muted); font-style: italic; }

/* ---------- admin ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; font-size: 14px; }
.tile .media { aspect-ratio: 1; background: #000; display: grid; place-items: center; color: var(--accent-2); font-family: 'Montserrat', sans-serif; font-size: 11px; letter-spacing: .1em; }
.tile .media img, .tile .media video { width: 100%; height: 100%; object-fit: cover; }
.tile .cap { padding: 8px 10px; }
.tile .cap a { font-family: 'Montserrat', sans-serif; font-size: 11px; letter-spacing: .1em; }
.tabs { display: flex; gap: 8px; justify-content: center; margin: 10px 0 22px; }
.tabs button.active { background: var(--gold-grad); color: var(--on-gold); }
.admin-msg { display: flex; gap: 12px; align-items: flex-start; }
.admin-msg .body { flex: 1; }
.admin-msg.hidden-msg { opacity: .45; }
.hidden { display: none !important; }

@media (min-width: 720px) {
  body { font-size: 20px; }
  .wrap { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }


/* ---------- logo (one PNG used as a mask, coloured per theme) ---------- */
.logo {
  display: block; aspect-ratio: 1; background: var(--logo);
  -webkit-mask: url(/img/logo-gold.png) center / contain no-repeat;
          mask: url(/img/logo-gold.png) center / contain no-repeat;
}
.hero-logo.logo { filter: none; }
.top .mark.logo { width: 54px; height: 54px; }

/* ---------- theme switch ---------- */
.theme-toggle {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 50;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: var(--panel); color: var(--accent); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: block; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
.top { padding-right: 52px; }
.top .mark { margin: 0 auto 0 0; }
.top .back { margin-right: auto; }

.card, .choice, .track, .msg, .tile { box-shadow: var(--shadow); }

/* ---------- wedding info site ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-nav { padding-right: 58px; }
.site-nav .inner { display: flex; gap: 4px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; max-width: 1100px; margin: 0 auto; }
.site-nav .inner::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--accent-2);
  font-family: 'Montserrat', system-ui, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.site-nav a:hover { background: var(--panel-2); }
.site .theme-toggle { top: max(6px, env(safe-area-inset-top)); }

.hero { text-align: center; padding: 34px 20px 10px; }
.hero .hero-logo { margin-bottom: 14px; }
.hero .when { font-family: 'Montserrat', system-ui, sans-serif; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: clamp(16px, 4.6vw, 24px); margin: 4px 0 0; }
.hero .where { color: var(--muted); margin: 6px 0 0; }
.hero-arch { margin: 26px auto 0; max-width: 380px; aspect-ratio: 3 / 4; border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

.block { width: min(760px, 100%); margin: 0 auto; padding: 46px 20px 10px; scroll-margin-top: 56px; }
.block h2 {
  font-family: 'Montserrat', system-ui, sans-serif; font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
  color: var(--accent-2); font-size: 14px; text-align: center; margin: 0 0 6px;
}
.block .script-title { font-family: 'Pinyon Script', cursive; font-size: clamp(40px, 11vw, 60px); text-align: center; margin: 0 0 18px; line-height: 1.1; font-weight: 400; }
.block p.center { text-align: center; }

.families { display: grid; gap: 22px; text-align: center; }
.families .name { font-family: 'Pinyon Script', cursive; font-size: clamp(40px, 11vw, 58px); line-height: 1.1; margin: 0; }
.families .parents { color: var(--accent-2); font-family: 'Montserrat', system-ui, sans-serif; font-size: 13px; letter-spacing: .04em; font-weight: 500; margin: 2px 0 0; }
.families .amp { font-family: 'Pinyon Script', cursive; font-size: 40px; color: var(--accent-2); line-height: 1; }

.schedule { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); margin-left: 8px; }
.schedule li { position: relative; padding: 0 0 22px 22px; }
.schedule li::before { content: ''; position: absolute; left: -6px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--gold-grad); }
.schedule .time { font-family: 'Montserrat', system-ui, sans-serif; font-weight: 700; color: var(--accent); font-size: 13px; letter-spacing: .1em; }
.schedule .what { font-size: 21px; font-weight: 500; margin: 0; line-height: 1.3; }
.schedule .detail { color: var(--muted); margin: 4px 0 0; font-size: 17px; }
.small-print { text-align: center; color: var(--muted); font-size: 16px; font-style: italic; }

.prayer { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px 0 0; }
.prayer span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-family: 'Montserrat', system-ui, sans-serif; font-size: 13px; background: var(--panel); }
.prayer b { color: var(--accent); }

.venue-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.venue-card .map { width: 100%; aspect-ratio: 4 / 3; border: 0; display: block; filter: var(--map-filter, none); }
[data-theme="dark"] .venue-card .map { --map-filter: invert(.9) hue-rotate(180deg) saturate(.6) brightness(.95); }
.venue-card .body { padding: 20px; text-align: center; }
.venue-card address { font-style: normal; margin: 0 0 14px; }
.venue-card address strong { display: block; font-size: 21px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts { display: grid; gap: 12px; margin-top: 18px; }
.fact { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.fact h3 { margin: 0 0 4px; font-family: 'Montserrat', system-ui, sans-serif; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.fact p { margin: 0; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery button:hover img { transform: scale(1.03); }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(0,0,0,.85); }
dialog.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 10px; }
dialog.lightbox form { text-align: center; margin-top: 8px; }

.rsvp { text-align: center; }
.btn.whatsapp { max-width: 360px; }
.site-footer { text-align: center; padding: 40px 20px 60px; }
.site-footer a.btn { max-width: 360px; }

/* ---------- guest password gate ---------- */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 30px 20px; }
.gate .card { width: min(420px, 100%); text-align: center; }
.gate input { text-align: center; letter-spacing: .2em; text-transform: uppercase; }

@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .facts { grid-template-columns: 1fr 1fr; }
}
