﻿:root {
  --olive-900: #1f3a2e;
  --olive-700: #3f5f50;
  --olive-500: #6f8d7d;
  --gold-700: #9d7a34;
  --gold-500: #c4a35f;
  --gold-300: #ddc690;
  --paper: #fbfaf5;
  --mist: #eff4ef;
  --ink: #2b3d34;
  --muted: #54685d;
  --line: #d9caa5;
  --shadow: 0 20px 44px rgba(24, 42, 34, 0.16);
}

* {
  box-sizing: border-box;
}

*::selection {
  background: rgba(196, 163, 95, 0.28);
  color: #1f352b;
}

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

body {
  min-height: 100vh;
  font-family: "Cormorant Garamond", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 8%, rgba(111, 141, 125, 0.2) 0%, transparent 35%),
    radial-gradient(circle at 90% 90%, rgba(196, 163, 95, 0.2) 0%, transparent 35%),
    linear-gradient(170deg, #f5f7f2 0%, #fdfcf8 52%, #f4f2eb 100%);
  line-height: 1.55;
  position: relative;
  isolation: isolate;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(245, 247, 242, 0.78), rgba(253, 252, 248, 0.8)),
    url("https://images.unsplash.com/photo-1519225421980-715cb0215aed?auto=format&fit=crop&w=2200&q=80")
      center / cover no-repeat;
  transform: scale(1.04);
  animation: bgDrift 24s ease-in-out infinite alternate;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  opacity: 0.45;
  animation: floatShape 14s ease-in-out infinite;
}

.bg-shape--left {
  width: 260px;
  height: 260px;
  top: -70px;
  left: -90px;
  background: radial-gradient(circle at 35% 35%, rgba(63, 95, 80, 0.35), rgba(63, 95, 80, 0.05));
}

.bg-shape--right {
  width: 300px;
  height: 300px;
  bottom: -90px;
  right: -110px;
  background: radial-gradient(circle at 35% 35%, rgba(196, 163, 95, 0.34), rgba(196, 163, 95, 0.04));
  animation-delay: -6s;
}

.page {
  width: min(1060px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
  display: grid;
  gap: 1.5rem;
}

.hero,
.story,
.form-section {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(247, 248, 242, 0.94));
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.6rem, 3vw, 3rem);
  text-align: center;
  transition: transform 0.45s ease, box-shadow 0.45s ease, border-color 0.35s ease;
}

.hero:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 52px rgba(24, 42, 34, 0.2);
  border-color: #cfba8a;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  z-index: 0;
}

.hero::before {
  top: -110px;
  left: -90px;
  background: radial-gradient(circle at 60% 60%, rgba(111, 141, 125, 0.28), rgba(111, 141, 125, 0.02));
}

.hero::after {
  right: -85px;
  bottom: -110px;
  background: radial-gradient(circle at 40% 40%, rgba(196, 163, 95, 0.23), rgba(196, 163, 95, 0.02));
}

.hero > * {
  position: relative;
  z-index: 1;
}

.ornament {
  width: min(260px, 72%);
  height: 1px;
  margin: 0.3rem auto 0.7rem;
  background: linear-gradient(to right, transparent, rgba(157, 122, 52, 0.8), transparent);
  position: relative;
}

.ornament::before,
.ornament::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(157, 122, 52, 0.85);
  transform: translateY(-50%);
}

.ornament::before {
  left: 32%;
}

.ornament::after {
  right: 32%;
}

.eyebrow {
  margin: 0;
  color: var(--gold-700);
  letter-spacing: 0.28rem;
  font-weight: 500;
  font-size: 0.9rem;
  font-family: "Cinzel", serif;
}

.hero h1,
.story h2,
.form-section h2 {
  line-height: 1.1;
}

.hero h1 {
  margin: 0.55rem 0 1rem;
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.3rem, 8vw, 6.1rem);
  font-weight: 400;
  color: var(--olive-900);
}

.event-date {
  margin: -0.2rem 0 0.9rem;
  font-family: "Cinzel", serif;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  letter-spacing: 0.2rem;
  color: var(--gold-700);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.event-date--scroll {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  letter-spacing: 0;
  line-height: 1.2;
}

.date-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.date-sep {
  display: inline-block;
  transform: translateY(-1px);
  margin: 0 0.18rem;
}

.digit-column {
  position: relative;
  width: 0.75em;
  height: 1em;
  overflow: hidden;
  display: inline-block;
}

.digit-track {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(0);
}

.digit-track span {
  height: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1em;
}

.lead {
  margin: 0.65rem auto;
  width: min(75ch, 100%);
  font-size: clamp(1.15rem, 2.5vw, 1.34rem);
  color: var(--muted);
}

.lead--highlight {
  font-style: italic;
  color: var(--olive-700);
}

.hero-subtitle {
  margin: 1.15rem 0 0.35rem;
  font-family: "Cinzel", serif;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  letter-spacing: 0.04rem;
  color: var(--gold-700);
}

.lead--compact {
  margin-top: 0.3rem;
  width: min(78ch, 100%);
}

.countdown {
  margin: 1.2rem auto 0.6rem;
  width: min(760px, 100%);
  padding: 0;
  text-align: center;
}

.countdown__label {
  margin: 0 0 0.25rem;
  font-family: "Cinzel", serif;
  letter-spacing: 0.22rem;
  color: var(--gold-700);
  font-size: 0.82rem;
}

.countdown__grid {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.9rem;
}

.countdown__item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0;
}

.countdown__value {
  display: inline-block;
  font-family: "Cinzel", serif;
  font-size: clamp(1.15rem, 2.8vw, 1.7rem);
  color: var(--olive-900);
}

.countdown__unit {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16rem;
  color: var(--muted);
  text-transform: uppercase;
}

.countdown__note {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.countdown--footer {
  margin-bottom: 1.4rem;
}

@media (max-width: 720px) {
  .countdown__grid {
    gap: 0.35rem 0.7rem;
  }
}
.btn {
  display: inline-block;
  margin-top: 1rem;
  background: linear-gradient(120deg, var(--gold-300), var(--gold-500));
  color: #2f3f37;
  text-decoration: none;
  border: 1px solid rgba(157, 122, 52, 0.42);
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Cinzel", serif;
  font-weight: 600;
  letter-spacing: 0.03rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-position 0.4s ease;
  box-shadow: 0 10px 22px rgba(157, 122, 52, 0.28);
  position: relative;
  overflow: hidden;
  background-size: 170% 170%;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 18px 30px rgba(157, 122, 52, 0.36);
  border-color: rgba(157, 122, 52, 0.68);
  background-position: 100% 0;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.4) 48%, transparent 78%);
  transform: translateX(-140%);
  transition: transform 0.6s ease;
}

.btn:hover::after,
.btn:focus-visible::after {
  transform: translateX(140%);
}

.story {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  padding: clamp(1rem, 2.2vw, 1.8rem);
  align-items: center;
}

.photo-card {
  border-radius: 22px;
  overflow: hidden;
  min-height: 340px;
  border: 1px solid #cfbea0;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(90%);
}

.story-text {
  padding: 0.8rem;
}

.story-text h2,
.form-section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  color: var(--olive-900);
  font-family: "Cinzel", serif;
  font-weight: 500;
}

.story-text p {
  margin: 0.6rem 0;
  font-size: 1.2rem;
  color: #405448;
}

.form-section {
  padding: clamp(1.2rem, 2.6vw, 2.2rem);
}

.form-subtitle {
  margin-top: -0.2rem;
  font-size: 1.15rem;
  color: var(--muted);
}

#rsvp-form {
  display: grid;
  gap: 0.72rem;
}

label,
legend {
  font-weight: 600;
  font-size: 1.08rem;
  color: #354b40;
}

input[type="text"] {
  border: 1px solid #ccb88f;
  border-radius: 13px;
  padding: 0.85rem 0.95rem;
  font-size: 1.05rem;
  font-family: "Cormorant Garamond", serif;
  background: #fff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

input[type="text"]:hover {
  border-color: #c1a062;
  transform: translateY(-1px);
}

input[type="text"]:focus-visible {
  border-color: var(--gold-700);
  outline: 2px solid rgba(196, 163, 95, 0.28);
}

fieldset {
  margin: 0.5rem 0 0;
  border: 1px solid #d8c59f;
  border-radius: 14px;
  padding: 0.9rem;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid #d6c39a;
  border-radius: 999px;
  padding: 0.48rem 0.85rem;
  transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.choice:hover {
  transform: translateY(-1px);
  border-color: #c09b58;
  box-shadow: 0 8px 15px rgba(157, 122, 52, 0.14);
}

.choice:has(input:checked) {
  border-color: #a8843f;
  background: linear-gradient(120deg, rgba(221, 198, 144, 0.45), rgba(196, 163, 95, 0.22));
  box-shadow: 0 10px 18px rgba(157, 122, 52, 0.16);
}

.error {
  min-height: 1.2rem;
  margin: 0.2rem 0 0;
  color: #9e2f2f;
  font-size: 1rem;
}

.btn--full {
  width: 100%;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 48, 39, 0.62);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(700px, 100%);
  max-height: 92vh;
  overflow: auto;
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  transition: transform 0.38s ease, opacity 0.34s ease;
}

.modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  color: var(--olive-700);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

.modal__close:hover,
.modal__close:focus-visible {
  transform: rotate(90deg) scale(1.06);
  color: var(--gold-700);
}

.modal.is-visible {
  opacity: 1;
}

.modal.is-visible .modal__backdrop {
  opacity: 1;
}

.modal.is-visible .modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.footer {
  text-align: center;
  padding: 0 1rem 2.5rem;
  color: #55695d;
  font-size: 1.05rem;
}

.reveal-item {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-item {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.7s ease forwards;
  }

  .reveal-item:nth-child(1) {
    animation-delay: 0.1s;
  }

  .reveal-item:nth-child(2) {
    animation-delay: 0.18s;
  }

  .reveal-item:nth-child(3) {
    animation-delay: 0.26s;
  }

  .reveal-item:nth-child(4) {
    animation-delay: 0.34s;
  }

  .reveal-item:nth-child(5) {
    animation-delay: 0.42s;
  }

  .reveal-item:nth-child(6) {
    animation-delay: 0.5s;
  }

  .reveal-item:nth-child(7) {
    animation-delay: 0.58s;
  }

  .reveal-item:nth-child(8) {
    animation-delay: 0.66s;
  }

.reveal-item:nth-child(9) {
  animation-delay: 0.74s;
}
}

.page-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bgDrift {
  from {
    transform: scale(1.04) translateY(0);
  }
  to {
    transform: scale(1.08) translateY(-10px);
  }
}

@keyframes floatShape {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 900px) {
  .hero h1 {
    font-size: clamp(2.9rem, 13vw, 4.6rem);
  }
}

@media (max-width: 640px) {
  .page {
    width: calc(100% - 1.2rem);
    margin: 1rem auto 2rem;
    gap: 1rem;
  }

  .hero,
  .story,
  .form-section {
    border-radius: 22px;
  }

  .hero {
    padding: 1.2rem 1.1rem 1.4rem;
  }

  .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.2rem;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
    margin: 0.35rem 0 0.6rem;
  }

  .event-date {
    font-size: 1rem;
    letter-spacing: 0.18rem;
  }

  .ornament {
    margin: 0.25rem auto 0.55rem;
  }

  .lead {
    font-size: 1.05rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .btn {
    width: 100%;
    padding: 0.9rem 1.2rem;
  }

  .countdown {
    margin: 1rem auto 1.2rem;
  }

  .countdown__label {
    font-size: 0.78rem;
  }

  .countdown__grid {
    gap: 0.35rem 0.7rem;
  }

  .countdown__value {
    font-size: 1.25rem;
  }

  .countdown__unit {
    font-size: 0.62rem;
  }

  .countdown__note {
    font-size: 0.85rem;
  }

  .choice-group {
    gap: 0.6rem;
  }

  .choice {
    padding: 0.45rem 0.7rem;
  }

  .modal__panel {
    width: 100%;
    max-height: 88vh;
  }

  .footer {
    font-size: 0.95rem;
    padding-bottom: 2rem;
  }

  .bg-shape--left {
    width: 190px;
    height: 190px;
    top: -60px;
    left: -80px;
  }

  .bg-shape--right {
    width: 220px;
    height: 220px;
    bottom: -70px;
    right: -90px;
  }
}

@media (max-width: 420px) {
  .hero {
    padding: 1.05rem 0.95rem 1.2rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 12vw, 3rem);
  }

  .lead {
    font-size: 1rem;
  }

  .event-date {
    letter-spacing: 0.12rem;
  }

  .date-scroll {
    gap: 0.06rem;
  }

  .date-sep {
    margin: 0 0.1rem;
  }

  .digit-column {
    width: 0.68em;
  }

  .countdown__value {
    font-size: 1.15rem;
  }

  .countdown__unit {
    letter-spacing: 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
