/* ---------- Christmas wedding theme ---------- */
/* Palette: Pine Green, Olive Green, Mauve, Plum, Gold, Ivory, Black */
:root {
  --pine: #1e3d2a;
  --olive: #6f7d4f;
  --mauve: #c3a3b4;
  --mauve-tint: #efe1e7;
  --plum: #4a2545;
  --plum-dark: #371a33;
  --gold: #b3924e;
  --ivory: #fbf9f4;
  --black: #1c1917;
  --cream: #f3eee2;
  --serif-display: "Playfair Display", Georgia, serif;
  --serif-body: "Cormorant Garamond", Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--ivory);
  color: var(--black);
  font-family: var(--serif-body);
  font-size: 1.3rem;
  line-height: 1.6;
}

/* ---------- Sticky nav ---------- */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
  color: var(--ivory);
}
.topnav.scrolled {
  background: rgba(251, 249, 244, 0.96);
  box-shadow:
    0 1px 0 var(--mauve-tint),
    0 4px 14px rgba(28, 25, 23, 0.08);
  color: var(--black);
}
.brand {
  font-family: var(--serif-display);
  font-size: 1.5rem;
  text-decoration: none;
  color: inherit;
  letter-spacing: 0.05em;
}
.brand .amp {
  color: var(--gold);
  font-style: italic;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--serif-body);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  padding: 0.45rem 0.9rem;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover {
  color: var(--gold);
}
.nav-links a.active {
  border-bottom-color: var(--gold);
  color: var(--gold);
}
.nav-links .nav-rsvp {
  border: 1px solid var(--gold);
  margin-left: 0.5rem;
}
.nav-links .nav-rsvp:hover {
  background: var(--gold);
  color: var(--ivory);
}
.nav-links .nav-rsvp.active {
  border-bottom: 1px solid var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  background:
    linear-gradient(
      rgba(20, 32, 24, 0.55),
      rgba(30, 61, 42, 0.45) 60%,
      rgba(55, 26, 51, 0.6)
    ),
    url("../images/proposal.jpg") center 35% / cover no-repeat;
  border-bottom: 3px solid var(--gold);
  color: var(--ivory);
}
.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  text-decoration: none;
  font-size: 1.6rem;
  animation: cue-bounce 2s ease-in-out infinite;
}
@keyframes cue-bounce {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 8px);
  }
}
.hero-eyebrow {
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 1rem;
  color: #f2ddc4;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "\2744"; /* snowflake */
  color: var(--gold);
  font-style: normal;
  margin: 0 0.6rem;
}
.hero-names {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(3.2rem, 9vw, 6rem);
  margin: 0.6rem 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.hero-names .amp {
  color: var(--gold);
  font-style: italic;
}
.hero-date {
  font-size: 1.55rem;
  color: var(--ivory);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.hero-ornament {
  margin-top: 1.4rem;
  color: var(--gold);
  letter-spacing: 0.9em;
  font-size: 0.9rem;
}

/* ---------- Countdown ---------- */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.4rem, 2vw, 1.25rem);
  margin: 2.6rem auto 0;
  max-width: 760px;
  padding: 0 0.5rem;
}
.count-block {
  min-width: 0;
  padding: clamp(0.9rem, 3vw, 1.6rem) 0.25rem clamp(0.7rem, 2.5vw, 1.2rem);
  background: rgba(28, 25, 23, 0.35);
  border: 1px solid rgba(179, 146, 78, 0.65);
  backdrop-filter: blur(3px);
}
.count-num {
  display: block;
  font-family: var(--serif-display);
  font-size: clamp(1.9rem, 9vw, 5.5rem);
  line-height: 1.1;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}
.count-label {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(0.7rem, 2.6vw, 1rem);
  letter-spacing: clamp(0.1em, 0.6vw, 0.24em);
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Layout ---------- */
html {
  scroll-behavior: smooth;
}
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.page-section {
  padding: 4rem 0 2rem;
  scroll-margin-top: 3.5rem;
}
.divider {
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.9em;
  font-size: 0.95rem;
  padding: 1rem 0;
  opacity: 0.8;
}

.section-title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 2.4rem;
  text-align: center;
  margin: 2.5rem 0 1.75rem;
  color: var(--pine);
}
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: var(--gold);
  margin: 0.6rem auto 0;
}
.center {
  text-align: center;
}
.muted {
  color: #6f6a63;
}
.hidden {
  display: none !important;
}
a {
  color: var(--plum);
}

/* ---------- Info cards ---------- */
.detail-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.card {
  background: #fff;
  border: 1px solid var(--mauve-tint);
  border-top: 3px solid var(--gold);
  padding: 1.75rem;
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(28, 25, 23, 0.12);
}
.card-icon {
  width: 36px;
  height: 36px;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.card h2 {
  font-family: var(--serif-display);
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 0.75rem;
}
.card-big {
  font-family: var(--serif-display);
  font-size: 1.65rem;
  margin-bottom: 0.4rem;
}

/* ---------- Order of events timeline ---------- */
.events-timeline {
  list-style: none;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  padding-left: 3rem;
}
.events-timeline::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 10px;
  bottom: 26px;
  width: 2px;
  background: var(--gold);
  opacity: 0.55;
}
.events-timeline li {
  position: relative;
  padding-bottom: 1.9rem;
}
.events-timeline li:last-child {
  padding-bottom: 0.4rem;
}
.events-timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.85rem - 8px);
  top: 0.55rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ivory);
  border: 3px solid var(--gold);
}
.event-time {
  font-weight: 600;
  color: var(--plum);
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}
.events-timeline h3 {
  font-family: var(--serif-display);
  font-size: 1.4rem;
  color: var(--pine);
  margin: 0.1rem 0;
}

/* ---------- Map & parking ---------- */
.map-embed {
  border: 1px solid var(--mauve-tint);
  padding: 0.5rem;
  background: #fff;
}
.parking {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}
.parking h3 {
  font-family: var(--serif-display);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--pine);
}
.parking ul {
  margin: 0.75rem 0 0 1.25rem;
}
.parking li {
  margin-bottom: 0.4rem;
}

.parking-map svg {
  width: 100%;
  height: auto;
  border: 1px solid var(--mauve-tint);
  background: #eef1ea;
}
.parking-map .road {
  fill: #d9d2c3;
}
.parking-map .drive {
  fill: #e6e0d2;
}
.parking-map .venue {
  fill: var(--plum);
}
.parking-map .lot {
  fill: #fff;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}
.parking-map .accessible {
  fill: #dbe6f2;
  stroke: #7a93b5;
}
.parking-map .arrow {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.5;
}
.parking-map .label {
  fill: #fff;
  font: 600 20px var(--serif-display);
  text-anchor: middle;
}
.parking-map .label-p {
  fill: var(--gold);
  font: 700 44px var(--serif-display);
  text-anchor: middle;
}
.parking-map .label-small {
  fill: var(--black);
  font: 15px var(--serif-body);
  text-anchor: middle;
}
.parking-map .label-tiny {
  fill: var(--black);
  font: 11px var(--serif-body);
  text-anchor: middle;
}
.parking-map .label-road {
  fill: var(--black);
  font: 600 18px var(--serif-body);
  text-anchor: middle;
  letter-spacing: 0.2em;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.about-block {
  text-align: center;
}
.about-block h3,
.about-story h3 {
  font-family: var(--serif-display);
  font-size: 1.7rem;
  margin: 1rem 0 0.4rem;
  color: var(--pine);
}
.about-story {
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Portrait cards ---------- */
.portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--mauve-tint);
  border-bottom: 4px solid var(--gold);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.portrait:hover img {
  transform: scale(1.04);
}

/* ---------- Proposal book ---------- */
.book-heading {
  font-family: var(--serif-display);
  font-size: 1.7rem;
  text-align: center;
  color: var(--pine);
  margin: 3rem 0 1.5rem;
}
.book-wrap {
  max-width: 1040px;
  margin: 0 auto;
}

.book {
  width: 100%;
  aspect-ratio: 3 / 2; /* two-page spread: two 3:4 pages side by side */
}

@media (max-width: 600px) {
  .book-wrap {
    max-width: 420px;
  }
  .book {
    aspect-ratio: 3 / 4;
  } /* single page on phones */
}

.book-page {
  height: 100%;
  background: var(--ivory);
  border: 1px solid var(--gold);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.book-page img {
  width: 100%;
  height: 80%;
  object-fit: cover;
  display: block;
}

.back-cover {
  background: var(--pine);
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--ivory);
}
.book-end {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1.5rem;
}
.book-end-date {
  color: var(--gold);
  letter-spacing: 0.2em;
}

.page-caption {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 1.25rem;
  font-style: italic;
  color: var(--pine);
}

.page-cover {
  background: linear-gradient(160deg, var(--pine), var(--plum-dark));
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  text-align: center;
  color: var(--ivory);
  padding: 2rem;
}
.cover-eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold);
}
.cover-title {
  font-family: var(--serif-display);
  font-size: 2.2rem;
}
.cover-ornament {
  color: var(--gold);
  letter-spacing: 0.8em;
}
.cover-hint {
  font-style: italic;
  color: var(--mauve);
  margin-top: 1.5rem;
}

.page-video {
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--black);
  color: var(--ivory);
}
.page-video .video-icon {
  font-size: 3rem;
  color: var(--gold);
  border: 2px solid var(--gold);
  border-radius: 50%;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 8px;
}
.page-video .page-caption {
  flex: none;
  color: var(--ivory);
}

.book-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.btn-book {
  font-family: var(--serif-body);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--plum);
  color: var(--plum);
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}
.btn-book:hover:not(:disabled) {
  background: var(--plum);
  color: var(--ivory);
}
.btn-book:disabled {
  opacity: 0.35;
  cursor: default;
}
.book-indicator {
  color: #6f6a63;
  font-style: italic;
  min-width: 6.5rem;
  text-align: center;
}

/* ---------- RSVP ---------- */
#rsvp {
  background: var(--cream);
  /* full-bleed band beyond the centered main column */
  box-shadow: 0 0 0 100vmax var(--cream);
  clip-path: inset(0 -100vmax);
}
#rsvp .section-title {
  margin-top: 1rem;
}

.rsvp-box {
  background: #fff;
  border: 1px solid var(--mauve-tint);
  padding: 2rem;
  max-width: 640px;
  margin: 1.5rem auto;
}
.rsvp-box h3 {
  font-family: var(--serif-display);
  color: var(--pine);
}
.rsvp-box label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

#guest-search {
  width: 100%;
  font-family: var(--serif-body);
  font-size: 1.3rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--gold);
  background: var(--ivory);
  margin-top: 0.5rem;
}
#guest-search:focus {
  outline: 2px solid var(--olive);
}

.lookup-results {
  list-style: none;
  margin-top: 0.75rem;
}
.lookup-results li {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--cream);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.lookup-results li:hover {
  background: var(--mauve-tint);
}
.lookup-results .household {
  color: #6f6a63;
  font-style: italic;
}

.member-card {
  border: 1px solid var(--cream);
  border-left: 3px solid var(--olive);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.member-card h4 {
  font-family: var(--serif-display);
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.attend-toggle {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.6rem;
}
.attend-toggle label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.member-details {
  margin-top: 0.5rem;
}
.member-details .form-row {
  margin-bottom: 0.6rem;
}

.form-row {
  margin-bottom: 1rem;
}
.form-row select,
.form-row input,
.form-row textarea {
  width: 100%;
  font-family: var(--serif-body);
  font-size: 1.25rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cfc7b6;
  background: var(--ivory);
}
.form-row select:focus,
.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--olive);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
}
.btn-primary {
  font-family: var(--serif-body);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--plum);
  color: var(--ivory);
  border: none;
  padding: 0.8rem 2rem;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--plum-dark);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}
.btn-link {
  background: none;
  border: none;
  font-family: var(--serif-body);
  font-size: 1.2rem;
  color: var(--pine);
  cursor: pointer;
  text-decoration: underline;
}

.firebase-warning {
  max-width: 640px;
  margin: 1rem auto;
  padding: 0.75rem 1rem;
  background: #fdf3e3;
  border: 1px solid var(--gold);
  font-size: 0.95rem;
  text-align: center;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--mauve-tint);
  color: #6f6a63;
  font-style: italic;
}
.footer .snow {
  color: var(--gold);
  font-style: normal;
}

@media (max-width: 720px) {
  .parking {
    grid-template-columns: 1fr;
  }
  .rsvp-box {
    padding: 1.25rem;
  }
  .book-wrap {
    max-width: 420px;
  }
  .cover-title {
    font-size: 1.7rem;
  }
  .topnav {
    padding: 0.7rem 0.9rem;
  }
  .nav-links a {
    padding: 0.4rem 0.5rem;
    font-size: 0.92rem;
  }
}

/* ---------- Scroll reveal & entrance animations ---------- */
.hero-inner {
  animation: hero-in 1.2s ease-out both;
}
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-inner,
  .reveal {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
  .scroll-cue {
    animation: none;
  }
}
