:root {
  --background: #f9f8f3;
  --card: #ffffff;
  --sage-light: #e3e5d8;
  --sage: #c9cfbb;
  --sage-dark: #77806b;
  --text: #686862;
  --heading: #555650;
  --border: #e2e3da;
  --outer: #d7e0e3;
  --shadow: 0 18px 48px rgba(85, 86, 80, 0.11);
  --script: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--outer);
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.5px),
    radial-gradient(circle at 77% 68%, rgba(119, 128, 107, 0.09) 0 1px, transparent 1.7px),
    linear-gradient(125deg, rgba(255, 255, 255, 0.16), transparent 42%, rgba(119, 128, 107, 0.05));
  background-size: 17px 17px, 23px 23px, 100% 100%;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--outer);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(119, 128, 107, 0.48);
  outline-offset: 3px;
}

.invitation {
  position: relative;
  width: min(100%, 860px);
  margin-inline: auto;
  overflow: hidden;
  background: var(--background);
  box-shadow: 0 0 70px rgba(79, 91, 96, 0.18);
}

.section {
  position: relative;
  padding: 84px 24px;
  text-align: center;
}

.section--ivory {
  background-color: var(--background);
  background-image:
    radial-gradient(ellipse at 100% 8%, rgba(201, 207, 187, 0.24), transparent 32%),
    radial-gradient(ellipse at 0% 82%, rgba(227, 229, 216, 0.25), transparent 36%),
    radial-gradient(ellipse at 48% 44%, rgba(255, 255, 255, 0.42), transparent 46%),
    repeating-linear-gradient(7deg, rgba(99, 108, 91, 0.022) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(97deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 8px),
    radial-gradient(circle, rgba(119, 128, 107, 0.075) 0 0.8px, transparent 1.15px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 12px 12px;
}

.section--sage {
  background-color: var(--sage-light);
  background-image:
    radial-gradient(ellipse at 8% 18%, rgba(255, 255, 255, 0.42), transparent 36%),
    radial-gradient(ellipse at 92% 82%, rgba(119, 128, 107, 0.13), transparent 36%),
    radial-gradient(ellipse at 52% 52%, rgba(255, 255, 255, 0.14), transparent 50%),
    repeating-linear-gradient(9deg, rgba(85, 86, 80, 0.026) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(99deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 9px),
    radial-gradient(circle, rgba(85, 86, 80, 0.065) 0 0.8px, transparent 1.15px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 13px 13px;
}

.section-inner {
  position: relative;
  z-index: 2;
  width: min(100%, 650px);
  margin-inline: auto;
}

.curved-top {
  margin-top: -34px;
  padding-top: 104px;
  border-radius: 50% 50% 0 0 / 46px 46px 0 0;
}

.script-title {
  position: relative;
  display: inline-block;
  margin: 0 0 32px;
  color: var(--heading);
  font-family: var(--script);
  font-size: clamp(3rem, 14vw, 4.8rem);
  font-style: italic;
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.025em;
}

.script-title::after {
  position: absolute;
  right: 12%;
  bottom: -13px;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sage-dark), transparent);
  content: "";
  opacity: 0.55;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s 0.2s ease;
}

.script-title.is-visible::after,
.is-visible .script-title::after {
  transform: scaleX(1);
}

.script-title--small {
  margin-bottom: 18px;
  font-size: clamp(2.5rem, 12vw, 3.7rem);
}

.section p {
  margin: 0 auto 20px;
  max-width: 590px;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 13px 28px;
  border: 1px solid var(--sage-dark);
  border-radius: 999px;
  color: #fff;
  background: var(--sage-dark);
  box-shadow: 0 9px 24px rgba(119, 128, 107, 0.2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  color: var(--heading);
  background: var(--card);
  box-shadow: 0 12px 30px rgba(85, 86, 80, 0.16);
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

/* Fixed music control */
.music-button {
  position: fixed;
  z-index: 50;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(119, 128, 107, 0.35);
  border-radius: 50%;
  color: var(--heading);
  background: rgba(249, 248, 243, 0.94);
  box-shadow: 0 8px 28px rgba(85, 86, 80, 0.16);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.music-button__ring {
  position: absolute;
  inset: 5px;
  border: 1px dashed var(--sage-dark);
  border-radius: inherit;
  opacity: 0.58;
}

.music-button__note {
  position: relative;
  z-index: 1;
  font-family: Georgia, serif;
  font-size: 1.35rem;
}

.music-button.is-playing .music-button__ring {
  animation: spin 7s linear infinite;
}

.music-button.is-playing::after {
  position: absolute;
  inset: -4px;
  border: 1px solid var(--sage-dark);
  border-radius: inherit;
  content: "";
  animation: pulse 2s ease-out infinite;
}

/* Watercolor botanical decorations */
.botanical,
.botanical-garland {
  position: absolute;
  z-index: 1;
  pointer-events: auto;
  transform: var(--decor-transform, none);
  user-select: none;
}

.botanical {
  right: clamp(-88px, -8vw, -46px);
  left: auto;
  width: clamp(380px, 105vw, 520px);
  transform-origin: 90% 90%;
}

.botanical-garland {
  width: 110%;
  transform-origin: 50% 0;
}

.botanical img,
.botanical-garland img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 7px 12px rgba(85, 86, 80, 0.045));
  transform: translateZ(0);
  transform-origin: 12% 88%;
  will-change: transform;
}

.botanical-garland img {
  transform-origin: 50% 4%;
}

.botanical-garland--hero {
  top: -96px;
  left: -5%;
  --decor-opacity: 0.78;
  --decor-transform: translateZ(0);
  --drift-x: 1px;
  --drift-y: 3px;
  --sway-angle: 0.18deg;
  --sway-duration: 11s;
}

.botanical--story {
  bottom: -88px;
  --decor-opacity: 0.48;
  --decor-transform: rotate(-8deg) scaleX(-1);
  --drift-x: -2px;
  --drift-y: 3px;
  --sway-angle: -0.35deg;
  --sway-duration: 9s;
}

.botanical--location {
  bottom: -92px;
  --decor-opacity: 0.5;
  --decor-transform: rotate(-10deg) scaleX(-1);
  --drift-x: 2px;
  --drift-y: -2px;
  --sway-angle: 0.3deg;
  --sway-duration: 10.5s;
}

.botanical--dress {
  bottom: -92px;
  --decor-opacity: 0.52;
  --decor-transform: rotate(-9deg) scaleX(-1);
  --drift-x: -2px;
  --drift-y: -3px;
  --sway-angle: -0.32deg;
  --sway-duration: 8.5s;
}

.botanical--wishes {
  bottom: -94px;
  --decor-opacity: 0.35;
  --decor-transform: rotate(-11deg) scaleX(-1);
  --drift-x: 2px;
  --drift-y: 2px;
  --sway-angle: 0.28deg;
  --sway-duration: 12s;
}

.botanical--rsvp {
  bottom: -104px;
  --decor-opacity: 0.3;
  --decor-transform: rotate(-8deg) scaleX(-1);
  --drift-x: -2px;
  --drift-y: 3px;
  --sway-angle: -0.25deg;
  --sway-duration: 10s;
}

.botanical--countdown {
  top: -16px;
  right: auto;
  left: -116px;
  width: 420px;
  transform-origin: 10% 90%;
  --decor-opacity: 0.4;
  --decor-transform: rotate(18deg);
}

.botanical--schedule {
  top: 24%;
  right: -115px;
  width: 430px;
  --decor-opacity: 0.38;
  --decor-transform: rotate(-17deg) scaleX(-1);
}

.botanical--telegram {
  right: auto;
  bottom: -68px;
  left: -120px;
  width: 420px;
  transform-origin: 10% 90%;
  --decor-opacity: 0.42;
  --decor-transform: rotate(13deg);
}

.botanical--contact {
  right: -118px;
  bottom: -65px;
  width: 420px;
  --decor-opacity: 0.46;
  --decor-transform: rotate(-12deg) scaleX(-1);
}

.botanical--hero-side {
  top: 31%;
  right: -118px;
  width: 430px;
  --decor-opacity: 0.3;
  --decor-transform: rotate(-18deg) scaleX(-1);
}

.botanical--story-left {
  top: 36%;
  right: auto;
  left: -128px;
  width: 410px;
  transform-origin: 10% 90%;
  --decor-opacity: 0.28;
  --decor-transform: rotate(16deg);
}

.botanical--location-left {
  top: 20%;
  right: auto;
  left: -125px;
  width: 405px;
  transform-origin: 10% 90%;
  --decor-opacity: 0.27;
  --decor-transform: rotate(19deg);
}

.botanical--dress-left {
  top: -18px;
  right: auto;
  left: -118px;
  width: 400px;
  transform-origin: 10% 90%;
  --decor-opacity: 0.3;
  --decor-transform: rotate(15deg);
}

.botanical--rsvp-left {
  top: 43%;
  right: auto;
  left: -132px;
  width: 420px;
  transform-origin: 10% 90%;
  --decor-opacity: 0.24;
  --decor-transform: rotate(17deg);
}

.botanical--hero-side,
.botanical--story,
.botanical--schedule,
.botanical--location,
.botanical--dress,
.botanical--wishes,
.botanical--rsvp,
.botanical--contact {
  right: clamp(-540px, -135vw, -470px);
  left: auto;
  width: clamp(620px, 185vw, 780px);
  transform-origin: 50% 82%;
}

.botanical-garland--footer {
  bottom: -142px;
  left: -5%;
  --decor-opacity: 0.72;
  --decor-transform: rotate(180deg) translateZ(0);
  --drift-x: -1px;
  --drift-y: 3px;
  --sway-angle: -0.18deg;
  --sway-duration: 11.5s;
}

/* Hero */
.hero {
  min-height: 100svh;
  padding-top: 78px;
  padding-bottom: 124px;
}

.hero__content,
.hero__photo,
.hero__message {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin-bottom: 10px !important;
  color: var(--sage-dark);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.couple-names {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--heading);
  font-family: var(--script);
  font-size: clamp(4.1rem, 21vw, 7.8rem);
  font-style: italic;
  font-weight: 600;
  line-height: 0.73;
}

.couple-names small {
  margin: 18px 0 11px;
  color: var(--sage-dark);
  font-size: 0.38em;
  font-weight: 400;
  line-height: 1;
}

.hero__date {
  display: inline-block;
  margin-top: 34px;
  color: var(--heading);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.25em;
}

.hero__photo {
  width: min(100%, 420px);
  margin: 38px auto 34px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 30px 30px 140px 140px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.hero__photo img {
  aspect-ratio: 4 / 5;
  border-radius: 22px 22px 132px 132px;
  object-fit: cover;
  object-position: center 66%;
  filter: saturate(0.76) sepia(0.05);
}

.hero__message {
  width: min(100%, 530px);
  margin-inline: auto;
}

/* Countdown */
.countdown-section {
  padding-bottom: 112px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 28px;
}

.countdown__item {
  min-width: 0;
  padding: 18px 4px 15px;
  border: 1px solid rgba(119, 128, 107, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 7px 24px rgba(119, 128, 107, 0.08);
}

.countdown__item strong {
  display: block;
  color: var(--heading);
  font-family: var(--script);
  font-size: clamp(2rem, 8vw, 3.15rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1;
}

.countdown__item span {
  display: block;
  margin-top: 6px;
  font-size: clamp(0.54rem, 2.4vw, 0.7rem);
  letter-spacing: 0.07em;
}

/* Story */
.story {
  padding-bottom: 118px;
}

.story__photo {
  position: relative;
  width: min(86%, 390px);
  margin: 8px auto 38px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 160px 160px 28px 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.story__photo img {
  aspect-ratio: 4 / 5;
  border-radius: 153px 153px 22px 22px;
  object-fit: cover;
  object-position: 50% 42%;
  filter: saturate(0.72) sepia(0.04);
}

.story__copy {
  padding: 22px 20px 5px;
  border: 1px solid rgba(119, 128, 107, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 34px rgba(85, 86, 80, 0.07);
  text-align: left;
}

.story__copy p {
  text-wrap: pretty;
}

.story__copy p:first-child::first-letter {
  float: left;
  margin: 8px 9px 0 0;
  color: var(--sage-dark);
  font-family: var(--script);
  font-style: italic;
  font-size: 3.8rem;
  line-height: 0.64;
}

.milestones {
  position: relative;
  display: grid;
  gap: 20px;
  margin-top: 48px;
}

.milestones::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 50%;
  width: 1px;
  background: var(--border);
  content: "";
}

.milestone {
  position: relative;
  z-index: 1;
  width: min(82%, 300px);
  margin-inline: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

.milestone time {
  display: block;
  color: var(--heading);
  font-family: var(--script);
  font-size: 2.15rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1;
}

.milestone span {
  display: block;
  margin-top: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* Event timeline */
.schedule {
  padding-bottom: 122px;
}

.timeline {
  position: relative;
  margin-top: 24px;
  text-align: left;
}

.timeline::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 80px;
  width: 1px;
  background: var(--sage-dark);
  content: "";
  opacity: 0.5;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.5s ease;
}

.timeline.is-drawn::before {
  transform: scaleY(1);
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 60px 18px 1fr;
  gap: 12px;
  min-height: 118px;
}

.timeline__item time {
  padding-top: 3px;
  color: var(--heading);
  font-family: var(--script);
  font-style: italic;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1;
  text-align: right;
}

.timeline__marker {
  position: relative;
  z-index: 2;
  width: 11px;
  height: 11px;
  margin-top: 8px;
  margin-left: 3px;
  border: 3px solid var(--sage-light);
  border-radius: 50% 0 50% 50%;
  background: var(--sage-dark);
  box-shadow: 0 0 0 1px var(--sage-dark);
  transform: rotate(-45deg);
}

.timeline__item h3 {
  margin: 0 0 4px;
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.timeline__item p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.62;
}

/* Location */
.location__name {
  margin-bottom: 12px !important;
  color: var(--heading);
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.location__name strong {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--script);
  font-size: 2.45rem;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.location address {
  margin-bottom: 30px;
  font-style: normal;
  font-size: 0.84rem;
}

.location__photo {
  width: min(100%, 500px);
  margin: 0 auto 30px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.location__photo img {
  aspect-ratio: 16 / 11;
  border-radius: 20px;
  object-fit: cover;
  object-position: 50% 62%;
  filter: saturate(0.78);
}

/* Dress code */
.dress-code {
  padding-top: 34px;
  padding-bottom: 124px;
}

.swatches {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 35px 0 28px;
}

.swatch {
  width: clamp(54px, 17vw, 74px);
  aspect-ratio: 1;
  border: 1px solid rgba(85, 86, 80, 0.12);
  border-radius: 17px;
  background: var(--swatch);
  box-shadow: 0 8px 18px rgba(85, 86, 80, 0.09);
}

.swatch--ivory { --swatch: #f8f7f0; }
.swatch--light-sage { --swatch: #e1e4d6; }
.swatch--sage-gray { --swatch: #c7cbbf; }
.swatch--graphite { --swatch: #333432; }

.dress-code__note {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--sage-dark);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
}

.dress-code .section-inner > p:not(.dress-code__note) {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 28px rgba(85, 86, 80, 0.06);
  text-wrap: pretty;
}

/* Wishes */
.wishes {
  padding-bottom: 122px;
}

.wishes__icon {
  position: relative;
  width: 84px;
  height: 68px;
  margin: -2px auto 22px;
  color: var(--sage-dark);
}

.wishes__icon span {
  font-family: var(--script);
  font-size: 4.4rem;
  line-height: 1;
}

.wishes__icon i {
  position: absolute;
  bottom: 8px;
  width: 30px;
  height: 1px;
  background: var(--sage-dark);
}

.wishes__icon i:nth-child(2) { left: 2px; transform: rotate(28deg); }
.wishes__icon i:nth-child(3) { right: 2px; transform: rotate(-28deg); }

.wishes blockquote {
  margin: 36px auto 0;
  padding: 24px 20px;
  border: 1px solid rgba(119, 128, 107, 0.18);
  border-radius: 24px;
  color: var(--heading);
  background: rgba(255, 255, 255, 0.56);
  font-family: var(--script);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 7vw, 2.35rem);
  line-height: 1.22;
}

/* Telegram */
.telegram {
  padding-bottom: 124px;
}

.telegram__mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin: 0 auto 25px;
  border: 1px solid var(--sage);
  border-radius: 50% 50% 50% 14px;
  color: #229ed9;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 30px rgba(34, 158, 217, 0.12);
  transform: rotate(-8deg);
}

.telegram__mark svg {
  width: 29px;
  height: 33px;
  fill: currentColor;
  transform: translate(-1px, 1px) rotate(8deg);
}

/* RSVP */
.rsvp {
  padding-bottom: 126px;
}

.rsvp__intro {
  margin-bottom: 36px !important;
  padding: 18px 20px;
  border: 1px solid rgba(119, 128, 107, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 28px rgba(85, 86, 80, 0.06);
  text-wrap: pretty;
}

.rsvp-form {
  display: grid;
  gap: 13px;
  width: min(100%, 620px);
  margin-inline: auto;
  text-align: left;
}

.form-card {
  display: block;
  margin: 0;
  padding: 21px;
  border: 1px solid rgba(119, 128, 107, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 8px 24px rgba(85, 86, 80, 0.06);
}

fieldset.form-card {
  min-width: 0;
  padding-top: 22px;
}

.form-card > span,
.form-card legend {
  display: block;
  margin-bottom: 13px;
  padding: 0;
  color: var(--heading);
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

fieldset.form-card > legend {
  float: left;
  width: 100%;
  margin: 0 0 15px;
  padding: 0;
}

fieldset.form-card > legend + * {
  clear: both;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  color: var(--heading);
  background: transparent;
  font-size: 0.9rem;
}

.field input,
.field select {
  height: 44px;
}

.field textarea {
  display: block;
  min-height: 96px;
  padding: 10px 0;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #aaa99f;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--sage-dark);
  outline: 0;
}

.attendance-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attendance-option {
  position: relative;
  display: flex;
  min-height: 136px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 17px;
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.attendance-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.attendance-option:has(input:checked) {
  border-color: var(--sage-dark);
  background: var(--sage-light);
  transform: translateY(-2px);
}

.attendance-option:has(input:focus-visible) {
  outline: 3px solid rgba(119, 128, 107, 0.48);
  outline-offset: 2px;
}

.attendance-option__icon {
  color: var(--sage);
  font-size: 2.75rem;
  line-height: 1;
}

.attendance-option__icon--cross {
  font-size: 3.6rem;
  font-weight: 300;
}

.attendance-option > span:last-child {
  font-size: 0.68rem;
  line-height: 1.4;
}

.compact-options label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  cursor: pointer;
  font-size: 0.83rem;
}

.compact-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.compact-options label span::before {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border: 1px solid var(--sage-dark);
  border-radius: 50%;
  content: "";
  vertical-align: -4px;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.compact-options input:checked + span::before {
  background: var(--sage-dark);
  box-shadow: inset 0 0 0 4px #fff;
}

.compact-options input:focus-visible + span {
  outline: 3px solid rgba(119, 128, 107, 0.48);
  outline-offset: 3px;
}

.submit-button {
  width: 100%;
  margin-top: 10px;
  border: 0;
  cursor: pointer;
}

.form-note {
  margin: 0 !important;
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: center;
}

/* Contact and footer */
.contact__person {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin: 30px auto 16px !important;
}

.contact__person strong {
  color: var(--heading);
  font-family: var(--script);
  font-size: 2.3rem;
  font-style: italic;
  font-weight: 600;
}

.contact__person a {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.footer {
  min-height: 570px;
  display: grid;
  place-items: center;
  padding-bottom: 105px;
}

.footer__content {
  position: relative;
  z-index: 2;
  width: min(100%, 500px);
  padding: 30px 22px 36px;
  border: 1px solid rgba(119, 128, 107, 0.16);
  border-radius: 38px;
  background: rgba(249, 248, 243, 0.82);
  box-shadow: 0 18px 48px rgba(85, 86, 80, 0.08);
  backdrop-filter: blur(2px);
}

.footer__content > p:first-child {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.footer__names {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin: 40px 0 32px !important;
  color: var(--heading);
  font-family: var(--script);
  font-size: clamp(4rem, 20vw, 7rem);
  font-style: italic;
  font-weight: 600;
  line-height: 0.76;
}

.footer__names small {
  margin: 18px 0 8px;
  color: var(--sage);
  font-size: 0.46em;
}

.footer time {
  color: var(--heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
}

/* Toast */
.toast {
  position: fixed;
  z-index: 70;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  max-width: 420px;
  flex-direction: column;
  margin-inline: auto;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 17px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast strong {
  color: var(--heading);
  font-size: 0.84rem;
}

.toast span {
  font-size: 0.75rem;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 800ms ease, transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

.botanical.reveal,
.botanical-garland.reveal {
  opacity: 0;
  transform: var(--decor-transform, none) translate3d(0, 12px, 0) scale(0.985);
}

.botanical.reveal.is-visible,
.botanical-garland.reveal.is-visible {
  opacity: var(--decor-opacity, 0.6);
  transform: var(--decor-transform, none) translate3d(0, 0, 0);
}

.botanical:hover img,
.botanical-garland:hover img,
.botanical.is-wind-touched img,
.botanical-garland.is-wind-touched img {
  animation: leaf-wind 1.45s ease-in-out infinite;
}

.delay-1 { transition-delay: 120ms; }
.delay-2 { transition-delay: 240ms; }
.delay-3 { transition-delay: 360ms; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { opacity: 0.5; transform: scale(0.94); }
  70%, 100% { opacity: 0; transform: scale(1.22); }
}

@keyframes leaf-wind {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  28% { transform: translate3d(1px, -1px, 0) rotate(0.55deg); }
  55% { transform: translate3d(-1px, 1px, 0) rotate(-0.38deg); }
  78% { transform: translate3d(1px, 0, 0) rotate(0.24deg); }
}

@media (min-width: 600px) {
  body {
    padding: 32px 0;
    font-size: 16px;
  }

  .invitation {
    border-radius: 28px;
  }

  .section {
    padding-right: 52px;
    padding-left: 52px;
  }

  .botanical-garland--hero {
    top: -210px;
  }

  .botanical-garland--footer {
    bottom: -334px;
  }

  .botanical {
    right: -72px;
    left: auto;
    width: 540px;
  }

  .botanical--story,
  .botanical--location,
  .botanical--dress,
    .botanical--wishes,
    .botanical--rsvp {
    right: -72px;
    left: auto;
    bottom: -100px;
  }

  .botanical--countdown,
  .botanical--telegram {
    right: auto;
    left: -130px;
    width: 500px;
  }

  .botanical--schedule,
  .botanical--contact {
    right: -135px;
    left: auto;
    width: 500px;
  }

  .botanical--story-left,
  .botanical--location-left,
  .botanical--dress-left,
  .botanical--rsvp-left {
    right: auto;
    left: -125px;
    width: 490px;
  }

  .botanical--hero-side {
    right: -130px;
    left: auto;
    width: 500px;
  }

  .botanical--hero-side,
  .botanical--story,
  .botanical--schedule,
  .botanical--location,
  .botanical--dress,
  .botanical--wishes,
  .botanical--rsvp,
  .botanical--contact {
    right: -575px;
    left: auto;
    width: 780px;
    transform-origin: 50% 82%;
  }

  .curved-top {
    border-radius: 50% 50% 0 0 / 64px 64px 0 0;
  }

  .hero {
    padding-top: 90px;
  }

  .countdown {
    gap: 14px;
  }

  .countdown__item {
    padding: 24px 8px 19px;
  }

  .timeline::before {
    left: 118px;
  }

  .timeline__item {
    grid-template-columns: 98px 18px 1fr;
    gap: 18px;
  }

  .timeline__item time {
    font-size: 2.1rem;
  }

  .timeline__item h3 {
    font-size: 1rem;
  }

  .timeline__item p {
    font-size: 0.9rem;
  }

  .form-card {
    padding: 25px 28px;
  }

  .attendance-option {
    min-height: 154px;
  }
}

@media (min-width: 760px) {
  .story .section-inner {
    display: grid;
    grid-template-columns: minmax(240px, 0.78fr) minmax(300px, 1fr);
    column-gap: 42px;
    align-items: center;
  }

  .story .script-title,
  .story .milestones {
    grid-column: 1 / -1;
  }

  .story__photo {
    width: 100%;
    margin: 12px 0 0;
  }

  .story__copy {
    align-self: center;
  }

  .milestones {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .milestones::before {
    top: 50%;
    right: 10%;
    bottom: auto;
    left: 10%;
    width: auto;
    height: 1px;
  }

  .milestone {
    width: 100%;
  }

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

  .rsvp-form > * {
    grid-column: 1 / -1;
  }

  .rsvp-form > .field:nth-of-type(2),
  .rsvp-form > .compact-options:nth-of-type(2) {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

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

  .botanical.reveal,
  .botanical.reveal.is-visible,
  .botanical-garland.reveal,
  .botanical-garland.reveal.is-visible {
    opacity: var(--decor-opacity, 0.6);
    transform: var(--decor-transform, none);
    animation: none !important;
  }

  .botanical:hover img,
  .botanical-garland:hover img,
  .botanical.is-wind-touched img,
  .botanical-garland.is-wind-touched img {
    animation: none !important;
  }

  .timeline::before {
    transform: scaleY(1);
  }
}
