@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Montserrat:wght@400;500;600&display=swap");

:root {
  --background: #fff8fb;
  --foreground: #3b2830;
  --card: #ffffff;
  --card-foreground: #3b2830;
  --popover: #ffffff;
  --popover-foreground: #3b2830;
  --primary: #b86d8b;
  --primary-foreground: #ffffff;
  --secondary: #fff1f6;
  --secondary-foreground: #7d4760;
  --muted: #fff5f8;
  --muted-foreground: #8d737d;
  --accent: #fbe7ef;
  --accent-foreground: #6f3f55;
  --destructive: #b4233a;
  --border: #efd7e0;
  --input: #e7cbd6;
  --ring: #c9829d;
  --radius: 0.875rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

button, input, select, textarea { font: inherit; }
.access-form input {
  width: 100%; min-height: 50px; padding: 10px 14px; border: 1px solid #e7cbd6;
  border-radius: 14px; background: #fffafa; color: #3b2830; outline: none;
  font-size: 1rem; letter-spacing: .08em; text-align: center;
}
.access-form button {
  width: 100%; min-height: 49px; margin-top: 14px; border: 0; border-radius: 14px;
  background: #b04d79; color: #fff; cursor: pointer;
}
.field-group input, .field-group select, .field-group textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #e7cbd6;
  border-radius: 14px; background: #fffafa; color: #3b2830; outline: none;
}
.field-group textarea { min-height: 96px; resize: vertical; }
.submit-button { border: 0; color: #fff; cursor: pointer; }
.submit-button:disabled { cursor: wait; opacity: .7; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.scroll-arrow { display: block; font-family: Arial, sans-serif; font-size: 3.2rem; line-height: .7; }

.access-page {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 197, 229, 0.58), transparent 31%),
    radial-gradient(circle at 84% 78%, rgba(255, 174, 210, 0.46), transparent 35%),
    linear-gradient(135deg, #3a0718 0%, #94133f 34%, #e04478 68%, #ffadc8 100%);
  background-size: 180% 180%;
  animation: gradient-wave 11s ease-in-out infinite;
}

.access-page::before {
  position: absolute;
  top: -38%;
  left: -24%;
  z-index: -2;
  width: 86vw;
  height: 86vw;
  border-radius: 50%;
  background: conic-gradient(from 90deg, rgba(255, 92, 153, 0.46), rgba(255, 224, 171, 0.26), rgba(255, 131, 171, 0.34), rgba(255, 92, 153, 0.46));
  content: "";
  filter: blur(70px);
  animation: aurora-orbit 18s linear infinite;
}

.access-page::after {
  position: absolute;
  right: -30%;
  bottom: -46%;
  z-index: -2;
  width: 90vw;
  height: 90vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 205, 230, 0.62), rgba(228, 73, 146, 0.22) 42%, transparent 70%);
  content: "";
  filter: blur(42px);
  animation: aurora-float 9s ease-in-out infinite alternate;
}

.access-glitter {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 15% 22%, rgba(255, 255, 255, 0.96) 0 1.4px, transparent 2.2px),
    radial-gradient(circle at 78% 16%, rgba(255, 224, 160, 0.94) 0 1.7px, transparent 2.6px),
    radial-gradient(circle at 84% 73%, rgba(255, 255, 255, 0.88) 0 1.3px, transparent 2.1px),
    radial-gradient(circle at 28% 82%, rgba(255, 213, 235, 0.96) 0 1.8px, transparent 2.8px);
  background-size: 145px 145px, 210px 210px, 175px 175px, 240px 240px;
  opacity: 0.82;
  animation: glitter-drift 9s linear infinite, glitter-shimmer 2.2s ease-in-out infinite alternate;
}

.access-card {
  width: min(100%, 470px);
  padding: 46px 38px 40px;
  border: 1px solid rgba(255, 230, 181, 0.78);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255, 251, 253, 0.96), rgba(255, 233, 244, 0.92));
  box-shadow: 0 25px 85px rgba(35, 5, 22, 0.4), 0 0 45px rgba(255, 174, 211, 0.18);
  text-align: center;
  backdrop-filter: blur(14px);
  animation: card-arrival 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) both, card-glow 3.4s ease-in-out infinite alternate;
}

.access-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 22px;
  place-items: center;
  border: 1px solid rgba(174, 76, 119, 0.2);
  border-radius: 50%;
  background: #fff1f7;
  color: #9d416a;
}

.access-icon svg {
  width: 21px;
}

.access-card h1 {
  max-width: 100%;
  margin: 12px 0 14px;
  font-size: clamp(2.8rem, 9.6vw, 4.15rem);
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.access-card h1 span {
  display: block;
  margin-top: 0.28em;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: 0.28em;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.3;
}

.access-intro {
  max-width: 340px;
  margin: 0 auto;
  color: #765d68;
  font-size: 0.92rem;
  line-height: 1.65;
}

.access-form {
  margin-top: 28px;
  text-align: left;
}

.access-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.access-form [data-slot="input"] {
  height: 50px;
  border-color: #ddb7c7;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.access-form [data-slot="button"] {
  width: 100%;
  height: 48px;
  margin-top: 14px;
  border-radius: 14px;
  background: #a64f77;
  box-shadow: 0 9px 24px rgba(166, 79, 119, 0.25);
}

.access-form [data-slot="button"]:hover {
  background: #934267;
}

.access-error {
  margin: 13px 0 0;
  color: #9b2940;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.access-loading {
  margin: 28px 0 0;
  color: #8b6c79;
  font-size: 0.8rem;
}

button,
input,
textarea {
  font: inherit;
}

.invitation-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #fff8fb;
}

.music-toggle {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 120;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background: rgba(255, 248, 251, 0.9);
  color: #9c3f65;
  box-shadow: 0 8px 24px rgba(83, 12, 44, 0.2);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.music-toggle svg {
  width: 23px;
  height: 23px;
}

.music-toggle:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  padding: 32px;
  text-align: center;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 197, 229, 0.58), transparent 31%),
    radial-gradient(circle at 84% 78%, rgba(255, 174, 210, 0.46), transparent 35%),
    linear-gradient(135deg, #3a0718 0%, #94133f 34%, #e04478 68%, #ffadc8 100%);
  background-size: 180% 180%;
  content: "";
  animation: gradient-wave 11s ease-in-out infinite;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.95) 0 1.4px, transparent 2.2px),
    radial-gradient(circle at 74% 12%, rgba(255, 223, 156, 0.9) 0 1.6px, transparent 2.5px),
    radial-gradient(circle at 87% 66%, rgba(255, 255, 255, 0.86) 0 1.2px, transparent 2px),
    radial-gradient(circle at 31% 79%, rgba(255, 215, 236, 0.95) 0 1.8px, transparent 2.7px),
    radial-gradient(circle at 56% 47%, rgba(255, 239, 197, 0.88) 0 1.2px, transparent 2px);
  background-size: 150px 150px, 210px 210px, 175px 175px, 245px 245px, 190px 190px;
  content: "";
  opacity: 0.82;
  animation: glitter-drift 9s linear infinite, glitter-shimmer 2.2s ease-in-out infinite alternate;
}

@keyframes glitter-shimmer {
  from { opacity: 0.52; filter: brightness(0.9); }
  to { opacity: 1; filter: brightness(1.55); }
}

@keyframes glitter-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 150px 300px, -210px 420px, 350px 175px, -245px 490px, 380px -190px; }
}

@keyframes gradient-wave {
  0% { background-position: 0% 25%; }
  50% { background-position: 100% 75%; }
  100% { background-position: 0% 25%; }
}

@keyframes aurora-orbit {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.16); }
  to { transform: rotate(360deg) scale(1); }
}

@keyframes aurora-float {
  from { transform: translate3d(-4%, 2%, 0) scale(0.94); }
  to { transform: translate3d(8%, -10%, 0) scale(1.12); }
}

@keyframes card-arrival {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes card-glow {
  from { box-shadow: 0 25px 85px rgba(35, 5, 22, 0.38), 0 0 35px rgba(255, 174, 211, 0.16); }
  to { box-shadow: 0 28px 95px rgba(35, 5, 22, 0.46), 0 0 75px rgba(255, 182, 218, 0.4); }
}

@keyframes orb-left-float {
  from { transform: translate3d(-7%, -3%, 0) scale(0.92); }
  to { transform: translate3d(18%, 15%, 0) scale(1.18); }
}

@keyframes orb-right-float {
  from { transform: translate3d(4%, 7%, 0) scale(1.12); }
  to { transform: translate3d(-18%, -15%, 0) scale(0.9); }
}

@keyframes text-shine {
  from { background-position: 0% center; }
  to { background-position: 200% center; }
}

@keyframes time-glow {
  from { transform: translateY(0); box-shadow: 0 4px 18px rgba(124, 40, 80, 0.04); }
  to { transform: translateY(-5px); box-shadow: 0 12px 28px rgba(194, 72, 132, 0.18); }
}

.hero-orb {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.78;
}

.hero-orb-left {
  top: 8%;
  left: -8%;
  width: min(38vw, 480px);
  height: min(38vw, 480px);
  background: radial-gradient(circle, rgba(255, 134, 193, 0.72) 0%, rgba(255, 195, 224, 0.26) 46%, transparent 72%);
  animation: orb-left-float 8s ease-in-out infinite alternate;
}

.hero-orb-right {
  right: -7%;
  bottom: 3%;
  width: min(44vw, 560px);
  height: min(44vw, 560px);
  background: radial-gradient(circle, rgba(255, 184, 220, 0.72) 0%, rgba(255, 205, 231, 0.22) 48%, transparent 72%);
  animation: orb-right-float 10s ease-in-out infinite alternate;
}

.invitation-card {
  width: min(100%, 760px);
  padding: 58px 28px;
  border: 1px solid rgba(255, 230, 181, 0.76);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 250, 252, 0.94), rgba(255, 234, 245, 0.88));
  box-shadow: 0 25px 85px rgba(35, 5, 22, 0.35), 0 0 45px rgba(255, 174, 211, 0.18);
  backdrop-filter: blur(14px);
  animation: card-arrival 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) both, card-glow 3.4s ease-in-out infinite alternate;
}

.kicker,
.eyebrow {
  margin: 0;
  color: #a14b72;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

footer span {
  padding-inline: 0.3em;
}

h1,
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
}

h1 {
  margin: 18px 0 8px;
  color: #71324f;
  font-size: clamp(4.4rem, 14vw, 6.5rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-shadow: 0 3px 18px rgba(181, 77, 126, 0.13);
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  h1 {
    color: transparent;
    background: linear-gradient(105deg, #8b254d 10%, #e44c83 35%, #f0b75f 50%, #d93672 66%, #8b254d 90%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shine 5s linear infinite;
  }
}

.subtitle {
  margin: 0;
  color: #8e6c79;
  font-size: 0.84rem;
  letter-spacing: 0.17em;
  line-height: 1.8;
  text-transform: uppercase;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 34px 0;
}

.time-card {
  min-width: 74px;
  padding: 14px 8px;
  border: 1px solid #efd7e0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  animation: time-glow 2.6s ease-in-out infinite alternate;
}

.time-card:nth-child(2) { animation-delay: 0.35s; }
.time-card:nth-child(3) { animation-delay: 0.7s; }
.time-card:nth-child(4) { animation-delay: 1.05s; }

.scroll-cue {
  position: absolute;
  bottom: 18px;
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2px;
  min-width: 210px;
  padding: 10px 20px 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(102, 10, 47, 0.34);
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.86rem, 2.4vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
  text-shadow: 0 2px 12px rgba(80, 4, 33, 0.6);
  box-shadow: 0 8px 30px rgba(69, 3, 31, 0.2);
  backdrop-filter: blur(8px);
  animation: scroll-cue-bounce 1.7s ease-in-out infinite;
}

.scroll-cue svg {
  width: 38px;
  height: 38px;
  stroke-width: 2.8;
  filter: drop-shadow(0 2px 8px rgba(80, 4, 33, 0.5));
}

@keyframes scroll-cue-bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.72; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

.time-card strong {
  display: block;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.time-card span {
  color: #a77a8c;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.content-section {
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 70px 20px 34px;
}

.content-section h2 {
  margin: 10px 0 22px;
  font-size: clamp(2.25rem, 7vw, 2.75rem);
  line-height: 1.15;
}

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

.detail-card {
  display: flex;
  min-height: 116px;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border: 1px solid #efd7e0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(119, 64, 86, 0.05);
}

.detail-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #fff0f5;
  color: #a75d7b;
}

.detail-icon svg {
  width: 19px;
}

.detail-card h3 {
  margin: 0 0 7px;
  font-size: 0.98rem;
  font-weight: 600;
}

.detail-card p {
  margin: 0;
  color: #846b75;
  font-size: 0.9rem;
}

.rsvp-section {
  padding-top: 58px;
  padding-bottom: 70px;
}

.form-card {
  padding: 28px;
  border: 1px solid #efd7e0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(119, 64, 86, 0.06);
}

.field-group {
  margin-top: 17px;
}

.form-row .field-group {
  margin-top: 0;
}

.field-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 600;
}

.field-group label span {
  color: #9a7f89;
  font-weight: 400;
}

.field-group [data-slot="input"],
.field-group [data-slot="select-trigger"],
.field-group [data-slot="textarea"] {
  width: 100%;
  min-height: 48px;
  border-color: #e7cbd6;
  border-radius: 14px;
  background: #fffafa;
  color: #3b2830;
  box-shadow: none;
}

.field-group [data-slot="textarea"] {
  min-height: 96px;
  resize: vertical;
}

.field-group [data-slot="select-trigger"] {
  padding-inline: 15px;
}

[data-slot="select-content"] {
  z-index: 100;
  border: 1px solid #e1b7c8 !important;
  background: #fffafb !important;
  color: #3b2830 !important;
  box-shadow: 0 18px 46px rgba(73, 18, 44, 0.22) !important;
  opacity: 1 !important;
}

[data-slot="select-content"] [data-slot="select-viewport"] {
  background: #fffafb;
}

[data-slot="select-item"] {
  color: #3b2830;
}

[data-slot="select-item"]:focus,
[data-slot="select-item"][data-highlighted] {
  background: #fde7f0 !important;
  color: #71324f !important;
}

.submit-button {
  width: 100%;
  height: auto;
  margin-top: 20px;
  padding: 15px;
  border-radius: 15px;
  background: #b86d8b;
  font-size: 0.95rem;
  box-shadow: 0 9px 24px rgba(184, 109, 139, 0.2);
}

.submit-button:hover {
  background: #a85f7c;
}

.form-feedback {
  margin-top: 18px;
  padding: 17px 18px;
  border-radius: 18px;
  font-size: 0.9rem;
  text-align: center;
}

.form-feedback.success {
  border: 1px solid #efd7e0;
  background: #fff3f7;
}

.form-feedback.error {
  border: 1px solid #e7b5bd;
  background: #fff1f3;
  color: #8c2437;
}

footer {
  padding: 42px 20px 50px;
  color: #9a7b87;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-align: center;
}

@media (max-width: 640px) {
  .access-page {
    padding: 16px;
  }

  .access-card {
    padding: 38px 22px 32px;
    border-radius: 26px;
  }

  .access-card h1 {
    font-size: clamp(2.65rem, 9.6vw, 3.5rem);
  }

  .hero {
    padding: 20px 14px;
  }

  .invitation-card {
    padding: 42px 18px 58px;
    border-radius: 26px;
  }

  .scroll-cue {
    bottom: 8px;
    min-width: min(82vw, 260px);
    padding: 10px 18px 5px;
    font-size: 0.92rem;
    letter-spacing: 0.075em;
  }

  .scroll-cue svg {
    width: 42px;
    height: 42px;
  }

  .kicker {
    letter-spacing: 0.2em;
  }

  .countdown {
    gap: 6px;
  }

  .time-card {
    min-width: 0;
    flex: 1 1 0;
    padding: 13px 4px;
  }

  .details-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding-inline: 16px;
  }

  .form-row .field-group + .field-group {
    margin-top: 17px;
  }

  .form-card {
    padding: 22px 18px;
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .access-page,
  .access-page::before,
  .access-page::after,
  .access-glitter,
  .access-card,
  .hero::before,
  .hero::after,
  .hero-orb-left,
  .hero-orb-right,
  .invitation-card,
  h1,
  .time-card {
    animation: none;
  }

  .scroll-cue {
    animation: none;
  }
}
