/* ====================================================================
   MODERN EDITORIAL WEDDING INVITATION — STYLES
   Edit the variables below to re-theme colors, fonts and spacing.
==================================================================== */

:root {
  /* -- Palette -------------------------------------------------- */
  --ink:        #0E0D0F;   /* page background, warm near-black   */
  --panel:      #181616;   /* card / row surfaces                */
  --ivory:      #F3EDE3;   /* primary text                       */
  --ivory-soft: #B4AA9B;   /* secondary text                     */
  --wine:       #9C3049;   /* garnet accent                      */
  --wine-soft:  #6E2334;
  --brass:      #C9A66B;   /* metallic accent                    */
  --brass-soft: rgba(201, 166, 107, 0.35);
  --line:       rgba(243, 237, 227, 0.14);

  /* -- Type ------------------------------------------------------ */
  --font-display: 'Fraunces', serif;
  --font-mono:    'Space Mono', monospace;
  --font-body:    'Archivo', sans-serif;

  --max-w: 760px;
  --section-pad: clamp(64px, 10vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ====================== MUSIC TOGGLE ====================== */

.music-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(24,22,22,0.7);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory-soft);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.music-toggle:hover { color: var(--brass); border-color: var(--brass-soft); }

.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars i { width: 2.5px; background: currentColor; display: inline-block; height: 4px; border-radius: 1px; }
.music-toggle[aria-pressed="true"] .bars i { animation: bar 0.9s ease-in-out infinite; }
.bars i:nth-child(1) { animation-delay: 0s; }
.bars i:nth-child(2) { animation-delay: 0.2s; }
.bars i:nth-child(3) { animation-delay: 0.4s; }
@keyframes bar { 0%, 100% { height: 4px; } 50% { height: 12px; } }

/* ====================== SCROLL PROGRESS ====================== */

#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--wine), var(--brass));
  z-index: 95;
  transition: width 0.1s linear;
}

/* ====================== LANDING / COUNTDOWN HERO ====================== */

.landing {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(156,48,73,0.16), transparent 60%),
    var(--ink);
  overflow: hidden;
}

.landing__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 28px;
}

.countdown {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(6px, 2.5vw, 18px);
  margin-bottom: 40px;
}
.countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.countdown__unit span {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.4rem, 11vw, 5.2rem);
  line-height: 1;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
  animation: digitIn 0.6s ease both;
}
.countdown__unit small {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-soft);
}
.countdown__colon {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 6vw, 3rem);
  color: var(--wine);
  transform: translateY(-8px);
  opacity: 0.8;
}

@keyframes digitIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing__reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}
.landing__reveal.is-visible { opacity: 1; transform: translateY(0); }

.landing__names {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 7vw, 3.4rem);
  margin: 0 0 6px;
  color: var(--ivory);
}
.landing__names span { color: var(--brass); padding: 0 10px; font-style: normal; }

.landing__tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-soft);
  margin: 0 0 8px;
}

.landing__date {
  font-size: 0.9rem;
  color: var(--ivory-soft);
  margin: 0 0 28px;
}

.scroll-cue {
  display: inline-block;
  width: 22px;
  height: 34px;
  border: 1px solid var(--brass-soft);
  border-radius: 12px;
  position: relative;
  margin-bottom: 56px;
}
.scroll-cue span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 4px;
  background: var(--brass);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: scrolldown 1.6s ease-in-out infinite;
}
@keyframes scrolldown {
  0% { top: 6px; opacity: 1; }
  70% { top: 20px; opacity: 0; }
  100% { top: 20px; opacity: 0; }
}

/* Marquee ticker */
.marquee {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 12px 0;
  white-space: nowrap;
}
.marquee__track {
  display: inline-block;
  animation: marquee 22s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory-soft);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ====================== SHARED SECTION STYLES ====================== */

.invite { position: relative; z-index: 1; }

section, footer.footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--section-pad) 24px;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 40px;
  color: var(--ivory);
}

/* ====================== PROLOGUE ====================== */

.prologue__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.8vw, 1.55rem);
  color: var(--ivory);
  max-width: 600px;
  margin: 0 auto;
}

/* ====================== PROFILES ====================== */

.profiles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 6vw, 60px);
  flex-wrap: wrap;
}
.profile { flex: 1 1 220px; max-width: 260px; }
.profile__index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--brass);
  margin-bottom: 10px;
}
.profile__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.1rem;
  margin: 0 0 10px;
  color: var(--ivory);
}
.profile__meta { font-size: 0.86rem; color: var(--ivory-soft); }
.profiles__rule {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  min-height: 80px;
}

/* ====================== SCHEDULE ====================== */

.schedule__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  margin-bottom: 36px;
}
.schedule__row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.schedule__time {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--brass);
  min-width: 58px;
}
.schedule__divider { width: 1px; height: 32px; background: var(--line); }
.schedule__body { display: flex; flex-direction: column; gap: 2px; }
.schedule__body strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--ivory);
}
.schedule__body em { font-style: normal; font-size: 0.85rem; color: var(--ivory-soft); }

/* ====================== BUTTONS ====================== */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 30px;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:active { transform: scale(0.97); }

.btn--solid {
  background: var(--brass);
  color: #1a1410;
  border-color: var(--brass);
}
.btn--solid:hover { background: #dcbb85; }

.btn--outline {
  background: transparent;
  color: var(--ivory);
  border-color: var(--line);
}
.btn--outline:hover { border-color: var(--brass); color: var(--brass); }

.btn--full { width: 100%; }

/* ====================== VENUE ====================== */

.venue__name { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 6px; color: var(--ivory); }
.venue__address { color: var(--ivory-soft); margin: 0 0 24px; }

/* ====================== RSVP ====================== */

.rsvp__note { color: var(--ivory-soft); max-width: 440px; margin: 0 auto 32px; }

.rsvp-form {
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field label, .field legend {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-soft);
  margin-bottom: 8px;
  padding: 0;
}

.field input[type="text"],
.field input[type="number"],
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ivory);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 2px;
  transition: border-color 0.25s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brass);
}

.field--radio { border: none; padding: 0; margin: 0; }
.field--radio label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ivory);
  margin-right: 20px;
}

.rsvp-confirmation {
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--brass-soft);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--brass);
}

.rsvp__contact { margin-top: 28px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ivory-soft); }

/* ====================== FOOTER ====================== */

.footer__names {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  margin: 0 0 20px;
  color: var(--ivory);
}
.footer__names span { color: var(--brass); padding: 0 6px; font-style: normal; }

.scroll-top {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--brass);
  cursor: pointer;
  font-size: 1rem;
}
.scroll-top:hover { border-color: var(--brass); }

/* ====================== FOCUS VISIBILITY ====================== */

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* ====================== RESPONSIVE ====================== */

@media (max-width: 480px) {
  .music-toggle .music-toggle__label { display: none; }
  .profiles__rule { width: 60%; height: 1px; min-height: 0; }
  .profiles { flex-direction: column; }
}
