/* ====== EDIT COLORS HERE ====== */
:root {
  --night: #16120e;
  --night-2: #211b15;
  --film: #efe3c8;
  --film-dim: #b9ab90;
  --gold: #c9a15a;
  --gold-soft: #ecd3a0;
  --wine: #7c2f28;
  --line: rgba(201, 161, 90, .35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--film);
  font: 400 18px/1.6 "Cormorant Garamond", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }

/* Film grain over everything */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .08;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0) } 20% { transform: translate(-3%,2%) } 40% { transform: translate(2%,-3%) }
  60% { transform: translate(-2%,-1%) } 80% { transform: translate(3%,2%) } 100% { transform: translate(0,0) }
}

.wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: "Special Elite", "Courier New", monospace; letter-spacing: .18em; text-transform: uppercase; }
.caps { font-family: "Cinzel", "Times New Roman", serif; letter-spacing: .2em; text-transform: uppercase; }

/* ===== Cover =====
   Phone: the photo fills the screen, names on top, details at the bottom.
   Desktop: split screen — photo on the left melting into a dark title panel on the right. */
.cover {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden; background: var(--night);
}
.cover-photo { position: absolute; inset: 0; overflow: hidden; }
.cover-photo img {
  width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 48% 40%;
  filter: sepia(.28) saturate(1.15) contrast(1.06) brightness(.92);
  animation: push 18s ease-out both;
}
@keyframes push { from { transform: scale(1.06); } to { transform: scale(1); } }
.cover-photo::after { /* golden-hour grade: dusky sky on top, dark ground for text */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(130% 80% at 50% 45%, transparent 50%, rgba(8,6,4,.65) 100%),
    linear-gradient(to bottom, rgba(22,24,38,.7) 0%, rgba(40,32,40,.2) 24%, transparent 42%, rgba(18,14,10,.5) 64%, rgba(14,11,8,.92) 84%, var(--night) 100%);
}
.cover-title {
  position: relative; z-index: 2; height: 100%;
  container-type: inline-size;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  text-align: center; padding: 6svh 16px 6svh;
}
.names {
  font-family: "Pinyon Script", cursive; font-weight: 400; margin: 0; line-height: 1.1;
  font-size: 15cqw; color: #f6e9d2; white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0,0,0,.55);
}
.info { width: 100%; }
.info .married { font-size: max(15px, 5cqw); margin: 0 0 .5em; color: #f6e9d2; letter-spacing: .16em; }
.info .datetime {
  display: flex; justify-content: center; align-items: center; gap: .9em; flex-wrap: wrap;
  font-family: "Montserrat", system-ui, sans-serif; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  font-size: max(12px, 3.6cqw); color: var(--gold-soft); margin: 0;
}
.info .datetime i { width: 1px; height: 1.3em; background: var(--gold-soft); opacity: .7; }
.divider { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold-soft); margin: .9em auto; width: 82%; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .6; }
.divider svg { width: max(14px, 3.6cqw); height: auto; flex: none; }
.info .venue { font-size: max(14px, 4cqw); margin: 0; color: #f6e9d2; }
.info .btn { margin-top: 1.6em; }

@media (min-width: 900px) and (orientation: landscape) {
  .cover-photo { right: auto; width: 62%; }
  .cover-photo img { object-position: 50% 35%; }
  .cover-photo::after {
    background:
      linear-gradient(to right, transparent 45%, rgba(22,18,14,.55) 75%, var(--night) 100%),
      linear-gradient(to bottom, rgba(22,24,38,.4), transparent 30%, transparent 72%, rgba(14,11,8,.65)),
      radial-gradient(120% 90% at 35% 45%, transparent 55%, rgba(8,6,4,.5) 100%);
  }
  .cover-title {
    margin-left: auto; width: 50%;
    justify-content: center; gap: 4svh; padding: 8svh 4vw 8svh 6vw;
    background:
      radial-gradient(60% 50% at 55% 50%, rgba(201,161,90,.08), transparent 70%),
      linear-gradient(to right, transparent, rgba(22,18,14,.9) 22%, var(--night) 40%);
  }
  .names { font-size: 13cqw; }
  .info .married { font-size: max(15px, 3.8cqw); }
  .info .datetime { font-size: max(12px, 2.5cqw); }
  .info .venue { font-size: max(14px, 3cqw); }
  .divider svg { width: max(14px, 2.4cqw); }
}

/* ===== Sections ===== */
section { padding: 72px 0; text-align: center; }
.kicker { font-size: 12px; color: var(--gold); margin: 0 0 10px; }
h2 { font-family: "Playfair Display", serif; font-weight: 400; font-style: italic; font-size: clamp(30px, 8vw, 40px); margin: 0; color: var(--film); }
.rule { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 18px auto 30px; color: var(--gold); }
.rule::before, .rule::after { content: ""; width: 56px; height: 1px; background: var(--line); }

/* Film strip countdown */
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr); max-width: 460px; margin: 0 auto;
  background: #0b0907; padding: 18px 0; position: relative;
}
.strip::before, .strip::after {
  content: ""; position: absolute; left: 0; right: 0; height: 8px; opacity: .5;
  background: repeating-linear-gradient(90deg, transparent 0 8px, var(--film-dim) 8px 16px, transparent 16px 24px);
}
.strip::before { top: 5px; } .strip::after { bottom: 5px; }
.strip div { padding: 12px 4px; border-left: 1px solid #2c241c; }
.strip div:first-child { border-left: 0; }
.strip b { display: block; font-family: "Playfair Display", serif; font-weight: 400; font-size: clamp(28px, 8vw, 36px); line-height: 1.1; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.strip small { font-size: 10px; color: var(--film-dim); letter-spacing: .12em; }

/* Cards */
.card {
  position: relative; max-width: 460px; margin: 0 auto 18px; padding: 30px 24px;
  background: linear-gradient(180deg, var(--night-2), #1a1511);
  border: 1px solid var(--line); outline: 1px solid var(--line); outline-offset: -8px;
}
.card h3 { font-family: "Playfair Display", serif; font-weight: 400; font-size: 24px; margin: 0 0 6px; color: var(--gold-soft); }
.card p { margin: 0; color: var(--film); }
.card .sub { color: var(--film-dim); }
.venue-card { padding-top: 16px; }
.venue-photo {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 30%;
  margin: 0 0 22px; position: relative; z-index: 1;
  filter: sepia(.3) saturate(1.05) contrast(1.05) brightness(.9);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

.notice { max-width: 480px; margin: 0 auto 26px; text-align: center; }
.notice .kids { font-style: italic; font-size: 20px; line-height: 1.5; margin: 0; color: var(--film); }
.notice .thanks-line { font-size: 11px; margin: .7em 0 0; color: var(--film-dim); }
.notice svg { width: 18px; }

.btn {
  display: inline-block; margin-top: 18px; padding: 14px 28px; cursor: pointer; min-height: 48px;
  background: var(--gold); color: var(--night); border: 1px solid var(--gold); text-decoration: none;
  font: 400 13px "Special Elite", monospace; letter-spacing: .18em; text-transform: uppercase;
  transition: background .2s, color .2s; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: transparent; color: var(--gold-soft); }
.btn.ghost { background: transparent; color: var(--gold-soft); }
.btn.ghost:hover { background: var(--gold); color: var(--night); }
.btn.big { font-size: 15px; padding: 18px 40px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }

/* RSVP page */
.page-top { text-align: center; padding: 28px 20px 0; }
.back { color: var(--film-dim); text-decoration: none; font-size: 12px; }
.back:hover { color: var(--gold-soft); }
.ticket {
  max-width: 480px; margin: 0 auto; background: var(--film); color: #2a2018;
  padding: 34px 26px 28px; position: relative;
  -webkit-mask: radial-gradient(circle 14px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 14px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 14px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 14px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.ticket .head { text-align: center; border-bottom: 1px dashed #a8987a; padding-bottom: 16px; margin-bottom: 22px; }
.ticket .head b { display: block; font: italic 400 28px "Playfair Display", serif; }
.ticket .head small { font-size: 11px; color: var(--wine); }
form { text-align: left; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span, .legend { font: 400 11px "Special Elite", monospace; letter-spacing: .18em; text-transform: uppercase; color: #6b5a44; }
input, select, textarea {
  font: 400 18px "Cormorant Garamond", serif; color: #2a2018; width: 100%;
  padding: 8px 2px; border: 0; border-bottom: 1px solid #a8987a; background: transparent; border-radius: 0;
  -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; }
select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b5a44' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--wine); box-shadow: 0 1px 0 var(--wine); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { border: 1px solid #a8987a; padding: 12px 8px; text-align: center; cursor: pointer; font-size: 17px; }
.choice input:checked + label { background: #2a2018; color: var(--film); border-color: #2a2018; }
.choice input:focus-visible + label { outline: 2px solid var(--wine); outline-offset: 2px; }
.ticket .btn { width: 100%; background: #2a2018; border-color: #2a2018; color: var(--film); }
.ticket .btn:hover { background: var(--wine); border-color: var(--wine); }
.hint { font-size: 15px; font-style: italic; color: #6b5a44; margin: -8px 0 0; }
.status { text-align: center; min-height: 1.4em; margin: 0; color: var(--wine); }
.thanks { display: none; text-align: center; padding: 10px 0; }
.thanks.show { display: block; }
.thanks b { display: block; font: italic 400 30px "Playfair Display", serif; margin-bottom: 6px; }

/* "Already RSVP'd" popup */
.modal {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(8, 6, 4, .78);
}
.modal[hidden] { display: none; }
.modal-box {
  width: 100%; max-width: 420px; text-align: center; padding: 30px 24px;
  background: linear-gradient(180deg, var(--night-2), #1a1511);
  border: 1px solid var(--line); outline: 1px solid var(--line); outline-offset: -8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.modal-box h3 { font: italic 400 28px "Playfair Display", serif; margin: 0 0 10px; color: var(--gold-soft); }
.modal-box p { margin: 0 0 6px; }
.modal-box .sub { color: var(--film-dim); }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.modal-actions .btn { flex: 1 1 140px; }

footer { text-align: center; padding: 30px 20px 70px; color: var(--film-dim); }
footer .script { font-family: "Pinyon Script", cursive; font-size: 56px; margin: 0; color: var(--film); line-height: 1.2; }
footer .mono { font-size: 11px; color: var(--gold); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Desktop: a little more breathing room */
@media (min-width: 900px) {
  section { padding: 96px 0; }
}
@media (prefers-reduced-motion: reduce) {
  body::after, .cover-photo img { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
