:root {
  --bg: #f4f8ff;
  --paper: #fbfdff;
  --ink: #16253a;
  --accent: #7b1e3a;
  --accent-deep: #0d2240;
  --gold: #c9a24d;
  --line: #d6e2f0;
  --shadow: 0 20px 50px rgba(13, 34, 64, 0.12);
  --green: #1f4d3a;
  --sky: #9ec8f2;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(158, 200, 242, 0.45) 0, transparent 40%),
    radial-gradient(circle at 80% 5%, rgba(201, 162, 77, 0.25) 0, transparent 35%),
    radial-gradient(circle at 30% 85%, rgba(31, 77, 58, 0.18) 0, transparent 45%),
    linear-gradient(180deg, #f7fbff 0%, #e7f0fb 55%, #dfe9f7 100%);
  line-height: 1.5;
}

.hero {
  min-height: 90vh;
  padding: 1.5rem 1rem 4rem;
  display: grid;
  grid-template-rows: auto 1fr;
}

.site-nav {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  color: var(--accent-deep);
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
}

.nav-links a {
  color: var(--accent-deep);
  text-decoration: none;
  font-size: 0.95rem;
}

.hero-content {
  max-width: 900px;
  margin: 3rem auto 0;
  text-align: center;
  animation: rise 700ms ease forwards;
}

.eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 700;
}

h1,
h2 {
  font-family: "Cormorant Garamond", serif;
  margin: 0.3rem 0 0.5rem;
}

h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.subtitle {
  max-width: 580px;
  margin: 0 auto 1.5rem;
  font-size: 1.15rem;
}

.hero-buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(0.95);
}

.btn-secondary {
  color: var(--accent-deep);
  border-color: var(--sky);
  background: #eef6ff;
}

.countdown {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.progress-bar-container {
  width: 100%;
  max-width: 300px;
  height: 6px;
  background-color: var(--line);
  border-radius: 999px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(13, 34, 64, 0.08);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sky) 0%, var(--gold) 100%);
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s ease;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.3rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
  opacity: 0;
  transform: translateY(16px);
  animation: rise 650ms ease forwards;
}

.panel:nth-child(2) {
  animation-delay: 120ms;
}

.panel:nth-child(3) {
  animation-delay: 240ms;
}

.panel:nth-child(4) {
  animation-delay: 360ms;
}

.section-head p {
  margin-top: 0;
}

.rsvp-form {
  display: grid;
  gap: 0.8rem;
}

.rsvp-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  border: 1px solid #c8d7ea;
  border-radius: 12px;
  padding: 0.75rem 0.8rem;
  font: inherit;
  background: #ffffff;
}

.form-status {
  min-height: 1.2rem;
  margin: 0;
  font-weight: 600;
}

.registry-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.registry-grid a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  background: #f4f8ff;
  transition: transform 160ms ease;
}

.registry-grid a:hover {
  transform: translateY(-3px);
}

.details-content {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1rem;
}

.detail-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  background: #f9fcff;
}

.detail-item h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
  color: var(--accent-deep);
}

.detail-item p {
  margin: 0.5rem 0;
}

.detail-item .btn {
  margin-top: 0.8rem;
  display: inline-block;
}

.faq-content {
  display: grid;
  gap: 1.2rem;
  margin-top: 1rem;
}

.faq-item {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
}

.faq-item h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  margin: 0 0 0.5rem 0;
  color: var(--accent);
}

.faq-item p {
  margin: 0;
  line-height: 1.6;
}

.gallery-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.photo {
  border: 0;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
}

.photo img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 240ms ease;
}

.photo:hover img {
  transform: scale(1.04);
}

#lightbox {
  border: 0;
  padding: 0.6rem;
  border-radius: 16px;
  background: #f8fbff;
  max-width: min(94vw, 900px);
}

#lightbox::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

#lightbox img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 10px;
}

#close-lightbox {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  float: right;
  margin-bottom: 0.4rem;
}

footer {
  text-align: center;
  padding: 0.5rem 1rem 2rem;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 780px) {
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .nav-links {
    gap: 0.7rem;
    flex-wrap: wrap;
  }

  .photo img {
    height: 190px;
  }

  .details-content {
    grid-template-columns: 1fr;
  }
}
