:root {
  --invite-primary: #8f5a3c;
  --invite-secondary: #183b36;
  --invite-bg: #fff8ef;
  --invite-paper: #ffffff;
  --invite-ink: #24211d;
  --invite-muted: #746b61;
  --invite-line: #eadfce;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--invite-ink);
  background: var(--invite-bg);
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  background: #1d2724;
  transition: transform 0.7s ease, opacity 0.7s ease;
}

.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 26, 23, 0.58), rgba(18, 26, 23, 0.88)),
    var(--cover-image, url("/assets/media/wedding-cover.jpg")) center/cover;
}

.cover.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.cover-card {
  position: relative;
  width: min(560px, 100%);
  text-align: center;
}

.cover-card p {
  color: rgba(255, 255, 255, 0.84);
}

.cover-title,
.names {
  font-family: "Playfair Display", Georgia, serif;
}

.cover-title {
  margin: 0;
  font-size: clamp(44px, 11vw, 76px);
  line-height: 0.98;
}

.guest-name {
  display: inline-block;
  margin: 12px 0 22px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--invite-secondary);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  background: #fff;
  color: var(--invite-secondary);
  border-color: var(--invite-line);
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 80px 20px;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(18, 26, 23, 0.34), rgba(18, 26, 23, 0.84)),
    var(--cover-image, url("/assets/media/wedding-cover.jpg")) center/cover fixed;
}

.hero-inner {
  width: min(760px, 100%);
}

.hero-kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.theme-preview-name:empty {
  display: none;
}

.theme-preview-name {
  display: inline-flex;
  margin: 0 0 16px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 850;
}

.names {
  margin: 0;
  font-size: clamp(52px, 13vw, 112px);
  line-height: 0.9;
  letter-spacing: 0;
}

.event-date {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 10px;
  width: min(540px, 100%);
  margin: 34px auto 0;
}

.count-box {
  padding: 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.count-box strong {
  display: block;
  font-size: 28px;
}

.count-box span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.section {
  padding: 76px 20px;
}

.section.alt {
  background: #fff;
}

.container {
  width: min(980px, 100%);
  margin: 0 auto;
}

.section-head {
  width: min(720px, 100%);
  margin: 0 auto 30px;
  text-align: center;
}

.section-head span {
  color: var(--invite-primary);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section h2 {
  margin: 8px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

.section-head p {
  color: var(--invite-muted);
}

.hidden {
  display: none !important;
}

.quran-card {
  width: min(760px, 100%);
  margin: 0 auto 24px;
  padding: 26px;
  border: 1px solid var(--invite-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(143, 90, 60, 0.08), rgba(24, 59, 54, 0.05)),
    #fff;
  text-align: center;
  box-shadow: 0 18px 50px rgba(56, 35, 18, 0.08);
}

.quran-card span {
  color: var(--invite-primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quran-card p {
  margin: 10px auto 0;
  color: var(--invite-ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.5;
}

.couple-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.person-card,
.event-card,
.story-card,
.gift-card,
.wish-card,
.rsvp-card {
  border: 1px solid var(--invite-line);
  border-radius: 8px;
  background: var(--invite-paper);
  box-shadow: 0 18px 50px rgba(56, 35, 18, 0.08);
}

.person-card {
  padding: 28px;
  text-align: center;
}

.person-card h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 34px;
}

.person-card p {
  margin: 10px 0 0;
  color: var(--invite-muted);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.event-card,
.story-card,
.gift-card,
.wish-card,
.rsvp-card {
  padding: 24px;
}

.event-card h3,
.story-card h3,
.gift-card h3 {
  margin: 0 0 8px;
}

.event-card p,
.story-card p,
.gift-card p,
.wish-card p {
  margin: 7px 0;
  color: var(--invite-muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #eee;
  box-shadow: 0 16px 38px rgba(56, 35, 18, 0.1);
}

.gallery img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.story-list,
.gift-grid,
.wish-list {
  display: grid;
  gap: 14px;
}

.story-list {
  position: relative;
}

.story-card {
  position: relative;
  overflow: hidden;
}

.story-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--invite-primary);
}

.gift-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--invite-muted);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--invite-line);
  border-radius: 8px;
  background: #fff;
  color: var(--invite-ink);
  padding: 12px 13px;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.rsvp-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
}

.notice {
  margin-top: 12px;
  color: var(--invite-primary);
  font-weight: 850;
}

.footer {
  padding: 34px 20px;
  background: #171d1b;
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--invite-secondary);
  color: #fff;
  cursor: pointer;
}

.empty,
.error {
  padding: 22px;
  border: 1px solid var(--invite-line);
  border-radius: 8px;
  background: #fff;
  color: var(--invite-muted);
}

.error {
  color: #a33122;
}

@media (max-width: 760px) {
  .countdown,
  .couple-grid,
  .event-grid,
  .gallery,
  .gift-grid,
  .rsvp-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    background-attachment: scroll;
  }

  .gallery img {
    height: 230px;
  }
}

