:root {
  --bg: #fcf9f5;
  --bg-deep: #f5e4e6;
  --text: #4a3437;
  --muted: #8c6a6f;
  --card: rgba(255, 255, 255, 0.85);
  --card-strong: rgba(255, 250, 252, 0.95);
  --accent: #dca2a7;
  --accent-deep: #b37e83;
  --accent-gold: #d4af37;
  --accent-soft: #f4dce0;
  --line: rgba(220, 162, 167, 0.3);
  --shadow: 0 24px 80px rgba(130, 90, 95, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Work Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.95) 0%, transparent 40%),
    radial-gradient(circle at 85% 18%, rgba(220, 162, 167, 0.35) 0%, transparent 40%),
    radial-gradient(circle at 80% 82%, rgba(212, 175, 55, 0.15) 0%, transparent 45%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

.container {
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 42px 24px 32px;
  position: relative;
  z-index: 2;
}

.card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(24px, 5vw, 44px);
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.hero-copy {
  text-align: left;
}

.kicker {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 12px 0 14px;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  max-width: 11ch;
}

.subtitle {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.6;
}

.countdown {
  margin: 30px 0 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 12px;
}

.time-box {
  border-radius: 22px;
  border: 1px solid rgba(182, 126, 77, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 234, 216, 0.72));
  padding: 18px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.time-box span {
  display: block;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: #4b321b;
  line-height: 1;
}

.time-box small {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  color: var(--muted);
  text-transform: uppercase;
}

.date {
  margin: 6px 0 12px;
  font-weight: 600;
  color: #5d4430;
}

.quote {
  margin: 0;
  max-width: 45ch;
  font-style: italic;
  color: #4a3d31;
}

.footer-note {
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

.hero-side {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.invite-panel {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(182, 126, 77, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(246, 229, 208, 0.88)),
    var(--card-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 18px 48px rgba(73, 46, 20, 0.12);
}

.invite-label {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.invite-panel p {
  margin: 0;
  display: grid;
  gap: 4px;
  line-height: 1.6;
  color: #4a3d31;
}

.invite-panel strong {
  color: var(--accent-deep);
}

.badge {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(182, 126, 77, 0.12);
  color: var(--accent-deep);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.wish-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}

.media-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: var(--card-strong);
  box-shadow: var(--shadow);
}

.invitation-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.78), transparent 32%),
    linear-gradient(145deg, rgba(255, 251, 246, 0.96), rgba(244, 226, 201, 0.92));
}

.invitation-card::before,
.invitation-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.55;
}

.invitation-card::before {
  top: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(230, 201, 166, 0.75), transparent 70%);
}

.invitation-card::after {
  right: -90px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(182, 126, 77, 0.22), transparent 70%);
}

.invitation-frame {
  position: relative;
  z-index: 1;
  padding: clamp(26px, 5vw, 42px);
  border-radius: 22px;
  border: 1px solid rgba(182, 126, 77, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 240, 0.88)),
    rgba(255, 252, 247, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.56),
    0 18px 40px rgba(92, 58, 28, 0.08);
  text-align: center;
}

.section-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.media-card h2 {
  margin: 0 0 10px;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.invitation-card h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.invitation-lead {
  margin: 0 auto 20px;
  max-width: 34ch;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.75;
  color: #5a402c;
}

.invitation-divider {
  width: min(180px, 45%);
  height: 1px;
  margin: 0 auto 22px;
  background: linear-gradient(90deg, transparent, rgba(182, 126, 77, 0.75), transparent);
}

.media-text {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.invitation-card .media-text {
  max-width: 48ch;
  margin-inline: auto;
}

.invitation-note {
  margin-top: 24px;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  color: #6a4d37;
}

.invitation-aside {
  display: grid;
  align-content: space-between;
  gap: 22px;
  min-height: 100%;
  padding: clamp(28px, 4vw, 36px);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(160deg, rgba(248, 236, 217, 0.95), rgba(236, 209, 176, 0.9));
  border-color: rgba(182, 126, 77, 0.28);
}

.invitation-aside-top h3 {
  margin: 0 0 14px;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.2;
  color: #3f2d20;
}

.aside-text {
  margin: 0;
  color: #6b5542;
  line-height: 1.9;
}

.blessing-box {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: 22px;
  background: rgba(255, 249, 241, 0.74);
  border: 1px solid rgba(182, 126, 77, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.blessing-box::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 16px;
  border: 1px solid rgba(182, 126, 77, 0.14);
  pointer-events: none;
}

.blessing-label {
  margin: 0 0 10px;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.blessing-text {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.18rem;
  line-height: 1.75;
  color: #523b29;
}

.aside-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.aside-pill-list span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.74);
  border: 1px solid rgba(182, 126, 77, 0.2);
  color: #6d5139;
  font-size: 0.92rem;
  box-shadow: 0 10px 24px rgba(109, 76, 43, 0.08);
}

.media-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fffaf2;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(134, 87, 47, 0.22);
  border: 0;
  font: inherit;
}

.helper-text {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.wish-copy h2 {
  margin: 0 0 10px;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-deep);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(182, 126, 77, 0.24);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(134, 87, 47, 0.7);
  box-shadow: 0 0 0 4px rgba(182, 126, 77, 0.12);
  transform: translateY(-1px);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field-full {
  grid-column: 1 / -1;
}

.wish-actions {
  display: grid;
  gap: 10px;
  align-items: start;
}

.submit-button {
  justify-self: start;
}

.status-text {
  min-height: 1.4em;
  margin: 0;
}

.status-text.is-error {
  color: #9c3f2f;
}

.status-text.is-success {
  color: #5d4430;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 88%);
  pointer-events: none;
  z-index: 0;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(18px);
  z-index: 1;
  animation: float 9s ease-in-out infinite;
}

.orb-1 {
  width: 260px;
  height: 260px;
  left: -60px;
  top: -70px;
  background: rgba(248, 211, 166, 0.65);
}

.orb-2 {
  width: 320px;
  height: 320px;
  right: -100px;
  bottom: -100px;
  background: rgba(194, 145, 89, 0.42);
  animation-delay: 1.5s;
}

.fade-up {
  animation: fadeUp 1s ease both;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

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

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@media (max-width: 680px) {
  .countdown {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .card {
    border-radius: 22px;
  }

  .container {
    padding-inline: 16px;
  }

  .media-card {
    padding: 22px;
  }
}

@media (max-width: 900px) {
  .hero,
  .media-grid,
  .wish-section {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  h1,
  .subtitle,
  .quote {
    max-width: none;
  }

  .wish-form {
    grid-template-columns: 1fr;
  }
}

/* --- ROMANTIC GATE ANIMATION --- */
.romantic-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  display: flex;
  overflow: hidden;
}

.gate-left, .gate-right {
  width: 50%;
  height: 100%;
  background: linear-gradient(to bottom, #fcf9f5, #f5e4e6);
  box-shadow: 0 0 40px rgba(0,0,0,0.1);
  animation: gateOpenHorizontal 2.5s cubic-bezier(0.77, 0, 0.175, 1) 0.5s forwards;
  position: relative;
}

.gate-left {
  transform-origin: left;
}

.gate-right {
  transform-origin: right;
}

.gate-left::after, .gate-right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15vw;
  background-image: radial-gradient(circle at center, rgba(255,255,255,0.4) 0%, transparent 60%);
}
.gate-left::after { right: 0; border-right: 2px solid rgba(212, 175, 55, 0.5); }
.gate-right::after { left: 0; border-left: 2px solid rgba(212, 175, 55, 0.5); }

@keyframes gateOpenHorizontal {
  0% { transform: translateX(0); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(-100%); opacity: 0; display: none; }
}

.gate-right {
  animation-name: gateOpenHorizontalRight;
}
@keyframes gateOpenHorizontalRight {
  0% { transform: translateX(0); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; display: none; }
}

/* --- ROMANTIC HERO SECTION --- */
.romantic-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  align-items: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  padding: clamp(60px, 8vw, 120px) clamp(24px, 5vw, 44px);
  background: 
    radial-gradient(circle at top, rgba(255, 255, 255, 0.95), rgba(255, 245, 248, 0.85) 60%),
    var(--card);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 30px 60px rgba(179, 126, 131, 0.15), inset 0 0 40px rgba(255, 255, 255, 0.6);
}

.cinematic-reveal {
  opacity: 0;
  animation: cinematicFadeUp 2s cubic-bezier(0.2, 0.8, 0.2, 1) 1.5s forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  width: 100%;
}

@keyframes cinematicFadeUp {
  0% { opacity: 0; transform: translateY(30px) scale(0.98); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.script-kicker {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  text-transform: none;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.main-title {
  margin: 10px 0 24px;
  max-width: 18ch;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  color: #382426;
  text-align: center;
  line-height: 1.15;
}

.text-glow {
  text-shadow: 0 4px 20px rgba(220, 162, 167, 0.4);
}

.rings-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 24px;
  animation: pulseRings 4s infinite ease-in-out;
}

@keyframes pulseRings {
  0%, 100% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3)); }
  50% { transform: scale(1.05) translateY(-5px); filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.6)); }
}

.elegant-subtitle {
  font-size: 1.1rem;
  max-width: 52ch;
  text-align: center;
  color: #634a4c;
  margin: 0 0 16px;
  line-height: 1.8;
}

.elegant-subtitle strong {
  display: inline-block;
  font-size: 1.25rem;
  font-family: 'Playfair Display', serif;
  color: var(--text);
  font-weight: 700;
}

.romantic-line {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--accent-deep);
  font-size: 1.2rem;
  margin-bottom: 36px;
  max-width: 50ch;
  text-align: center;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.media-button.primary-cta {
  background: linear-gradient(135deg, #d4af37 0%, #b8912d 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(212, 175, 55, 0.3);
}
.media-button.primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(212, 175, 55, 0.4);
}

.media-button.secondary-cta {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border: 1px solid var(--accent);
  box-shadow: 0 8px 20px rgba(179, 126, 131, 0.1);
}
.media-button.secondary-cta:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: var(--accent-deep);
}

/* --- PETALS & SPARKLES --- */
.petals-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at top left, #ffedf0, #f8bbc3);
  border-radius: 2px 14px 2px 14px;
  opacity: 0.6;
  box-shadow: 0 2px 6px rgba(220, 162, 167, 0.4);
  animation: fall 12s linear infinite;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #d4af37, 0 0 20px #d4af37;
  animation: floatSparkle 6s ease-in-out infinite;
  opacity: 0.8;
}

.p1 { left: 10%; top: -5%; animation-duration: 15s; animation-delay: 2s; transform: rotate(15deg); }
.p2 { left: 30%; top: -10%; animation-duration: 11s; animation-delay: 0s; transform: rotate(45deg) scale(1.2); }
.p3 { left: 60%; top: -5%; animation-duration: 18s; animation-delay: 5s; transform: rotate(120deg) scale(0.8); }
.p4 { left: 85%; top: -15%; animation-duration: 14s; animation-delay: 1s; transform: rotate(80deg) scale(1.5); }
.p5 { left: 45%; top: -8%; animation-duration: 13s; animation-delay: 7s; transform: rotate(33deg); }
.p6 { left: 75%; top: -12%; animation-duration: 16s; animation-delay: 3s; transform: rotate(200deg) scale(0.9); }

.s1 { left: 20%; top: 30%; animation-delay: 1s; }
.s2 { left: 80%; top: 60%; animation-delay: 3s; width: 4px; height: 4px; }
.s3 { left: 50%; top: 80%; animation-delay: 2s; width: 8px; height: 8px; }

@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg) translateX(0); opacity: 0; }
  10% { opacity: 0.8; }
  50% { transform: translateY(40vh) rotate(180deg) translateX(50px); }
  90% { opacity: 0.6; }
  100% { transform: translateY(80vh) rotate(360deg) translateX(-20px); opacity: 0; }
}

@keyframes floatSparkle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-20px) scale(1.5); opacity: 1; text-shadow: 0 0 20px #fff; }
}
