:root {
  --lightBackground: #f1f3f7;
  --darkBackground: #a6b2ca;
  --coupleName: #ffffff;
  --menu: #333333;
  --content: #333333;
  --main: #c0d9f8;
  --body: #f7f8f9;
  --alert: #ef5350;
  --formBorder: rgba(49, 45, 36, 0.08);
  --white: #fff;
  --header-h: 72px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Montserrat", sans-serif;
  color: var(--content);
  background: var(--body);
  font-size: 14px;
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }

.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  color: #fff;
}
.site-header.solid {
  position: sticky;
  background: #fff;
  color: var(--menu);
  border-bottom: 1px solid rgba(51, 51, 51, 0.08);
}

.brand {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.nav-item { position: relative; }
.nav-item > button,
.nav-item > a {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.caret { font-size: 8px; opacity: 0.8; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: #fff;
  color: var(--menu);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  padding: 10px 0;
  z-index: 50;
}
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: none;
}
.dropdown a:hover { background: var(--body); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: inherit;
  font-size: 22px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 86vh;
  background: #1a1a1a url("../img/hero.jpg") center 30% / cover no-repeat;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 8vw 10vh;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.18), transparent 45%);
  pointer-events: none;
}
.hero-flag {
  position: relative;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 400;
}
.hero-names {
  position: relative;
  z-index: 1;
  font-family: "Great Vibes", cursive;
  font-size: clamp(56px, 8vw, 92px);
  line-height: 0.95;
  font-weight: 400;
  text-shadow: 0 2px 18px rgba(0,0,0,.18);
}

.section { padding: 72px 24px 24px; }
.section.tight { padding-top: 56px; }
.wrap { max-width: 980px; margin: 0 auto; }
.wrap-wide { max-width: 1120px; margin: 0 auto; }

.kicker {
  text-align: center;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--content);
  margin: 0 0 22px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cd-box {
  width: 92px;
  background: var(--main);
  color: #4a6080;
  text-align: center;
  padding: 18px 8px 12px;
}
.cd-num {
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: #5b7394;
}
.cd-label {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: #6b7c93;
}

.welcome-title {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 36px);
  text-align: center;
  margin: 72px 0 18px;
}
.welcome-sub {
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.8;
}

.divider {
  width: 72px;
  height: 10px;
  margin: 22px auto 48px;
  background: radial-gradient(ellipse at center, #cfe0f6 0%, #cfe0f6 40%, transparent 70%);
  opacity: 0.9;
}

.body-text {
  max-width: 760px;
  margin: 0 auto 48px;
  color: #444;
  font-size: 14px;
}
.body-text p { margin: 0 0 18px; }

.photo-block { max-width: 860px; margin: 0 auto 56px; }
.photo-block img { width: 100%; }

.album-carousel {
  position: relative;
  max-width: 1180px;
  margin: 8px auto 96px;
  padding: 0 56px 48px;
  overflow: hidden;
}
.carousel-stage {
  position: relative;
  height: min(72vh, 620px);
  overflow: visible;
  touch-action: pan-y;
}
.carousel-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(72%, 820px);
  height: 86%;
  margin: 0;
  transform: translate(-50%, -50%) translateX(calc(var(--shift, 0) * 58%)) scale(var(--scale, 0.72));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
  cursor: pointer;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  box-shadow: 0 18px 40px rgba(51, 51, 51, 0.18);
}
.carousel-slide[data-offset="0"] {
  --shift: 0;
  --scale: 1;
  opacity: 1;
  pointer-events: auto;
}
.carousel-slide[data-offset="0"]:hover img {
  transform: scale(1.06);
}
.carousel-slide[data-offset="0"] img {
  transition: transform 0.4s ease;
}
.carousel-slide[data-offset="-1"] { --shift: -1; --scale: 0.72; opacity: 0.55; pointer-events: auto; }
.carousel-slide[data-offset="1"] { --shift: 1; --scale: 0.72; opacity: 0.55; pointer-events: auto; }
.carousel-slide[data-offset="-2"] { --shift: -1.7; --scale: 0.58; opacity: 0.25; }
.carousel-slide[data-offset="2"] { --shift: 1.7; --scale: 0.58; opacity: 0.25; }
.carousel-nav {
  position: absolute;
  top: calc(50% - 24px);
  z-index: 30;
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--main);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.carousel-nav.prev { left: 8px; }
.carousel-nav.next { right: 8px; }
.carousel-nav:hover,
.carousel-nav:focus-visible {
  opacity: 1;
  background: var(--content);
}
@media (hover: none) {
  .carousel-nav { opacity: 0.85; }
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.carousel-dots .dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #cfd6e0;
  cursor: pointer;
}
.carousel-dots .dot.is-active { background: var(--main); width: 22px; border-radius: 8px; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.86);
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button {
  position: absolute;
  top: 16px; right: 20px;
  background: none; border: 0; color: #fff;
  font-size: 32px; cursor: pointer;
}

.page-hero {
  padding: 120px 24px 0;
  text-align: center;
  background: var(--body);
}
.page-hero h1 {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 300;
  font-size: 34px;
  margin: 0 0 18px;
}
.page-hero p {
  max-width: 780px;
  margin: 0 auto;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.9;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 12px 24px 40px;
  max-width: 1180px;
  margin: 0 auto;
}
.card {
  background: #eef2f7;
  padding: 22px 16px 20px;
  text-align: center;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.card .thumb {
  width: 100%;
  height: 170px;
  display: grid;
  place-items: center;
  background: #fff;
  margin-bottom: 16px;
}
.card .thumb img {
  max-height: 150px;
  max-width: 86%;
  object-fit: contain;
  margin: 0 auto;
}
.card h3 {
  font-size: 13px;
  font-weight: 400;
  margin: 0 0 12px;
  line-height: 1.4;
  min-height: 38px;
}
.card .price {
  margin-top: auto;
  font-size: 13px;
  margin-bottom: 16px;
}
.btn {
  display: inline-block;
  background: var(--main);
  color: #fff;
  border: 1px solid var(--main);
  padding: 10px 28px;
  min-width: 132px;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { background: var(--content); border-color: var(--content); }
.btn.ghost {
  background: transparent;
  color: var(--content);
  border: 1px solid var(--main);
}
.center { text-align: center; padding-bottom: 80px; }

.form-wrap {
  background: var(--lightBackground);
  padding: 56px 24px 72px;
}
.form {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form input, .form textarea {
  width: 100%;
  border: 1px solid #d7dbe3;
  background: #fff;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--content);
  outline: none;
}
.form input[type="radio"] {
  width: auto;
  padding: 0;
  border: 0;
  flex-shrink: 0;
}
.form textarea { min-height: 160px; resize: vertical; }
.form .hint { font-size: 11px; color: #888; }
.form .btn { align-self: center; margin-top: 18px; min-width: 180px; }
.form .add-name { align-self: flex-start; margin-top: 0; min-width: 0; padding: 8px 14px; font-size: 13px; }
.name-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.name-row input { flex: 1; }
.name-remove {
  width: 40px;
  height: 40px;
  border: 1px solid #d7dbe3;
  background: #fff;
  color: #888;
  font-size: 22px;
  cursor: pointer;
  flex-shrink: 0;
}
.name-remove:hover { color: var(--alert); border-color: var(--alert); }
.empty-msg {
  text-align: center;
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 300;
  font-size: 26px;
  padding: 48px 24px 80px;
  background: #fff;
}

.site-footer {
  border-top: 1px solid rgba(51,51,51,.2);
  padding: 28px 32px 36px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 16px;
  background: #fff;
  font-size: 12px;
  color: #777;
}
.social { display: flex; gap: 8px; }
.social a {
  width: 32px; height: 32px;
  border: 1px solid #cfd6e0;
  display: grid; place-items: center;
  color: #9aa4b2;
}
.visitors { text-align: center; }
.back-top {
  text-align: center;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-size: 11px;
  padding: 28px 0 8px;
  color: #888;
}
.back-top a { color: inherit; }

.mobile-panel {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 70;
  padding: 24px;
  overflow: auto;
}
.mobile-panel.open { display: block; }
.mobile-panel h4 {
  margin: 24px 0 8px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #999;
}
.mobile-panel a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  font-size: 16px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 12px 18px;
  font-size: 13px;
  display: none;
  z-index: 90;
  max-width: 90vw;
}
.toast.show { display: block; }

.choice {
  display: grid;
  gap: 8px;
}
.choice-opt {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid #d7dbe3;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
}
.choice-opt input { accent-color: #8aa7c9; }
.field-label {
  display: block;
  font-size: 13px;
  color: #666;
}
.field-label input { margin-top: 8px; }
.admin-box {
  padding: 48px 24px 80px;
}
.admin-box h2 {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 300;
  font-size: 26px;
  text-align: center;
  margin: 0 0 8px;
}
.admin-box p { text-align: center; color: #777; }
.admin-form { max-width: 360px; margin-bottom: 24px; }
.rsvp-summary {
  text-align: center;
  margin: 0 0 20px;
}
.table-wrap { overflow-x: auto; }
.rsvp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
.rsvp-table th, .rsvp-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.rsvp-table th {
  font-weight: 500;
  background: var(--lightBackground);
}

@media (max-width: 900px) {
  .store-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .social { justify-content: center; }
  .carousel-slide { width: min(84%, 640px); }
  .carousel-stage { height: min(58vh, 480px); }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
  .site-header { padding: 0 18px; }
  .hero { min-height: 70vh; padding: 0 24px 8vh; }
  .hero-names { font-size: 52px; }
  .cd-box { width: calc(50% - 18px); max-width: 160px; }
  .store-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
  .album-carousel { padding: 0 44px 40px; }
  .carousel-stage { height: 58vw; min-height: 280px; }
  .carousel-slide { width: 86%; height: 90%; }
  .page-hero { padding-top: 100px; }
}
