:root {
  color-scheme: only light;
  --ink: #26342b;
  --muted: #647062;
  --paper: #eeefe5;
  --cream: #f8f9f1;
  --soft-sage: #c5d0b8;
  --sage: #8faa8e;
  --deep-sage: #466b50;
  --moss: #385841;
  --line: rgba(38, 52, 43, 0.16);
}

* { box-sizing: border-box; }

html {
  color-scheme: only light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Manrope, system-ui, sans-serif;
  line-height: 1.55;
}

body.is-submitting {
  overflow: hidden;
  touch-action: none;
}

a { color: inherit; text-decoration: none; }

.opening {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: var(--moss);
  animation: opening-out 1.6s ease 1.25s forwards;
}

.opening__logo {
  width: min(300px, 68vw);
  height: auto;
  border-radius: 50%;
  opacity: 0;
  filter: invert(1);
  animation: mark-in 2.1s ease forwards;
}

.opening__line {
  position: absolute;
  bottom: 20%;
  width: min(260px, 54vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, #d8dfcb, transparent);
  transform: scaleX(0);
  animation: line-in 1.9s ease 0.25s forwards;
}

.botanical-frame {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.botanical-frame__sprig {
  position: absolute;
  width: 1px;
  height: 310px;
  background: linear-gradient(180deg, transparent, rgba(70, 107, 80, 0.42), transparent);
  opacity: 0.72;
  transform-origin: center bottom;
}

.botanical-frame__sprig span {
  position: absolute;
  width: 48px;
  height: 18px;
  border: 1px solid rgba(70, 107, 80, 0.34);
  border-left: 0;
  border-radius: 0 100% 0 100%;
  background: linear-gradient(135deg, rgba(197, 208, 184, 0.28), rgba(143, 170, 142, 0.08));
  transform-origin: left center;
}

.botanical-frame__sprig span:nth-child(1) { top: 34px; left: 0; transform: rotate(-34deg); }
.botanical-frame__sprig span:nth-child(2) { top: 86px; right: 0; transform: rotate(214deg); }
.botanical-frame__sprig span:nth-child(3) { top: 142px; left: 0; transform: rotate(-28deg); }
.botanical-frame__sprig span:nth-child(4) { top: 198px; right: 0; transform: rotate(208deg); }
.botanical-frame__sprig span:nth-child(5) { top: 246px; left: 0; transform: rotate(-26deg); }

.botanical-frame__sprig--left {
  top: 14vh;
  left: clamp(12px, 3vw, 42px);
  transform: rotate(10deg);
}

.botanical-frame__sprig--right {
  top: 18vh;
  right: clamp(12px, 3vw, 42px);
  transform: rotate(190deg) scaleX(-1);
}

.botanical-frame__sprig--lower-left {
  bottom: 8vh;
  left: clamp(8px, 2vw, 30px);
  height: 250px;
  opacity: 0.46;
  transform: rotate(-18deg);
}

.botanical-frame__sprig--lower-right {
  right: clamp(8px, 2vw, 30px);
  bottom: 16vh;
  height: 250px;
  opacity: 0.46;
  transform: rotate(198deg) scaleX(-1);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  justify-items: center;
  overflow: hidden;
  padding: 20px 18px 72px;
  background:
    linear-gradient(180deg, rgba(238, 239, 229, 0.86), rgba(238, 239, 229, 0.98)),
    radial-gradient(circle at 50% 7%, rgba(197, 208, 184, 0.72), transparent 32%),
    radial-gradient(circle at 18% 72%, rgba(143, 170, 142, 0.34), transparent 34%),
    #eeefe5;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -22% -22% -22%;
  height: 36vh;
  background: rgba(248, 249, 241, 0.62);
  border-radius: 50% 50% 0 0;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(100%, 820px);
  text-align: center;
}

.hero__logo {
  display: block;
  width: min(330px, 80vw);
  height: auto;
  margin: 0 auto 10px;
  border-radius: 50%;
  mix-blend-mode: multiply;
  filter: contrast(1.05);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--deep-sage);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  font-family: Italiana, "Times New Roman", serif;
  font-weight: 400;
  line-height: 0.98;
}

h1 {
  font-family: Parisienne, cursive;
  font-size: clamp(3.9rem, 17vw, 8.9rem);
}

h2 { font-size: clamp(2.6rem, 11vw, 5.4rem); }

h3 { font-size: clamp(2.15rem, 8vw, 3.9rem); }

.hero__date {
  display: grid;
  gap: 4px;
  width: min(100%, 560px);
  margin: 10px auto 20px;
  padding: 16px;
  border-top: 1px solid rgba(70, 107, 80, 0.28);
  border-bottom: 1px solid rgba(70, 107, 80, 0.28);
}

.hero__date span {
  color: var(--deep-sage);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero__date strong {
  font-family: Italiana, "Times New Roman", serif;
  font-size: clamp(2.15rem, 8vw, 4.7rem);
  font-weight: 400;
  line-height: 1;
}

.hero__copy,
.section__inner p,
.rsvp__copy p {
  max-width: 640px;
  margin-inline: auto;
  color: var(--muted);
  font-size: clamp(1rem, 3.8vw, 1.18rem);
}

.hero__places {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 26px auto 0;
}

.place-pill {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 84px;
  padding: 12px;
  border: 1px solid rgba(70, 107, 80, 0.22);
  border-radius: 8px;
  background: rgba(248, 249, 241, 0.72);
  text-align: left;
  box-shadow: 0 18px 42px rgba(56, 88, 65, 0.08);
}

.place-pill__time,
.timeline__item span {
  display: grid;
  place-items: center;
  min-width: 78px;
  min-height: 58px;
  padding: 0 10px;
  color: var(--cream);
  background: var(--moss);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.place-pill strong {
  display: block;
  font-family: Italiana, "Times New Roman", serif;
  font-size: 1.48rem;
  font-weight: 400;
  line-height: 1.05;
}

.place-pill span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero__actions {
  display: grid;
  gap: 12px;
  width: min(100%, 520px);
  margin: 24px auto 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover { transform: translateY(-2px); }

.button--primary {
  color: var(--cream);
  background: var(--moss);
  box-shadow: 0 18px 42px rgba(56, 88, 65, 0.24);
}

.button--ghost {
  background: rgba(248, 249, 241, 0.68);
  backdrop-filter: blur(14px);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  width: 30px;
  height: 48px;
  border: 1px solid rgba(70, 107, 80, 0.36);
  border-radius: 999px;
  transform: translateX(-50%);
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  transform: translateX(-50%);
  animation: cue 2.5s ease infinite;
}

.section {
  padding: clamp(70px, 13vw, 130px) 18px;
}

.section__inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  padding-top: 0;
  background: var(--line);
}

.timeline__item {
  min-height: 230px;
  padding: 30px 22px;
  background: var(--cream);
  border-top: 4px solid var(--deep-sage);
}

.timeline__item:first-child { border-top-color: var(--moss); }
.timeline__item:nth-child(2) { border-top-color: var(--sage); }

.timeline__item span {
  display: inline-grid;
  min-width: 96px;
  min-height: 46px;
  margin-bottom: 18px;
  border-radius: 999px;
}

.timeline__item p,
.location-card p,
.gift p {
  color: var(--muted);
}

.locations { background: #dfe6d5; }

.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1100px;
  margin: 38px auto 0;
}

.location-card {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 22px;
  border: 1px solid rgba(70, 107, 80, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(rgba(248, 249, 241, 0.9), rgba(248, 249, 241, 0.92)),
    radial-gradient(circle at 20% 12%, rgba(143, 170, 142, 0.36), transparent 34%);
}

.location-card--dark {
  color: var(--cream);
  background:
    linear-gradient(rgba(56, 88, 65, 0.9), rgba(56, 88, 65, 0.92)),
    radial-gradient(circle at 80% 10%, rgba(197, 208, 184, 0.34), transparent 38%);
}

.location-card__label {
  color: var(--deep-sage);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.location-card h3 {
  margin-top: 10px;
  font-size: clamp(2.35rem, 10vw, 4.15rem);
}

.location-card p {
  font-size: 1.04rem;
  font-weight: 700;
}

.location-card--dark p { color: rgba(248, 249, 241, 0.82); }

.text-link {
  margin-top: 16px;
  color: var(--deep-sage);
  font-weight: 800;
}

.text-link--light { color: #dfe8cc; }

.gift { background: var(--moss); }

.gift__panel {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px;
  border: 1px solid rgba(248, 249, 241, 0.2);
  border-radius: 8px;
  color: var(--cream);
  text-align: center;
}

.gift__panel p { color: rgba(248, 249, 241, 0.82); }

.iban {
  overflow-wrap: anywhere;
  margin: 24px 0 10px;
  border: 0;
  padding: 0;
  color: #dfe8cc;
  background: transparent;
  font-size: clamp(1.22rem, 6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  -webkit-tap-highlight-color: transparent;
}

.iban:focus-visible {
  outline: 2px solid #dfe8cc;
  outline-offset: 8px;
}

.gift__name {
  margin: 0;
  color: rgba(248, 249, 241, 0.82);
  font-size: 0.95rem;
}

.gift__name--copy {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.gift__name--copy:focus-visible {
  outline: 2px solid #dfe8cc;
  outline-offset: 6px;
}

.rsvp {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start;
  background:
    radial-gradient(circle at 8% 20%, rgba(143, 170, 142, 0.24), transparent 30%),
    var(--paper);
}

.rsvp__form {
  display: grid;
  gap: 16px;
  padding: 24px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 0 28px 70px rgba(56, 88, 65, 0.1);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

input, select, textarea {
  width: 100%;
  border: 1px solid rgba(70, 107, 80, 0.22);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  -webkit-text-fill-color: var(--ink);
  appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(100, 112, 98, 0.78);
  -webkit-text-fill-color: rgba(100, 112, 98, 0.78);
}

textarea { resize: vertical; }

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--sage);
  font-weight: 800;
}

.submit-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(38, 52, 43, 0.46);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(5px);
  transition: opacity 1.22s ease, visibility 1.22s ease;
}

.submit-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.submit-overlay__panel {
  display: grid;
  justify-items: center;
  gap: 16px;
  min-width: min(100%, 250px);
  padding: 28px 24px;
  border: 1px solid rgba(248, 249, 241, 0.32);
  border-radius: 8px;
  color: var(--cream);
  background: rgba(56, 88, 65, 0.92);
  box-shadow: 0 28px 80px rgba(31, 44, 35, 0.34);
  font-weight: 800;
  text-align: center;
}

.submit-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(248, 249, 241, 0.28);
  border-top-color: var(--cream);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 40;
  width: min(calc(100% - 36px), 360px);
  padding: 14px 18px;
  border: 1px solid rgba(248, 249, 241, 0.28);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(56, 88, 65, 0.96);
  box-shadow: 0 18px 44px rgba(31, 44, 35, 0.28);
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 1.22s ease, transform 1.22s ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.footer {
  padding: 34px 20px;
  color: var(--muted);
  text-align: center;
}

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

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

@keyframes mark-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes line-in { to { transform: scaleX(1); } }

@keyframes opening-out { to { opacity: 0; visibility: hidden; } }

@keyframes cue {
  0% { opacity: 0; transform: translate(-50%, 0); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 20px); }
}

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

@media (min-width: 760px) {
  .hero { padding: 34px clamp(32px, 5vw, 72px) 76px; }
  .hero__places,
  .hero__actions,
  .location-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rsvp {
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
    gap: clamp(34px, 7vw, 90px);
  }
  .section { padding-inline: clamp(32px, 5vw, 72px); }
  .location-card { padding: clamp(30px, 4vw, 52px); }
  .gift__panel { padding: clamp(34px, 6vw, 70px); }
  .rsvp__form { padding: clamp(28px, 4vw, 38px); }
}

@media (max-width: 380px) {
  h1 { font-size: 3.55rem; }
  .hero__logo { width: 250px; }
  .place-pill { grid-template-columns: 1fr; text-align: center; }
  .place-pill__time { width: 100%; }
}

@media (max-width: 760px) {
  .botanical-frame__sprig {
    height: 230px;
    opacity: 0.34;
  }

  .botanical-frame__sprig span {
    width: 34px;
    height: 14px;
  }

  .botanical-frame__sprig--left {
    top: 6vh;
    left: -3px;
  }

  .botanical-frame__sprig--right {
    top: 10vh;
    right: -3px;
  }

  .botanical-frame__sprig--lower-left,
  .botanical-frame__sprig--lower-right {
    opacity: 0.22;
  }
}

@media (prefers-color-scheme: dark) {
  html,
  body {
    color: var(--ink) !important;
    background: var(--paper) !important;
  }

  .hero,
  .rsvp {
    color: var(--ink) !important;
    background:
      linear-gradient(180deg, rgba(238, 239, 229, 0.86), rgba(238, 239, 229, 0.98)),
      radial-gradient(circle at 50% 7%, rgba(197, 208, 184, 0.72), transparent 32%),
      radial-gradient(circle at 18% 72%, rgba(143, 170, 142, 0.34), transparent 34%),
      var(--paper) !important;
  }

  .section,
  .timeline__item,
  .location-card,
  .rsvp__form {
    color: var(--ink) !important;
    background-color: var(--cream) !important;
  }

  .locations {
    background: #dfe6d5 !important;
  }

  .gift,
  .opening,
  .place-pill__time,
  .timeline__item span,
  .button--primary,
  .copy-toast,
  .submit-overlay__panel {
    color: var(--cream) !important;
    background-color: var(--moss) !important;
  }

  .place-pill,
  .button--ghost {
    color: var(--ink) !important;
    background-color: rgba(248, 249, 241, 0.72) !important;
  }

  input,
  select,
  textarea {
    border-color: rgba(70, 107, 80, 0.22) !important;
    color: var(--ink) !important;
    background: var(--paper) !important;
    -webkit-text-fill-color: var(--ink) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
