@font-face { font-family: 'NewYork'; src: url('/assets/fonts/NewYork.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'BrotherSignature'; src: url('/assets/fonts/BrotherSignature.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'SofiaCarolyn'; src: url('/assets/fonts/SofiaCarolyn.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'HolidayFree'; src: url('/assets/fonts/HolidayFree.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'Bitcheese'; src: url('/assets/fonts/Bitcheese.otf') format('opentype'); font-display: swap; }

:root {
  --bg: #fbf8ee;
  --card: #fdfbf3;
  --ink: #3b3128;
  --ink-soft: #54473b;
  --muted: #8a7c6b;
  --purple: #8a7fb0;
  --accent: #6A714F;
  --accent-dark: #565c40;
  --line: #e6d9c4;
  --line-soft: #dcd3bf;
  --field-line: #d9cbb2;
  --shadow: 0 20px 50px -20px rgba(59, 49, 40, 0.25);
  --display: 'Libre Baskerville', Georgia, serif;
  --new-york: 'NewYork', serif;
  --script: 'BrotherSignature', cursive;
  --paper-texture: url('/assets/images/paper-texture.webp');
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background-color: var(--bg); background-image: var(--paper-texture); background-repeat: repeat; background-size: 720px 720px; color: var(--ink); font-family: var(--display); font-size: 17px; line-height: 1.55; }
body { overflow-x: hidden; }
body.intro-locked, body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

.eyebrow { color: var(--accent); font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; }
.eyebrow.center { text-align: center; }
.display { font-family: var(--script); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* COVER */
.cover { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background-color: var(--bg); background-image: var(--paper-texture); background-repeat: repeat; background-size: 720px 720px; transition: transform 1.1s cubic-bezier(.65,0,.35,1), opacity 1s ease; }
.cover.hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.cover-inner { width: min(900px, calc(100% - 48px)); padding: 0 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cover-logo { width: 64px; height: auto; object-fit: contain; margin-bottom: 28px; }
.cover .eyebrow { font-family: var(--new-york); letter-spacing: 0.32em; color: var(--purple); }
.cover-names { font-family: var(--new-york); font-size: clamp(40px, 7vw, 72px); color: #1c1c1a; margin: 22px 0 0; line-height: 1.05; font-weight: 400; }
.cover-names span { color: var(--purple); }
.cover-for { font-family: var(--new-york); font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--purple); margin-top: 30px; }
.cover-guest { font-family: var(--script); font-size: clamp(30px, 4.6vw, 44px); color: #1c1c1a; margin-top: 8px; }
.cover-btn { margin-top: 44px; font-family: var(--new-york); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; background: none; border: 1px solid #1c1c1a; color: #1c1c1a; padding: 16px 38px; cursor: pointer; white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.cover-btn:hover, .cover-btn:focus-visible { background: var(--accent); color: var(--bg); border-color: var(--accent); outline: none; }

/* MUSIC PILL */
.music { position: fixed; top: 22px; right: 22px; z-index: 900; display: inline-flex; align-items: center; gap: 10px; padding: 11px 22px; border: 1px solid #e4d7c2; border-radius: 999px; background: #fffaf0; box-shadow: 0 8px 24px -10px rgba(59, 49, 40, 0.4); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.music:hover, .music:focus-visible { background: var(--accent); border-color: var(--accent); outline: none; }
.music:hover .lbl, .music:focus-visible .lbl { color: var(--bg); }
.music:hover .bars span, .music:focus-visible .bars span { background: var(--bg); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.bars span { width: 3px; height: 9px; background: var(--accent); border-radius: 2px; transition: background 0.2s; }
.music.on .bars span:nth-child(1) { animation: eqPulse 0.9s ease-in-out infinite; }
.music.on .bars span:nth-child(2) { animation: eqPulse 0.9s ease-in-out infinite 0.15s; }
.music.on .bars span:nth-child(3) { animation: eqPulse 0.9s ease-in-out infinite 0.3s; }
@keyframes eqPulse { 0%, 100% { height: 6px; } 50% { height: 16px; } }
.lbl { font-family: var(--display); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); transition: color 0.2s; }

/* HERO */
.hero { position: relative; max-width: 760px; margin: 0 auto; padding: 0 28px 48px; text-align: center; }
.hero-opening-stage { position: relative; isolation: isolate; }
.hero-video-clip { position: absolute; inset: 0 auto 0 50%; transform: translateX(-50%); width: 100vw; height: 100%; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-video-clip video { position: absolute; inset: 0 auto 0 50%; transform: translateX(-50%); width: 100%; height: 100%; object-fit: cover; }
.hero-opening { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 90px 0 48px; }

.countdown-card, .prologue-card { width: 100%; max-width: 560px; box-sizing: border-box; margin: 0 auto 34px; background: var(--card); border-radius: 24px; padding: 34px 32px; box-shadow: var(--shadow); }
.countdown-card { text-align: center; }
.countdown-card .eyebrow { margin-bottom: 12px; }
.countdown-num { font-family: var(--display); font-size: clamp(48px, 9vw, 84px); font-weight: 500; color: var(--accent); letter-spacing: 0.02em; line-height: 1; }
.countdown-lbl { font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.prologue-card { font-family: var(--display); font-size: clamp(18px, 2.2vw, 22px); color: #6b5f4f; line-height: 1.5; text-align: center; }
.prologue-card em { font-style: normal; font-weight: 600; color: #6B704E; }

.joda { position: relative; display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 50px; flex-wrap: wrap; }
.joda-text { font-family: var(--script); font-size: clamp(36px, 5.4vw, 54px); color: #1c1c1a; line-height: 1.05; text-align: left; }
.joda-img { width: 140px; height: 140px; object-fit: cover; mix-blend-mode: multiply; }

/* PHOTO BAND */
.photoband { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); }
.photoband-inner { width: 100%; height: 460px; overflow: hidden; }
.photoband-inner img { width: 100%; height: 100%; object-fit: cover; }

/* VENUE */
.venue-section { max-width: 600px; margin: 0 auto; padding: 60px 28px 0; }
.venue-card { width: 100%; max-width: 560px; box-sizing: border-box; margin: 0 auto; border-radius: 24px; padding: 44px 32px 34px; box-shadow: var(--shadow); text-align: center; background-color: var(--card); }
.venue-card .eyebrow { margin-bottom: 16px; }
.venue-date { font-family: var(--display); font-size: clamp(30px, 4vw, 38px); letter-spacing: 0.04em; color: var(--ink); margin-bottom: 26px; }
.venue-name { font-family: var(--display); font-size: clamp(20px, 2.6vw, 25px); font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.venue-loc { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 30px; }
.venue-illustration { width: 100%; max-width: 420px; height: auto; object-fit: contain; margin: 0 auto 30px; }
.map-btn { display: inline-block; text-align: center; font-family: var(--display); font-size: 15px; letter-spacing: 0.06em; color: var(--ink); text-decoration: none; border: 1px solid var(--ink); border-radius: 999px; padding: 13px 30px; text-transform: uppercase; transition: background 0.2s, color 0.2s; }
.venue-card .map-btn { display: block; padding: 13px; }
.map-btn:hover, .map-btn:focus-visible { background: var(--accent); color: var(--bg); border-color: var(--accent); outline: none; }

/* ITINERARY */
.itinerary-section { margin: 0 auto; padding: 60px 28px 40px; max-width: 600px; }
.itinerary-card { width: 100%; max-width: 900px; box-sizing: border-box; margin: 0 auto; padding: 44px 34px; position: relative; }
.itinerary-row { display: flex; flex-direction: column; align-items: center; gap: 0; position: relative; }
.itinerary-line { display: none; }
.itinerary-item { padding: 26px 0; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 1; }
.itinerary-icon { width: 164px; height: 164px; border-radius: 100%; background: transparent; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; overflow: hidden; }
.itinerary-icon img { width: 164px; height: 164px; object-fit: cover; }
.itinerary-time { font-size: 20px; letter-spacing: 0.08em; color: var(--ink); margin-bottom: 4px; }
.itinerary-title { font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }

@media (min-width: 860px) {
  .itinerary-section { max-width: 960px; }
  .itinerary-row { flex-direction: row; align-items: flex-start; justify-content: center; gap: 48px; }
  .itinerary-item { padding: 0; flex: 0 1 180px; }
  .itinerary-line { display: block; position: absolute; top: 82px; left: 10%; right: 10%; height: 1px; background: var(--line-soft); z-index: 0; }
  .venue-name { white-space: nowrap; }
}

/* DETAILS ACCORDION */
.details-section { max-width: 600px; margin: 0 auto; padding: 20px 28px 120px; }
.details-heart { text-align: center; font-size: 24px; color: var(--accent); margin-bottom: 22px; }
.accordion-item { border-top: 1px solid var(--line); }
.accordion-item-last { border-bottom: 1px solid var(--line); }
.accordion-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: none; padding: 22px 0; cursor: pointer; text-align: left; border-radius: 12px; }
.accordion-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.accordion-label { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); transition: color 0.2s; }
.accordion-label img { width: 48px; height: 48px; object-fit: contain; }
.accordion-icon { font-size: 18px; color: var(--accent); transition: color 0.2s; }
.accordion-panel { border-radius: 14px; padding: 0 20px 24px; }
.accordion-panel[hidden] { display: none; }
.accordion-panel p { font-size: 16px; line-height: 1.7; color: var(--accent); margin: 0 0 16px; }
.accordion-panel p:last-child { margin-bottom: 0; }
.dresscode-guide { width: 100%; border-radius: 10px; display: block; }
.copy-btn { margin: 0 0 16px; display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--accent); border-radius: 8px; padding: 8px 14px; cursor: pointer; color: var(--accent); font-size: 13px; letter-spacing: 0.08em; transition: background 0.2s, color 0.2s; }
.copy-btn:hover, .copy-btn:focus-visible { background: var(--accent); color: var(--bg); outline: none; }

/* PLAYLIST */
.playlist-section { max-width: 600px; margin: 0 auto; padding: 24px 28px 100px; }
.playlist-card { width: 100%; max-width: 560px; box-sizing: border-box; margin: 0 auto; background: var(--card); border-radius: 24px; padding: 38px 32px; box-shadow: var(--shadow); text-align: center; }
.playlist-icon { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 20px; }
.playlist-card p { font-family: var(--display); font-size: clamp(20px, 2.6vw, 24px); color: var(--ink); line-height: 1.4; margin: 0 0 24px; }

/* RSVP CTA */
.rsvp-cta-section { position: relative; }
.rsvp-cta-inner { max-width: 600px; margin: 0 auto; padding: 20px 28px 70px; text-align: center; }
.rsvp-cta-inner h2 { font-family: var(--display); font-size: clamp(28px, 4vw, 38px); font-weight: 400; line-height: 1.4; margin: 0 0 26px; }
.dot-divider { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 26px; }
.dot-divider span { width: 70px; height: 1px; background: #cbbba0; display: block; }
.dot-divider span.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.rsvp-cta-inner .lead { font-size: 16px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 40px; }
.cta-btn { font-family: var(--display); font-size: 14px; letter-spacing: 0.05em; background: var(--accent); border: 1px solid var(--accent); color: var(--bg); padding: 13px 26px; border-radius: 999px; cursor: pointer; transition: background 0.2s; }
.cta-btn:hover, .cta-btn:focus-visible { background: var(--accent-dark); outline: none; }
.rsvp-cta-section .photoband-inner { width: 100%; height: 420px; margin-top: 0; left: 0; transform: none; position: relative; }

footer { text-align: center; padding: 70px 28px 60px; }
footer .display { font-family: var(--script); font-size: 32px; margin-bottom: 10px; }
footer .when { font-size: 15px; letter-spacing: 0.08em; color: var(--muted); }

/* MODAL / RSVP FORM */
.modal-bg { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(30, 24, 18, 0.55); opacity: 0; visibility: hidden; transition: 0.3s ease; }
.modal-bg.open { opacity: 1; visibility: visible; }
.modal { position: relative; background: var(--card); border-radius: 24px; max-width: 460px; width: 100%; max-height: 88vh; overflow: auto; padding: 40px 34px; box-shadow: var(--shadow); transform: translateY(18px); transition: transform 0.3s ease; }
.modal-bg.open .modal { transform: translateY(0); }
.modal-x { position: absolute; top: 18px; right: 18px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; transition: background 0.2s, color 0.2s; }
.modal-x:hover, .modal-x:focus-visible { background: var(--accent); color: var(--bg); outline: none; }
.modal .lead.center { text-align: center; font-size: 16px; color: #54473b; margin: 0 0 26px; }
.modal .eyebrow.center { letter-spacing: 0.2em; margin-bottom: 10px; }
.modal .eyebrow em { font-style: italic; }
.field { margin-top: 20px; margin-bottom: 0; }
.field label { display: block; font-size: 15px; margin-bottom: 10px; color: var(--ink); }
.field input, .field textarea, .field select { width: 100%; font-family: var(--display); font-size: 16px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--field-line); background: #fff; box-sizing: border-box; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #9c2f2f; }
.field textarea { resize: vertical; }
.field .optional { color: var(--muted); font-size: 13px; }
.field-hint { margin: 6px 0 10px; color: #6b5f52; font-size: 13px; line-height: 1.5; }
.field-error { margin: 8px 0 0; color: #9c2f2f; font-size: 13px; line-height: 1.4; }
.seg { display: flex; gap: 12px; }
.seg button { flex: 1; font-family: var(--display); font-size: 16px; padding: 12px; border-radius: 12px; cursor: pointer; border: 1px solid var(--accent); background: transparent; color: var(--accent); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.seg button:last-child { border-color: #cbbba0; color: #6b5f52; }
.seg button:hover, .seg button:focus-visible { background: var(--accent); color: var(--bg); border-color: var(--accent); outline: none; }
.seg button.on { background: var(--accent); color: #fff; }
.seg button.on:last-child { background: #6b5f52; border-color: #6b5f52; }
.count-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 8px; }
.count-options button { min-height: 46px; border-radius: 10px; border: 1px solid var(--field-line); background: #fff; cursor: pointer; font-family: var(--display); font-size: 18px; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.count-options button:hover, .count-options button:focus-visible { border-color: var(--accent); outline: none; }
.count-options button.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.submit-btn { width: 100%; font-family: var(--display); font-size: 18px; background: var(--accent); color: var(--bg); border: none; padding: 15px; border-radius: 999px; cursor: pointer; margin-top: 26px; transition: background 0.2s; }
.submit-btn:hover, .submit-btn:focus-visible { background: var(--accent-dark); outline: none; }
.submit-btn:disabled { cursor: wait; opacity: 0.7; }
.cta-btn:disabled { cursor: not-allowed; opacity: 0.5; }
.confirmed { text-align: center; }
.confirmed .display { font-family: var(--script); color: var(--accent); font-size: 48px; }
.confirmed p { margin: 20px auto; color: var(--ink-soft); line-height: 1.6; }
.form-error { margin: 16px 0 0; color: #9c2f2f; font-size: 14px; }
.check-row { display: flex !important; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

@media (max-width: 680px) {
  .music { top: 14px; right: 14px; padding: 9px 14px; }
  .lbl { display: none; }
  .hero { padding: 0 20px 60px; }
  .hero-opening { padding: 72px 0 36px; }
  .countdown-card, .prologue-card, .venue-card, .playlist-card { padding: 28px 22px; }
  .itinerary-card { padding: 30px 16px; }
  .details-section { padding: 16px 20px 90px; }
  .rsvp-cta-inner { padding: 16px 20px 50px; }
  .photoband-inner, .rsvp-cta-section .photoband-inner { height: 320px; }
  .modal { padding: 34px 22px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
