:root {
  --bg: #0b0908;
  --ink: #f6efe8;
  --muted: #c9bcae;
  --accent: #c1272d;
  --accent-dark: #e0555a;
  --card: rgba(10, 8, 7, .62);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.6)),
    url("bg.jpg") 62% center / cover no-repeat;
}
nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: center; gap: 1.5rem;
  padding: .8rem 1rem;
  background: rgba(10, 8, 7, .78);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-family: system-ui, sans-serif; font-size: .85rem;
  letter-spacing: .12em; text-transform: uppercase;
}
nav a { color: var(--ink); text-decoration: none; }
nav a:hover { color: var(--accent-dark); }

section, .hero { max-width: 760px; margin: 0 auto; padding: 4rem 1.25rem; }
.hero { text-align: center; padding-top: 5rem; }
.eyebrow { font-family: system-ui, sans-serif; text-transform: uppercase; letter-spacing: .2em; font-size: .8rem; color: var(--muted); }
h1 { font-size: clamp(2.4rem, 8vw, 4.2rem); font-weight: normal; margin: .3rem 0; line-height: 1.15; }
h2 { font-size: 2rem; font-weight: normal; text-align: center; margin: 0 0 1.5rem; }
.tagline { font-style: italic; font-size: 1.3rem; color: var(--accent-dark); margin: 0 0 1.5rem; }
.message { max-width: 520px; margin: 0 auto 2rem; }
.details { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 2rem 0; }
.details div { background: var(--card); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 1.1rem; backdrop-filter: blur(6px); }
dt { font-family: system-ui, sans-serif; text-transform: uppercase; letter-spacing: .15em; font-size: .72rem; color: var(--muted); margin-bottom: .4rem; }
dd { margin: 0; }
dd a { color: var(--accent-dark); }
.rsvp { color: var(--muted); font-style: italic; }

.button, button {
  display: inline-block; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: .8rem 1.6rem; font: 600 .95rem system-ui, sans-serif;
  text-decoration: none; transition: background .15s;
}
.button:hover, button:hover { background: var(--accent-dark); }
.button.secondary { background: rgba(0,0,0,.35); color: var(--ink); border: 2px solid var(--accent); }
.button.secondary:hover { background: var(--accent); color: #fff; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--accent); }
.timeline li { position: relative; padding: 0 0 1.6rem 1.6rem; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: .45rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
}
.timeline .t { font-family: system-ui, sans-serif; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.timeline .h { font-size: 1.2rem; }
.timeline .d { color: var(--muted); }

.lead { text-align: center; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin: 1.5rem 0; }
.code-box { display: flex; gap: .5rem; justify-content: center; align-items: center; flex-wrap: wrap; margin: 1rem 0; font-family: system-ui, sans-serif; }
.code-box input { padding: .7rem 1rem; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; font-size: 1rem; background: rgba(0,0,0,.5); color: var(--ink); }
.queue { list-style: none; padding: 0; margin: 1rem 0; font-family: system-ui, sans-serif; font-size: .9rem; }
.queue li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.queue .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { text-align: center; min-height: 1.5rem; font-family: system-ui, sans-serif; color: var(--muted); }
.status.error { color: #ff8a80; }

.gallery { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 1rem; }
.gallery img, .gallery video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #1a1614; cursor: pointer; }

footer { text-align: center; padding: 2rem 1rem 3rem; color: var(--muted); font-style: italic; }


/* Leaves the photo uncovered while scrolling from the invitation to the agenda */
.hero { padding-bottom: 38vh; }

/* Phones: keep the couple clear of the text and stop the background jumping when the address bar hides */
body::before { height: 100vh; height: 100lvh; bottom: auto; }
@media (max-width: 700px) {
  body::before {
    background:
      linear-gradient(rgba(0,0,0,.3), rgba(0,0,0,.55)),
      url("bg.jpg") 60% 0 / auto 118% no-repeat #0b0908;
  }
  .hero { padding-top: 2.5rem; padding-bottom: 6vh; }
  .hero .message { margin-top: 40vh; }
  section { padding-top: 3rem; padding-bottom: 3rem; }
  .actions .button { width: 100%; text-align: center; }
  .code-box input { flex: 1 1 160px; }
}

[hidden] { display: none !important; }

/* Invitation card video */
#card { padding-top: 1rem; padding-bottom: 2rem; text-align: center; }
.card-video {
  width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto;
  border-radius: 14px; background: #000;
  box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.12);
}

/* Congratulations page */
.c-wrap { max-width: 520px; margin: 0 auto; padding: 2.5rem 1.25rem 3rem; text-align: center; }
.c-title { font-size: clamp(2.2rem, 9vw, 3rem); margin: .2rem 0 .8rem; }
.c-wrap .lead { color: var(--ink); font-size: 1.1rem; }
.ideas { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1.2rem 0 1.6rem; }
.ideas span { font: .8rem system-ui, sans-serif; padding: .35rem .8rem; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.2); }
.actions.stack { flex-direction: column; align-items: stretch; gap: .9rem; }
.big { font-size: 1.15rem; padding: 1.1rem 1.6rem; }
.button.big { display: block; text-align: center; }
.textlink { background: none; border: 0; padding: .4rem; color: var(--ink); font: .95rem system-ui, sans-serif; text-decoration: underline; cursor: pointer; text-align: center; border-radius: 0; }
.textlink:hover { background: none; color: var(--accent-dark); }
.form { display: grid; gap: .6rem; text-align: left; margin-top: 1.2rem; font-family: system-ui, sans-serif; }
.form label { font-size: .9rem; }
.opt { color: var(--muted); font-size: .8rem; }
.form input, .form textarea { width: 100%; padding: .85rem 1rem; font: 1rem system-ui, sans-serif; color: var(--ink); background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.25); border-radius: 10px; }
.form textarea { resize: vertical; }
.form button.big { width: 100%; margin-top: .4rem; }
.form button:disabled { opacity: .5; cursor: not-allowed; }
.queue li { position: relative; flex-wrap: wrap; align-items: center; }
.queue .name { flex: 1 1 60%; }
.queue .pct { color: var(--muted); }
.queue .bar { flex: 1 0 100%; height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden; }
.queue .bar i { display: block; height: 100%; width: 0; background: var(--accent-dark); transition: width .2s; }
.queue .rm { background: none; padding: 0 .5rem; font-size: 1.4rem; line-height: 1; border-radius: 6px; }
.privacy { margin-top: 1.5rem; color: var(--muted); font: .85rem system-ui, sans-serif; }
.done { padding: 2rem 0; }
.done .heart { font-size: 5rem; color: var(--accent-dark); animation: beat 1.2s ease-in-out infinite; }
.done h2 { margin-bottom: .5rem; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.cta { text-align: center; padding-bottom: 5rem; }
@media (prefers-reduced-motion: reduce) { .done .heart { animation: none; } html { scroll-behavior: auto; } }

/* File rows: name | status | remove, progress bar underneath */
.queue li { display: grid; grid-template-columns: 1fr auto auto; gap: .3rem .6rem; align-items: center; text-align: left; padding: .6rem 0; }
.queue .bar { grid-column: 1 / -1; }
.queue .rm { color: var(--ink); }
.queue .name { grid-column: 1; grid-row: 1; min-width: 0; }
.queue .pct { grid-column: 2; grid-row: 1; }
.queue .rm { grid-column: 3; grid-row: 1; }
.queue .bar { grid-row: 2; }

/* Live countdown and "happening now" */
.live { max-width: 440px; margin: 0 auto 2rem; padding: 1.2rem 1rem; background: var(--card); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; backdrop-filter: blur(6px); }
.live-label { margin: 0 0 .8rem; font: .78rem system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.countdown div { padding: .6rem .2rem; border-radius: 10px; background: rgba(255,255,255,.07); }
.countdown b { display: block; font-size: 2rem; font-weight: normal; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown span { font: .65rem system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.now h3 { margin: .2rem 0; font-size: 1.7rem; font-weight: normal; color: var(--accent-dark); }
.now p { margin: 0; color: var(--muted); }
.next { margin: .9rem 0 0; font: .9rem system-ui, sans-serif; color: var(--ink); }
.live-label.on::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .5rem; border-radius: 50%; background: var(--accent-dark); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.timeline li.past { opacity: .45; }
.timeline li.now::before { width: 16px; height: 16px; left: -9px; top: .35rem; background: var(--accent-dark); box-shadow: 0 0 0 5px rgba(224,85,90,.3); }
.timeline li.now .h { color: var(--accent-dark); }
@media (prefers-reduced-motion: reduce) { .live-label.on::before { animation: none; } }

.next:empty { display: none; }
