﻿:root {
  --bg: #f3eee6;
  --bg-soft: #eae3d8;
  --card: #fcf8f1;
  --gold: #b88b45;
  --gold-soft: #8f6d36;
  --text: #43392d;
  --muted: #8f7a5b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 5%, #ffffffa3 0%, transparent 30%),
    radial-gradient(circle at 85% 0%, #fff7e8b5 0%, transparent 36%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--text);
  font-family: "Cormorant Garamond", Georgia, serif;
  overflow-x: hidden;
}

.mute-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 30;
  border: 1px solid #c9af87;
  background: #fffcf7;
  color: #6d5634;
  border-radius: 999px;
  padding: 7px 12px;
  font-family: "Cinzel", serif;
  letter-spacing: 0.08em;
  font-size: 0.62rem;
  text-transform: uppercase;
  cursor: pointer;
}

.opening {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: #1a1713;
  transition: opacity 0.9s ease;
}

.opening.hidden {
  opacity: 0;
  pointer-events: none;
}

.opening-image {
  width: min(86vw, 420px);
  border: 1px solid #5e4a2c;
  box-shadow: 0 20px 40px #00000099;
}

.open-btn {
  margin-top: 16px;
  border: 1px solid var(--gold);
  background: #fffdfa;
  color: var(--gold-soft);
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  padding: 10px 18px;
  cursor: pointer;
}

.particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.dot {
  position: absolute;
  bottom: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff0ca 0%, #d7ab60 65%, transparent 100%);
  opacity: 0;
  animation: floatUp linear forwards;
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  20% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(-110vh);
  }
}

.page {
  position: relative;
  z-index: 2;
  width: min(700px, 100%);
  margin: 0 auto;
  padding: 22px 14px 36px;
  opacity: 0;
  transition: opacity 0.9s ease;
}

body.ready .page {
  opacity: 1;
}

.section {
  margin: 14px 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease, transform 700ms ease;
}

body.ready .section {
  opacity: 1;
  transform: translateY(0);
}

body.ready .section:nth-child(1) { transition-delay: 80ms; }
body.ready .section:nth-child(2) { transition-delay: 140ms; }
body.ready .section:nth-child(3) { transition-delay: 200ms; }
body.ready .section:nth-child(4) { transition-delay: 260ms; }
body.ready .section:nth-child(5) { transition-delay: 320ms; }
body.ready .section:nth-child(6) { transition-delay: 380ms; }
body.ready .section:nth-child(7) { transition-delay: 440ms; }
body.ready .section:nth-child(8) { transition-delay: 500ms; }
}

.card {
  background: linear-gradient(180deg, #fffdf8, #f6efe3);
  border: 1px solid #dcc8a6;
  box-shadow: 0 12px 30px #866b3f1f;
  border-radius: 18px;
  padding: 20px;
}

.section-art {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #d6bf97;
  margin-bottom: 12px;
  object-fit: cover;
  object-position: center;
  height: clamp(145px, 25vw, 190px);
  box-shadow: 0 8px 18px #7f64371f;
  filter: saturate(0.9) contrast(1.02) brightness(0.98);
}

.section-art.fallback-art {
  filter: saturate(0.8) contrast(1.02) brightness(0.9);
}

.hero {
  text-align: center;
  padding: 28px 16px;
  border: 1px solid #d7bf93;
  border-radius: 18px;
  background: linear-gradient(175deg, #fffdf8, #f4ecde);
  box-shadow: 0 10px 24px #8a70461f;
}

.hero .kicker {
  margin: 0;
  font-family: "Cinzel", serif;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.64rem;
}

.hero h1 {
  margin: 8px 0 2px;
  font-family: "Great Vibes", cursive;
  font-size: clamp(3rem, 11.5vw, 5rem);
  line-height: 1;
  font-weight: 400;
}

.hero h1 span {
  color: var(--gold);
}

.hero .date {
  margin: 0;
  color: var(--gold-soft);
  font-size: 1.2rem;
}

h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
  color: var(--gold-soft);
  text-align: center;
}

.sub {
  margin: 5px 0 14px;
  color: #d8c099;
  text-align: center;
  font-size: 0.94rem;
}

.count-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.count-grid div {
  text-align: center;
  padding: 9px 6px;
  border-radius: 10px;
  border: 1px solid #d2bb92;
  background: #fffaf2;
}

.count-grid strong {
  display: block;
  font-size: 1.35rem;
  color: var(--gold-soft);
}

.count-grid span {
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9b08a;
}

.detail-lines p {
  margin: 5px 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.detail-lines span {
  width: 86px;
  flex: 0 0 86px;
  font-family: "Cinzel", serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.64rem;
  color: var(--muted);
}

.detail-lines b {
  font-weight: 500;
  line-height: 1.35;
}

.actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.actions a,
button[type="submit"],
.gift-actions button,
.comp-actions button {
  border: 1px solid #c9ae80;
  color: #755a33;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-family: "Cinzel", serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #fffdf7;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.actions a:hover,
button[type="submit"]:hover,
.gift-actions button:hover,
.comp-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px #8f6c361a;
}

.gift-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.gift-actions button {
  flex: 1 1 180px;
}

.steps {
  display: grid;
  gap: 10px;
}

.steps article {
  border: 1px solid #d5bc93;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff9f1;
}

.steps time {
  font-family: "Cinzel", serif;
  color: var(--gold-soft);
  font-size: 0.7rem;
}

.steps h3 {
  margin: 2px 0;
  font-size: 0.98rem;
}

.steps p {
  margin: 0;
  color: #dbc6a3;
  font-size: 0.92rem;
}

form {
  display: grid;
  gap: 10px;
}

.radio-group {
  border: 1px solid #d4bc95;
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: #fffdf8;
}

.radio-group legend {
  color: var(--muted);
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
}

label {
  display: grid;
  gap: 4px;
  font-size: 0.95rem;
}

.companions {
  border: 1px solid #d4bc95;
  border-radius: 10px;
  padding: 10px;
  background: #fffdf8;
}

.companions p {
  margin: 0;
}

.companions .sub-mini {
  margin-top: 2px;
  color: #d1b88f;
}

.comp-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.comp-count {
  margin-top: 8px;
  color: var(--gold-soft);
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
}

select,
input,
textarea {
  border-radius: 10px;
  border: 1px solid #cfb690;
  background: #fffdf8;
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
}

textarea {
  resize: vertical;
}

button[type="submit"] {
  width: 100%;
  margin-top: 4px;
}

.form-status {
  margin: 8px 0 0;
  color: var(--gold-soft);
}

.footer {
  text-align: center;
  color: #d3bb94;
  padding-bottom: 4px;
}

.footer .names {
  margin: 0;
  font-family: "Great Vibes", cursive;
  font-size: 2rem;
}

.credits {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #c7ae86;
}

@media (max-width: 560px) {
  .count-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card {
    padding: 16px;
    border-radius: 14px;
  }

  .section-art {
    height: 145px;
  }

  .hero {
    padding: 24px 14px;
  }

  .detail-lines p {
    flex-direction: column;
    gap: 1px;
  }

  .detail-lines span {
    width: auto;
    flex: none;
  }
}
