:root {
  --bg: #fdfaf7;
  --text: #2f2a2b;
  --muted: #6e6668;
  --accent: #9a6d6f;
  --accent-dark: #855a5c;
  --card: #ffffff;
  --soft: #f5efeb;
  --ring: rgba(154, 109, 111, 0.28);
  --shadow: 0 12px 30px rgba(52, 30, 31, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

img {
  max-width: 100%;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(253, 250, 247, 0.72);
  border-bottom: 1px solid rgba(47, 42, 43, 0.08);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-list {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.nav-list a:hover {
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(76, 51, 53, 0.5), rgba(100, 72, 74, 0.35)),
    radial-gradient(circle at 20% 20%, #c59b9e, transparent 40%),
    radial-gradient(circle at 80% 30%, #d7c7b9, transparent 45%),
    linear-gradient(140deg, #6b4e50, #a78385 50%, #dbcbbd 100%);
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 16, 16, 0.3), rgba(26, 16, 16, 0.25));
}

.hero-content {
  position: relative;
  text-align: center;
  color: #fff;
  padding-top: 108px;
  padding-bottom: 42px;
}

.hero-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  margin: 0;
}

.hero-date {
  margin-top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9em;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 12px rgba(20, 13, 14, 0.5);
}
.hero-date::before,
.hero-date::after {
  content: '';
  display: block;
  width: clamp(30px, 6vw, 70px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55));
}
.hero-date::after {
  background: linear-gradient(90deg, rgba(255,255,255,0.55), transparent);
}

.letter-scene {
  display: grid;
  width: min(760px, 92%);
  margin: 1.25rem auto 0.95rem;
  outline: none;
  cursor: pointer;
}

.hero-letter {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  transition: opacity 0.55s ease;
}

.hero-letter--closed {
  box-shadow:
    0 26px 46px rgba(23, 15, 16, 0.34),
    0 6px 14px rgba(23, 15, 16, 0.22);
  opacity: 1;
  align-self: end;
}

.hero-letter--open {
  opacity: 0;
  filter: drop-shadow(0 22px 40px rgba(23, 15, 16, 0.28)) drop-shadow(0 5px 12px rgba(23, 15, 16, 0.18));
  align-self: end;
}

.letter-scene:hover .hero-letter--closed,
.letter-scene.is-open .hero-letter--closed {
  opacity: 0;
}

.letter-scene:hover .hero-letter--open,
.letter-scene.is-open .hero-letter--open {
  opacity: 1;
}

.countdown {
  margin: 1.8rem auto 2.1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 0.8rem;
  max-width: 520px;
}

.countdown div {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  padding: 0.8rem;
}

.countdown span {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.countdown small {
  font-size: 0.78rem;
  opacity: 0.9;
}

.section {
  padding: clamp(3.4rem, 7vw, 6rem) 0;
}

.soft {
  background: var(--soft);
}

.accent {
  background: linear-gradient(180deg, #f8f3f0 0%, #fdf9f6 100%);
}

h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.7rem, 3.3vw, 2.3rem);
  margin-top: 0;
  margin-bottom: 1rem;
}

h3 {
  margin: 0 0 0.55rem;
  font-size: 1.1rem;
}

p {
  margin-top: 0;
  color: var(--muted);
}

/* ── Save-the-date calendar ─────────────────────────────────────────────────── */
.cal-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.cal-kicker {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: rgba(154, 109, 111, 0.1);
  border: 1px solid rgba(154, 109, 111, 0.22);
  border-radius: 999px;
  padding: 0.22rem 0.8rem;
  margin: 0;
}

.cal-card {
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 2.4rem 3rem 2rem;
  width: min(560px, 100%);
}

.cal-header {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
}

.cal-month {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.2rem;
  color: var(--text);
}

.cal-year {
  font-size: 1.25rem;
  color: var(--muted);
  font-weight: 500;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  text-align: center;
}

.cal-day-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 0.6rem;
}

.cal-num {
  font-size: 1.05rem;
  color: var(--text);
  width: 44px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin: 0 auto;
}

.cal-today {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 4px 16px rgba(154, 109, 111, 0.45);
  animation: cal-pulse 2.4s ease-in-out infinite;
}

@keyframes cal-pulse {

  0%,
  100% {
    box-shadow: 0 4px 16px rgba(154, 109, 111, 0.45);
  }

  50% {
    box-shadow: 0 4px 28px rgba(154, 109, 111, 0.7), 0 0 0 8px rgba(154, 109, 111, 0.12);
  }
}

.cal-footer {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
  color: var(--accent-dark);
  text-align: center;
  margin: 1.6rem 0 0;
}

/* ── Two-column grid ─────────────────────────────────────────────────────────── */
.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  align-items: start;
}

#location .grid-two {
  align-items: stretch;
}

#location .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.location-photo {
  width: 100%;
  margin: 0.25rem 0 0.9rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  align-self: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

.card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.note {
  border-top: 4px solid #d8bfaf;
}

.timeline {
  display: grid;
  gap: 0.9rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.9rem;
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(38, 24, 24, 0.09);
}

.timeline-item time {
  font-weight: 700;
  color: var(--accent-dark);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.ghost {
  border-color: #d8c1c3;
  color: var(--accent-dark);
}

.btn.ghost:hover {
  border-color: var(--accent-dark);
}

.palette {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 1rem 0;
}

.palette img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}

.small {
  font-size: 0.92rem;
}

.pinterest-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin-top: 0.9rem;
  padding: 0.42em 0.9em;
  border: 1.5px solid rgba(167, 100, 100, 0.35);
  border-radius: 999px;
  font-size: 0.88rem;
  color: #9e5a5a;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pinterest-link:hover {
  background: rgba(167, 100, 100, 0.1);
  border-color: rgba(167, 100, 100, 0.6);
  color: #7a3f3f;
}

.pinterest-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.faq p {
  margin-bottom: 0.8rem;
}

.faq-expanded {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.faq-item {
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  box-shadow: 0 6px 18px rgba(38, 24, 24, 0.09);
}

.faq-item p {
  margin: 0;
}

.qr-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.4rem;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.qr-link:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.qr-img {
  width: 390px;
  height: 390px;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 3px solid rgba(154, 109, 111, 0.22);
}

.qr-caption {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: 0.01em;
}

.contacts-section {
  background:
    radial-gradient(circle at 10% 10%, rgba(193, 154, 156, 0.16), transparent 35%),
    radial-gradient(circle at 90% 20%, rgba(221, 199, 184, 0.34), transparent 40%),
    linear-gradient(180deg, #fdf8f5 0%, #f8f1ed 100%);
}

.contacts-wrap {
  border-radius: 24px;
  padding: clamp(1.2rem, 2.2vw, 2rem);
  border: 1px solid rgba(154, 109, 111, 0.2);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 14px 34px rgba(79, 52, 53, 0.12);
}

.contacts-head {
  max-width: 700px;
}

.contacts-kicker {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: rgba(154, 109, 111, 0.12);
  border: 1px solid rgba(154, 109, 111, 0.22);
  border-radius: 999px;
  padding: 0.2rem 0.66rem;
}

.contacts-grid {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.contact-item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  border-radius: 16px;
  padding: 1rem;
  background: #fff;
  border: 1px solid rgba(154, 109, 111, 0.16);
}

.contact-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f7e8e4;
  font-size: 1rem;
}

.contact-item h3 {
  margin-bottom: 0.2rem;
}

.contact-item a {
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(133, 90, 92, 0.28);
}

.contact-item a:hover {
  border-bottom-color: rgba(133, 90, 92, 0.86);
}

.contact-item p {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
}

.contact-strong {
  color: var(--text);
  font-weight: 600;
}

.form {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--text);
  font-weight: 500;
}

input,
select,
textarea {
  border: 1px solid #e3d7d8;
  border-radius: 11px;
  padding: 0.72rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.guest-row {
  display: grid;
  gap: 0.45rem;
}

.guest-row label {
  font-weight: 500;
  color: var(--text);
  display: grid;
  gap: 0.45rem;
}

.guest-input-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.guest-input-wrap input {
  flex: 1;
}

.btn-remove-guest {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e3d7d8;
  background: #fff;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: 0.15s ease;
  padding: 0;
}

.btn-remove-guest:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: #fdf0f0;
}

.btn-add-guest {
  width: 100%;
  font-size: 0.92rem;
  padding: 0.6rem 1rem;
  border: 1.5px dashed #d8c1c3;
  border-radius: 11px;
  background: transparent;
  color: var(--accent-dark);
  transition: 0.2s ease;
}

.btn-add-guest:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(154, 109, 111, 0.06);
}

.btn-add-guest:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.form-message {
  min-height: 1.2rem;
  margin: 0;
  font-size: 0.95rem;
}

.form-message.error {
  color: #a02c2c;
}

/* ── Success state ─────────────────────────────────────────────────────────── */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.8rem 1rem 1.4rem;
  gap: 0.6rem;
  animation: fadeUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

.form-success-emoji {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.form-success-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  margin: 0;
  color: var(--text);
}

.form-success--yes .form-success-title {
  color: #5a7a50;
}

.form-success--no .form-success-title {
  color: #7a5e50;
}

.form-success-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin: 0.2rem 0;
}

.success-name {
  background: rgba(154, 109, 111, 0.1);
  border: 1px solid rgba(154, 109, 111, 0.22);
  border-radius: 999px;
  padding: 0.22rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.form-success-body {
  font-size: 0.97rem;
  color: var(--muted);
  max-width: 340px;
  margin: 0.2rem 0 0;
  line-height: 1.55;
}

.footer {
  padding: 1.8rem 0 2.2rem;
  text-align: center;
}

.footer p {
  margin: 0;
  color: #807475;
}

@media (max-width: 820px) {
  .nav-list {
    gap: 0.8rem;
    font-size: 0.95rem;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    overflow: visible;
  }

  .qr-img {
    width: 100%;
    height: auto;
  }

  .hero-content {
    padding-top: 92px;
    padding-bottom: 30px;
  }

  .nav {
    min-height: 62px;
  }

  .nav-list li:nth-child(1),
  .nav-list li:nth-child(2) {
    display: none;
  }

  .letter-scene {
    width: 96%;
    margin: 1rem auto 0.8rem;
  }

  .hero-letter {
    border-radius: 10px;
  }


  .letter-note {
    width: 90%;
    bottom: 38%;
    padding: 0.58rem 0.72rem;
  }

  .letter-date {
    font-size: 0.95rem;
    margin-bottom: 0.28rem;
  }

  .letter-title {
    font-size: 0.92rem;
  }

  .letter-text {
    font-size: 0.81rem;
    line-height: 1.34;
  }

  .countdown {
    gap: 0.5rem;
  }

  .countdown div {
    padding: 0.62rem 0.4rem;
  }

  /* Calendar: shrink cells and padding to fit narrow screens */
  .cal-card {
    padding: 1.4rem 1rem 1.2rem;
  }

  .cal-month {
    font-size: 1.5rem;
  }

  .cal-num {
    width: 34px;
    font-size: 0.82rem;
  }

  .cal-day-name {
    font-size: 0.7rem;
  }

  .cal-grid {
    gap: 0.15rem;
  }

}