:root {
  --bg: #f3f3f6;
  --paper: #f8f8fa;
  --ink: #4c515d;
  --ink-soft: #686e79;
  --accent: #b996c4;
  --accent-soft: #eadff0;
  --green-soft: #dbe7d6;
  --line: rgba(112, 118, 130, 0.18);
  --shadow: 0 14px 36px rgba(78, 82, 91, 0.1);
  --radius-lg: 26px;
  --radius-md: 18px;
  --hero-floral-image: url("assets/floral-frame.png");
  --hero-floral-image-desktop: url("assets/floral-frame desktop.png");
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Montserrat", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at 10% 8%, rgba(234, 223, 240, 0.5), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(219, 231, 214, 0.45), transparent 28%),
    linear-gradient(180deg, #f7f7f9 0%, var(--bg) 55%, #f6f6f9 100%);
  line-height: 1.6;
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 90% 84%, rgba(185, 150, 196, 0.14), transparent 28%),
    radial-gradient(circle at 12% 80%, rgba(219, 231, 214, 0.24), transparent 32%);
}

h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #4a4f5b;
}

p {
  margin: 0;
}

a {
  color: #6a7080;
}

.hero,
.invitation,
.section {
  width: min(1040px, 92vw);
  margin-inline: auto;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 1.1rem 0 3.8rem;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  position: sticky;
  top: 12px;
  z-index: 12;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(248, 248, 250, 0.84);
  backdrop-filter: blur(6px);
  padding: 0.75rem 1rem;
}

.top-nav .brand {
  text-decoration: none;
  letter-spacing: 0.14em;
  font-size: 1.04rem;
  font-weight: 600;
  color: #4f5561;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.16rem;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(185, 150, 196, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--accent);
  cursor: pointer;
  position: relative;
  z-index: 16;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform 0.22s ease,
    opacity 0.18s ease;
}

.top-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.top-nav ul::-webkit-scrollbar {
  display: none;
}

.top-nav li a {
  display: block;
  text-decoration: none;
  color: #5f6573;
  border-radius: 999px;
  padding: 0.43rem 0.84rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.top-nav li a:hover {
  background: #efeff4;
  color: #4a4f5b;
}

.flower-cluster {
  display: none;
}

.hero-content {
  position: relative;
  overflow: hidden;
  width: min(660px, 92vw);
  min-height: clamp(720px, 82vw, 920px);
  margin: 4.1rem auto 0;
  padding: clamp(5.4rem, 8vw, 6.6rem) clamp(2.2rem, 5vw, 3.6rem)
    clamp(5.8rem, 9vw, 7.2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 34px;
  background: rgba(250, 250, 252, 0.9);
  box-shadow: 0 28px 70px rgba(108, 112, 126, 0.16);
}

.hero-content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 34px;
  background-image: var(--hero-floral-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  max-width: 430px;
  margin-inline: auto;
  padding: 1.9rem 1.45rem 2rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(185, 150, 196, 0.16);
  box-shadow: 0 16px 34px rgba(98, 104, 118, 0.08);
  backdrop-filter: blur(2px);
}

.hero-bouquet {
  display: none;
}

.hero-content .overline {
  position: relative;
  z-index: 2;
  color: #8c7a94;
}

.hero-content .lead,
.hero-content .location,
.hero-content .save-date,
.hero-content h1 {
  position: relative;
  z-index: 2;
  text-align: center;
}

.overline,
.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: #7d8190;
}

h1 {
  font-size: clamp(3.1rem, 8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

h1 span {
  color: var(--accent);
  font-weight: 500;
  text-transform: none;
}

.save-date {
  font-family: "Cormorant Garamond", Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(1.25rem, 3.3vw, 2rem);
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.lead {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 1.1;
}

.lead-date,
.lead-time {
  display: inline;
}

.location {
  margin-top: 0.7rem;
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #5e6471;
}

.hero-actions {
  margin-top: 1.7rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  text-decoration: none;
  padding: 0.72rem 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(78, 82, 91, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, #b996c4, #c8abd0);
  color: #fff;
}

.btn-secondary {
  background: #fbfbfd;
  color: #5e6471;
  border: 1px solid #dadde4;
}

.countdown {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(84px, 138px));
  justify-content: center;
  gap: 0.72rem;
}

.countdown div {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(252, 252, 253, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 0.82rem 0.55rem;
}

.countdown span {
  display: block;
  font-family: "Montserrat", "Helvetica Neue", sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 600;
  color: #596170;
}

.countdown small {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.62rem;
  color: #7d8291;
}

.invitation {
  margin-top: 1.1rem;
  width: min(1120px, 94vw);
  text-align: center;
  border: 1px solid rgba(185, 150, 196, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(250, 250, 252, 0.86);
  padding: 2rem 1.3rem;
}

.invitation-main {
  max-width: 1040px;
  margin-inline: auto;
  font-size: clamp(1.55rem, 2.7vw, 2.25rem) !important;
  line-height: 1.2;
  color: #b184c3 !important;
  letter-spacing: 0.01em;
  font-weight: 400 !important;
  text-shadow: 0 10px 28px rgba(177, 132, 195, 0.12);
}

.invitation p {
  max-width: 780px;
  margin-inline: auto;
  color: var(--ink-soft);
}

.invited-line {
  margin: 0.15rem 0 0.75rem;
  color: var(--accent);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 1.05;
}

.section {
  margin-top: 2.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(250, 250, 252, 0.86);
  box-shadow: 0 10px 24px rgba(78, 82, 91, 0.06);
  padding: 2rem 1.3rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.78rem;
}

.card {
  background: #fcfcfe;
  border: 1px solid #e2e4eb;
  border-radius: var(--radius-md);
  padding: 1rem;
}

.card h3 {
  font-size: 1.36rem;
}

.card p + p {
  margin-top: 0.15rem;
}

.highlight {
  background:
    linear-gradient(145deg, rgba(185, 150, 196, 0.15), rgba(250, 250, 252, 0.88)),
    rgba(250, 250, 252, 0.86);
}

.info-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
}

.info-list a {
  color: #a97fbb;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.rsvp-text {
  font-size: 1.02rem;
  color: var(--ink-soft);
  max-width: 760px;
}

.contact-intro {
  max-width: 1020px;
  color: var(--ink-soft);
  margin: 0 0 2.2rem;
  text-align: left;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.8;
}

.invitee-banner {
  margin-top: 0.8rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(185, 150, 196, 0.13);
  border: 1px solid rgba(185, 150, 196, 0.28);
  font-size: 0.95rem;
}

.token-status {
  margin-top: 0.55rem;
  font-size: 0.92rem;
  color: #6f7584;
}

.token-status:empty {
  display: none;
}

.token-status.error {
  color: #af4c66;
}

.rsvp-form {
  margin-top: 1.4rem;
  display: grid;
  gap: 1.15rem;
  max-width: 900px;
}

.wizard-step {
  border: 1px solid #dde1ea;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  padding: 1.35rem 1.25rem;
  box-shadow: 0 10px 24px rgba(78, 82, 91, 0.05);
}

.rsvp-form[data-enhanced="true"] .wizard-conditional,
.rsvp-form[data-enhanced="true"] .wizard-inline,
.rsvp-form[data-enhanced="true"] .notes-group,
.rsvp-form[data-enhanced="true"] .submit-wrap {
  display: none;
}

.rsvp-form[data-enhanced="true"] .wizard-conditional.is-visible,
.rsvp-form[data-enhanced="true"] .wizard-inline.is-visible,
.rsvp-form[data-enhanced="true"] .notes-group.is-visible,
.rsvp-form[data-enhanced="true"] .submit-wrap.is-visible {
  display: grid;
  animation: wizard-fade 0.35s ease;
}

.step-label {
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
}

.wizard-intro {
  margin: 0 0 0.8rem;
  color: #717887;
  font-size: 0.96rem;
}

.form-group {
  display: grid;
  gap: 0.58rem;
}

.form-group legend,
.form-group label {
  font-size: 0.96rem;
  color: #555b67;
}

.form-note {
  margin: 0 0 0.15rem;
  font-size: 0.88rem;
  color: #666d7b;
}

.form-group legend {
  padding: 0;
  margin-bottom: 0.35rem;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid #d3d7e0;
  border-radius: 16px;
  background: #fff;
  color: #4f5663;
  padding: 0.88rem 1rem;
  font: inherit;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid rgba(185, 150, 196, 0.35);
  border-color: #bea0c9;
}

.form-message {
  min-height: 1.2rem;
  font-size: 0.9rem;
  margin: 0;
  color: #5f6574;
}

.attendance-fieldset {
  border: 0;
  margin: 1.15rem 0 0;
  padding: 0;
}

.attendance-fieldset legend {
  margin-top: 0;
  margin-bottom: 0.85rem;
  text-align: left;
  font-size: 1.04rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.choice-card {
  display: block;
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card-box {
  position: relative;
  display: block;
  min-height: 100%;
  padding: 1rem 1rem 1rem 3.25rem;
  border: 1px solid #d8dde7;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.choice-card-box::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 1.12rem;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(177, 132, 195, 0.7);
  border-radius: 50%;
  background: #fff;
}

.choice-card-check .choice-card-box::before {
  border-radius: 6px;
}

.choice-card input:checked + .choice-card-box {
  border-color: rgba(177, 132, 195, 0.58);
  background: linear-gradient(180deg, rgba(243, 234, 247, 0.7), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 22px rgba(177, 132, 195, 0.12);
  transform: translateY(-1px);
}

.choice-card input:checked + .choice-card-box::after {
  content: "";
  position: absolute;
  left: 1.3rem;
  top: 1.37rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b184c3;
}

.choice-card-check input:checked + .choice-card-box::after {
  left: 1.29rem;
  top: 1.3rem;
  width: 9px;
  height: 6px;
  border-radius: 2px;
  border-left: 2px solid #b184c3;
  border-bottom: 2px solid #b184c3;
  background: transparent;
  transform: rotate(-45deg);
}

.choice-card input:focus-visible + .choice-card-box {
  outline: 2px solid rgba(185, 150, 196, 0.4);
  outline-offset: 2px;
}

.choice-card-title {
  display: block;
  color: #505663;
  font-size: 1.02rem;
  font-weight: 600;
}

.choice-card-copy {
  display: block;
  margin-top: 0.2rem;
  color: #7b818f;
  font-size: 0.91rem;
  line-height: 1.55;
}

.companion-choice {
  margin-top: 0.9rem;
  padding: 1rem 1rem 0;
  border-top: 1px solid rgba(185, 150, 196, 0.16);
}

.wizard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

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

.notes-group {
  padding: 0 0.25rem;
}

.submit-wrap {
  margin-top: 0.2rem;
}

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

.form-message.success {
  color: #4f7b53;
}

.contact-section {
  padding-top: 2.5rem;
  padding-bottom: 2.7rem;
}

.contact-section .section-heading {
  text-align: left;
  margin-bottom: 0.85rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  align-items: stretch;
}

.contact-card {
  text-align: center;
  padding: 1.2rem 1rem 1.15rem;
  background: #fcfcfe;
  border: 1px solid #e2e4eb;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 24px rgba(78, 82, 91, 0.04);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.contact-card h3 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.05;
}

.contact-card p {
  color: #747a86;
  font-size: 0.98rem;
  line-height: 1.7;
}

.contact-card p + p {
  margin-top: 1rem;
}

.contact-card a {
  color: inherit;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 0.9rem;
  display: grid;
  place-items: center;
  color: #b184c3;
}

.contact-icon svg {
  width: 34px;
  height: 34px;
  display: block;
  fill: currentColor;
}

@keyframes wizard-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.footer {
  text-align: center;
  color: #757c8a;
  padding: 2rem 1rem 2.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.56s ease, transform 0.56s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .top-nav {
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    padding: 0;
    box-shadow: none;
  }

  .top-nav .brand {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
    box-shadow: 0 10px 24px rgba(78, 82, 91, 0.08);
  }

  .top-nav.is-open .nav-toggle {
    position: fixed;
    top: 1.3rem;
    right: 1.3rem;
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(185, 150, 196, 0.34);
    box-shadow: 0 14px 28px rgba(78, 82, 91, 0.16);
  }

  .top-nav.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
  }

  .top-nav.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .top-nav.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
  }

  .js .top-nav ul {
    display: grid;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(105%);
  }

  .js .top-nav.is-open ul {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .top-nav ul {
    position: fixed;
    top: 0.8rem;
    right: 0.8rem;
    bottom: 0.8rem;
    width: min(320px, calc(100vw - 1.6rem));
    grid-template-columns: 1fr;
    align-content: start;
    gap: 0.4rem;
    padding: 4.4rem 0.6rem 0.7rem;
    border: 1px solid rgba(185, 150, 196, 0.18);
    border-radius: 28px;
    background: rgba(248, 248, 250, 0.98);
    box-shadow: 0 28px 54px rgba(78, 82, 91, 0.18);
    overflow: visible;
    transition:
      transform 0.32s ease,
      opacity 0.22s ease,
      visibility 0.22s ease;
    z-index: 13;
  }

  .top-nav li a {
    padding: 0.84rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    text-align: left;
  }

  body.nav-open {
    overflow: hidden;
  }

  .flower-cluster {
    width: 165px;
    height: 165px;
    opacity: 0.4;
  }

  .flower-cluster.left {
    left: -76px;
    top: 206px;
  }

  .flower-cluster.right {
    right: -76px;
    top: 256px;
  }

  .hero-content {
    margin-top: 2.4rem;
    min-height: auto;
    padding: 4.5rem 1.8rem 4.8rem;
  }

  .hero-copy {
    width: min(100%, 460px);
  }

  .hero-content .lead {
    line-height: 1.14;
  }

  .lead-date,
  .lead-time {
    display: block;
  }

  .lead-time {
    margin-top: 0.12rem;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(118px, 1fr));
  }

  .hero,
  .invitation,
  .section {
    width: min(1040px, 94vw);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .contact-card {
    padding-top: 0.2rem;
  }

  .contact-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 0.75rem;
  }

  .choice-grid,
  .wizard-columns {
    grid-template-columns: 1fr;
  }

  .choice-card-box {
    padding: 0.95rem 0.95rem 0.95rem 3rem;
  }

  .companion-choice {
    padding-inline: 0;
  }
}

@media (min-width: 980px) {
  .hero-content {
    width: min(1120px, 92vw);
    min-height: 720px;
    padding: 3.5rem 2.6rem;
  }

  .hero-content::before {
    inset: 0;
    background-image: var(--hero-floral-image-desktop);
    background-size: 100% 100%;
    transform: none;
  }

  .hero-copy {
    width: min(74%, 760px);
    max-width: 760px;
    padding: 2.7rem 3.3rem 2.8rem;
    transform: translateX(-40px);
  }

  .hero-content h1 {
    font-size: clamp(4rem, 6vw, 5.9rem);
    white-space: nowrap;
  }

  .hero-content .save-date {
    font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  }

  .hero-content .lead {
    font-size: clamp(2rem, 3vw, 2.9rem);
  }

  .hero-content .location {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
  }

  .hero-actions {
    gap: 0.95rem;
  }

  .invitation-main {
    white-space: nowrap;
  }

  .rsvp-text {
    max-width: none;
    white-space: nowrap;
  }
}
