﻿:root {
  --bg: #f8f6f3;
  --bg-alt: #ffffff;
  --text: #26221f;
  --muted: #7a726a;
  --line: #e4ddd4;
  --accent: #8f7560;
  --accent-deep: #6e5948;
  --card: rgba(255, 255, 255, 0.75);
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 22px 60px rgba(35, 24, 14, 0.12);
  --container: min(1080px, 90vw);
  --hero-image: url("images/1.jpg");
  --section-bg-1: url("images/backgrounds/1.jpg");
  --section-bg-2: url("images/backgrounds/2.jpg");
  --section-bg-3: url("images/backgrounds/3.jpg");
  --section-bg-4: url("images/backgrounds/4.jpg");
  --section-bg-5: url("images/backgrounds/5.jpg");
  --section-bg-6: url("images/backgrounds/6.jpg");
}

/* Optional dark theme: add class .theme-dark to body */
body.theme-dark {
  --bg: #191714;
  --bg-alt: #22201c;
  --text: #f4f1ed;
  --muted: #b7afa8;
  --line: #39342f;
  --card: rgba(39, 35, 31, 0.72);
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Manrope", sans-serif;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

h1,
h2,
.hero-date,
.location-name,
.message-wide p,
.closing p {
  font-family: "Playfair Display", serif;
  font-weight: 400;
  letter-spacing: 0.03em;
}

h1,
h2,
p {
  margin: 0;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.section {
  padding: clamp(72px, 10vw, 140px) 0;
  text-align: center;
}

.section h2 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: 28px;
  font-weight: 400;
  letter-spacing: 0.045em;
  line-height: 1.15;
  color: #3a342f;
}

.section p {
  color: var(--text);
  max-width: 820px;
  margin-inline: auto;
}

/* Wedding-themed section backgrounds (except hero/location which already have custom backgrounds). */
.intro,
.calendar-section,
.message-wide,
.gallery,
.countdown,
.dress-code,
.gifts,
.rsvp,
.closing {
  background-image:
    linear-gradient(to bottom, var(--section-overlay-from), var(--section-overlay-to)),
    var(--section-photo);
  background-size: cover;
  background-position: var(--section-bg-pos, center);
  background-repeat: no-repeat;
}

.intro {
  --section-photo: var(--section-bg-1);
  --section-overlay-from: rgba(248, 246, 243, 0.34);
  --section-overlay-to: rgba(248, 246, 243, 0.5);
  --section-bg-pos: center top;
}

.calendar-section {
  --section-photo: var(--section-bg-5);
  --section-overlay-from: rgba(248, 246, 243, 0.3);
  --section-overlay-to: rgba(248, 246, 243, 0.46);
  --section-bg-pos: center;
}

.message-wide {
  --section-photo: var(--section-bg-4);
  --section-overlay-from: rgba(248, 246, 243, 0.28);
  --section-overlay-to: rgba(248, 246, 243, 0.44);
  --section-bg-pos: center;
}

.gallery {
  --section-photo: var(--section-bg-3);
  --section-overlay-from: rgba(248, 246, 243, 0.36);
  --section-overlay-to: rgba(248, 246, 243, 0.54);
  --section-bg-pos: center;
}

.countdown {
  --section-photo: var(--section-bg-2);
  --section-overlay-from: rgba(248, 246, 243, 0.32);
  --section-overlay-to: rgba(248, 246, 243, 0.5);
  --section-bg-pos: center;
}

.dress-code {
  --section-photo: var(--section-bg-5);
  --section-overlay-from: rgba(248, 246, 243, 0.32);
  --section-overlay-to: rgba(248, 246, 243, 0.52);
  --section-bg-pos: center top;
}

.gifts {
  --section-photo: var(--section-bg-1);
  --section-overlay-from: rgba(248, 246, 243, 0.34);
  --section-overlay-to: rgba(248, 246, 243, 0.52);
  --section-bg-pos: center;
}

.rsvp {
  --section-photo: var(--section-bg-6);
  --section-overlay-from: rgba(248, 246, 243, 0.34);
  --section-overlay-to: rgba(248, 246, 243, 0.5);
  --section-bg-pos: center top;
}

.closing {
  --section-photo: var(--section-bg-5);
  --section-overlay-from: rgba(248, 246, 243, 0.3);
  --section-overlay-to: rgba(248, 246, 243, 0.46);
  --section-bg-pos: center;
}

body.theme-dark .intro {
  --section-overlay-from: rgba(25, 23, 20, 0.5);
  --section-overlay-to: rgba(25, 23, 20, 0.62);
}

body.theme-dark .calendar-section {
  --section-overlay-from: rgba(25, 23, 20, 0.5);
  --section-overlay-to: rgba(25, 23, 20, 0.62);
}

body.theme-dark .message-wide {
  --section-overlay-from: rgba(25, 23, 20, 0.46);
  --section-overlay-to: rgba(25, 23, 20, 0.6);
}

body.theme-dark .gallery {
  --section-overlay-from: rgba(25, 23, 20, 0.52);
  --section-overlay-to: rgba(25, 23, 20, 0.64);
}

body.theme-dark .countdown {
  --section-overlay-from: rgba(25, 23, 20, 0.5);
  --section-overlay-to: rgba(25, 23, 20, 0.62);
}

body.theme-dark .dress-code {
  --section-overlay-from: rgba(25, 23, 20, 0.5);
  --section-overlay-to: rgba(25, 23, 20, 0.64);
}

body.theme-dark .gifts {
  --section-overlay-from: rgba(25, 23, 20, 0.5);
  --section-overlay-to: rgba(25, 23, 20, 0.62);
}

body.theme-dark .rsvp {
  --section-overlay-from: rgba(25, 23, 20, 0.5);
  --section-overlay-to: rgba(25, 23, 20, 0.62);
}

body.theme-dark .closing {
  --section-overlay-from: rgba(25, 23, 20, 0.5);
  --section-overlay-to: rgba(25, 23, 20, 0.62);
}

.invitation-badge {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  backdrop-filter: blur(3px);
  box-shadow: 0 8px 30px rgba(30, 21, 14, 0.12);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.invitation-badge.visible {
  opacity: 1;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  padding: 40px 22px;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20, 14, 10, 0.55), rgba(15, 11, 8, 0.65));
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #f4eee7;
}

.hero-kicker {
  margin-bottom: 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #ded5cc;
}

.hero h1 {
  font-size: clamp(2.4rem, 9vw, 5rem);
  margin-bottom: 10px;
}

.hero-date {
  font-size: clamp(1.1rem, 4.2vw, 1.6rem);
  margin-bottom: 32px;
}

.hero-link {
  display: inline-block;
  color: #f8f3ee;
  text-decoration: none;
  border: 1px solid rgba(248, 243, 238, 0.7);
  padding: 12px 28px;
  border-radius: 999px;
  transition: transform 0.28s ease, background-color 0.28s ease;
}

.hero-link:hover {
  transform: translateY(-2px);
  background-color: rgba(248, 243, 238, 0.12);
}

.intro p {
  font-size: clamp(1rem, 3.2vw, 1.25rem);
  color: var(--muted);
}

.calendar-card {
  width: min(760px, 100%);
  margin: 0 auto;
  background: var(--card);
  backdrop-filter: blur(3px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 40px);
  box-shadow: var(--shadow);
}

.calendar-month {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 24px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
  font-size: 0.95rem;
}

.calendar-grid span {
  border-radius: 10px;
  padding: 8px 3px;
}

.calendar-grid>span:nth-child(-n + 7) {
  color: var(--muted);
  font-weight: 600;
}

.calendar-grid .muted {
  opacity: 0;
  pointer-events: none;
}

.highlight-day {
  background: rgba(143, 117, 96, 0.16);
  color: var(--accent-deep);
  font-weight: 700;
  border: 1px solid rgba(143, 117, 96, 0.4);
}

.highlight-day small {
  display: block;
  font-size: 0.7rem;
  margin-top: 2px;
}

.message-wide p {
  font-size: clamp(1.2rem, 4vw, 2rem);
  letter-spacing: 0.08em;
}

.mini-album {
  width: min(920px, 100%);
  margin: 8px auto 0;
  padding: clamp(8px, 1.6vw, 12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 239, 232, 0.78));
  box-shadow: var(--shadow);
  outline: none;
  touch-action: pan-y;
}

.mini-album:focus-visible {
  box-shadow: 0 0 0 3px rgba(143, 117, 96, 0.24), var(--shadow);
}

.album-viewport {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 255, 255, 0.45), transparent 58%),
    #f3ede5;
}

.album-track {
  display: flex;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.album-slide {
  min-width: 100%;
  margin: 0;
  padding: clamp(8px, 1.6vw, 12px);
  display: grid;
  place-items: center;
}

.album-slide img {
  width: auto;
  max-width: 100%;
  max-height: clamp(260px, 48vw, 500px);
  object-fit: contain;
  border-radius: 12px;
  background: #f8f5f1;
  box-shadow: 0 10px 26px rgba(28, 20, 13, 0.14);
}

.album-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.album-meta {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.album-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.album-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(87, 80, 74, 0.35);
  padding: 0;
  cursor: pointer;
  transition: transform 0.22s ease, background-color 0.22s ease;
}

.album-dot.active {
  background: var(--accent-deep);
  transform: scale(1.2);
}

.album-counter {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.album-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(28, 20, 13, 0.16);
  transition: transform 0.22s ease, background-color 0.22s ease;
}

.album-arrow:hover {
  transform: translateY(-1px);
  background: #fdfbf8;
}

.timer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 700px;
  margin: 34px auto 0;
}

.time-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(40, 26, 12, 0.09);
}

.time-box span {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  line-height: 1;
}

.time-box small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.7rem;
}

.location-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 38px);
  width: min(700px, 100%);
  margin-inline: auto;
  box-shadow: var(--shadow);
}

.location {
  position: relative;
  isolation: isolate;
  background-image:
    linear-gradient(to bottom, rgba(248, 246, 243, 0.78), rgba(248, 246, 243, 0.9)),
    url("images/florian.webp");
  background-size: cover;
  background-position: center;
}

body.theme-dark .location {
  background-image:
    linear-gradient(to bottom, rgba(25, 23, 20, 0.82), rgba(25, 23, 20, 0.9)),
    url("images/florian.webp");
}

.location-place {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--muted);
}

.location-name {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  margin: 10px 0 12px;
}

.btn {
  display: inline-block;
  margin-top: 20px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font: inherit;
  padding: 12px 26px;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
}

.map-wrap {
  margin-top: 26px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.map-wrap iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
}

.palette {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}

.palette span {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--color);
  border: 1px solid rgba(10, 10, 10, 0.08);
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.35);
}

.gifts p {
  color: var(--muted);
  font-size: clamp(0.98rem, 2.7vw, 1.12rem);
}

.rsvp-note {
  color: var(--muted);
}

.rsvp-form {
  width: min(640px, 100%);
  margin: 28px auto 0;
  text-align: left;
  display: grid;
  gap: 10px;
}

.rsvp-form label {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 8px;
}

.guests-field {
  display: grid;
  gap: 10px;
  transition: opacity 0.28s ease, max-height 0.28s ease, margin 0.28s ease;
  max-height: 140px;
  opacity: 1;
  overflow: hidden;
}

.guests-field.is-hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.additional-guests-wrap {
  display: grid;
  gap: 10px;
  transition: opacity 0.28s ease, max-height 0.28s ease, margin 0.28s ease;
  max-height: 420px;
  opacity: 1;
  overflow: hidden;
}

.additional-guests-wrap.is-hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.additional-guests {
  display: grid;
  gap: 10px;
}

.guest-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guest-row input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
}

.child-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.child-flag input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.additional-guests input.invalid,
#guestName.invalid {
  border-color: #c95a5a;
  outline: 2px solid rgba(201, 90, 90, 0.2);
}

.rsvp-form input,
.rsvp-form select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
}

.rsvp-form input:focus,
.rsvp-form select:focus {
  outline: 2px solid rgba(143, 117, 96, 0.25);
  border-color: var(--accent);
}

.form-status {
  min-height: 22px;
  margin-top: 4px;
  color: var(--accent-deep);
}

.hidden-frame {
  display: none;
}

.firebase-tip {
  width: min(640px, 100%);
  margin: 18px auto 0;
  text-align: left;
  color: var(--muted);
}

.firebase-tip summary {
  cursor: pointer;
}

.closing p {
  font-size: clamp(1.4rem, 4.6vw, 2.4rem);
  max-width: 760px;
}

.footer {
  padding: 34px 10px 42px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (min-width: 700px) {
  .album-slide img {
    max-height: 560px;
  }

  .timer {
    gap: 20px;
  }

  .time-box {
    padding: 20px 12px;
  }
}

@media (max-width: 700px) {
  .mini-album {
    width: 100%;
    padding: 10px;
    border-radius: 18px;
  }

  .album-slide img {
    max-height: clamp(240px, 72vw, 420px);
  }
}

@media (max-width: 420px) {
  .album-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .album-controls {
    gap: 8px;
    margin-top: 10px;
  }

  .album-dots {
    gap: 6px;
  }

  .album-counter {
    font-size: 0.72rem;
  }

  .hero-link {
    width: 100%;
    max-width: 260px;
  }

  .calendar-grid {
    gap: 5px;
    font-size: 0.84rem;
  }

  .calendar-grid span {
    padding: 6px 2px;
  }
}