:root {
  --cream: #faf6ef;
  --ink: #1c1917;
  --muted: #6b6560;
  --line: #e7e0d5;
  --coral: #e25a4a;
  --coral-soft: #fde8e4;
  --navy: #1e2a44;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(28, 25, 23, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: Georgia, "Times New Roman", "Iowan Old Style", "Palatino Linotype", serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
#vote,
#top {
  scroll-margin-top: 76px;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Center column sits between fixed photo rails on wide screens */
.page-center {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 720px;
  margin: 0 auto;
  background: var(--cream);
}

/* Vertical scrolling photo rails */
.photo-rail {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  width: clamp(120px, 14vw, 200px);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background: var(--cream);
}
.photo-rail-left {
  left: 0;
  border-right: 1px solid var(--line);
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}
.photo-rail-right {
  right: 0;
  border-left: 1px solid var(--line);
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}
.photo-rail-track {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  width: 100%;
  will-change: transform;
}
.photo-rail-track img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 auto;
  box-shadow: 0 6px 18px rgba(28, 25, 23, 0.08);
}
.rail-up {
  animation: rail-scroll-up 55s linear infinite;
}
.rail-down {
  animation: rail-scroll-down 60s linear infinite;
}
@keyframes rail-scroll-up {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
@keyframes rail-scroll-down {
  from { transform: translateY(-50%); }
  to { transform: translateY(0); }
}

@media (min-width: 1100px) {
  .photo-rail { display: block; }
  .page-center {
    max-width: min(720px, calc(100vw - 2 * clamp(120px, 14vw, 200px) - 24px));
  }
  .site-header {
    /* keep header over center only */
  }
}

@media (prefers-reduced-motion: reduce) {
  .rail-up,
  .rail-down {
    animation: none;
  }
  .photo-rail {
    overflow-y: auto;
  }
}
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
button:disabled { opacity: 0.6; cursor: not-allowed; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: white;
  padding: 12px 16px;
  font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 32px);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.wordmark {
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 14px;
}
.site-header span {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* Hero */
.hero {
  max-width: none;
  margin: 0;
  padding: clamp(48px, 9vw, 88px) clamp(20px, 5vw, 32px) 40px;
  text-align: center;
}
.kicker {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 7.5vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--navy);
}
.lede {
  max-width: 520px;
  margin: 24px auto 0;
  font-size: clamp(16px, 2.1vw, 19px);
  color: #3f3a36;
}
.lede.soft {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}
.cta,
.btn.primary,
.sticky-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.cta:hover,
.btn.primary:hover,
.sticky-cta:hover {
  background: var(--navy);
}
.cta:focus-visible,
.btn:focus-visible,
.sticky-cta:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

/* Then / now photos — wedding featured large */
.then-now {
  max-width: none;
  margin: 0;
  padding: 8px clamp(20px, 5vw, 32px) 48px;
  text-align: center;
}
.wedding-hero {
  margin: 0 auto 24px;
  max-width: 440px;
  border-radius: 24px;
  overflow: hidden;
  background: #ddd;
  box-shadow: var(--shadow);
  position: relative;
  aspect-ratio: 3 / 4;
}
.wedding-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.wedding-hero figcaption,
.then-now-grid figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.72);
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.then-now-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 360px;
  margin: 20px auto 0;
}
.then-now-grid figure {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #ddd;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  position: relative;
}
.then-now-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.then-now-copy {
  margin-top: 8px;
}
.years {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.punch {
  margin: 0;
  font-size: clamp(20px, 2.8vw, 26px);
  line-height: 1.35;
  font-family: var(--display);
  font-weight: 500;
}

/* Why strip */
.why {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 22px clamp(20px, 5vw, 32px);
}
.why-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.why-inner strong { color: var(--ink); }

/* Vote form */
.vote {
  padding: clamp(40px, 7vw, 72px) clamp(16px, 4vw, 24px) 90px;
}
.vote-shell {
  max-width: 560px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 36px);
  box-shadow: var(--shadow);
}
.vote-header {
  text-align: center;
  margin-bottom: 28px;
}
.q-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
}
.q-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(26px, 4.5vw, 34px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.q-help {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.vote-block {
  margin: 0 0 26px;
  padding: 0;
  border: 0;
}
.vote-block legend {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.field-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
}
.field input,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fffdf9;
  font-weight: 400;
  /* 16px prevents iOS Safari from zooming the page on focus */
  font-size: 16px;
  scroll-margin-top: 84px;
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid rgba(226, 90, 74, 0.35);
  border-color: var(--coral);
}
.field.has-error input,
.field.has-error textarea {
  border-color: #b42318;
  background: #fff5f4;
}
.field small {
  font-weight: 400;
  color: var(--muted);
}

.option-stack,
.option-row {
  display: grid;
  gap: 8px;
}
.option-row {
  grid-template-columns: 1fr;
}
@media (min-width: 520px) {
  .option-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.option-card {
  display: block;
  position: relative;
  cursor: pointer;
}
.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.option-card span {
  display: block;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  font-weight: 500;
  transition: border-color 0.12s, background 0.12s;
}
.option-card strong { font-weight: 700; }
.option-card input:checked + span {
  border-color: var(--ink);
  background: var(--coral-soft);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.option-card input:focus-visible + span {
  outline: 3px solid rgba(226, 90, 74, 0.4);
}
.option-card.compact span {
  text-align: center;
  padding: 12px 10px;
  font-size: 14px;
}

.kids-details {
  margin: -8px 0 26px;
  padding: 16px;
  border-radius: 16px;
  background: #fffdf9;
  border: 1px dashed var(--line);
}

.btn.primary {
  width: 100%;
  margin-top: 4px;
}
.privacy {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.form-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff5f4;
  color: #b42318;
  font-weight: 700;
  font-size: 14px;
}

.success-card h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(26px, 4.5vw, 34px);
  font-weight: 500;
  line-height: 1.15;
}
.success-kicker {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.success-card p { color: #3f3a36; }
.success-signoff {
  margin-top: 24px !important;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.35;
  color: var(--ink) !important;
}
.success-signoff span {
  display: block;
  margin-top: 4px;
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px clamp(20px, 5vw, 48px);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.site-footer strong {
  color: var(--ink);
  letter-spacing: 0.12em;
  font-size: 12px;
}

.sticky-cta {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  margin: 0;
  display: none;
}
.sticky-cta.is-visible { display: inline-flex; }

@media (max-width: 560px) {
  .then-now-grid { gap: 10px; }
  .site-header span { display: none; }
}

/* iPhone SE / short phones: keep the vote CTA on the first screen */
@media (max-height: 740px) {
  .hero {
    padding-top: 28px;
    padding-bottom: 20px;
  }
  .hero h1 { font-size: clamp(34px, 9vw, 48px); }
  .lede { margin-top: 16px; }
  .cta { margin-top: 18px; }
}

@media (min-width: 901px) {
  .sticky-cta { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
