/* Layout system for generated templates. The preserved original does not load this file. */
body:not(.theme-original) {
  --template-rail: 74rem;
  --template-gutter: clamp(1.25rem, 4vw, 3rem);
  --template-section-space: clamp(3.5rem, 5vw, 4.75rem);
  --template-grid-space: clamp(1.25rem, 2.8vw, 2.25rem);
  --template-card-space: clamp(1.2rem, 2vw, 1.65rem);
}

body:not(.theme-original) .section {
  width: min(calc(100% - var(--template-gutter)), var(--template-rail));
  padding-block: var(--template-section-space);
}

body:not(.theme-original) .hero {
  min-height: auto;
  padding-block: clamp(3rem, 5vw, 4.5rem);
}

body:not(.theme-original) .hero__grid {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr);
  gap: clamp(2rem, 4.5vw, 4.25rem);
  align-items: center;
}

body:not(.theme-original) .hero-copy,
body:not(.theme-original) .hero-visual,
body:not(.theme-original) .hero-frame,
body:not(.theme-original) .hero-frame__peek {
  min-width: 0;
}

body:not(.theme-original) .hero-copy {
  align-self: center;
  max-width: 38rem;
  margin: 0;
  padding: clamp(1.35rem, 2vw, 1.75rem);
}

body:not(.theme-original) .hero-copy h1 {
  max-width: 10ch;
  margin: 0.9rem 0 0;
  font-size: clamp(3rem, 5vw, 4.45rem);
  line-height: 0.96;
}

body:not(.theme-original) .hero-copy__lead {
  max-width: 34rem;
  margin-top: 1.15rem;
  font-size: 1.02rem;
  line-height: 1.65;
}

body:not(.theme-original) .hero-copy__actions {
  gap: 0.75rem;
  margin-top: 1.35rem;
}

body:not(.theme-original) .hero-copy__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.35rem;
}

body:not(.theme-original) .fact-card {
  min-width: 0;
  padding: 1rem 1.1rem;
}

body:not(.theme-original) .hero-visual {
  display: block;
  width: min(100%, 30rem);
  height: auto;
  margin: 0;
  padding: 0;
  justify-self: end;
}

body:not(.theme-original) .hero-frame {
  width: 100%;
  margin: 0;
  transform: none;
}

body:not(.theme-original) .hero-frame__peek {
  min-height: 0;
}

body:not(.theme-original) .hero-frame__peek img {
  display: block;
  width: 100%;
  max-height: 32rem;
  margin: 0;
  object-fit: contain;
}

body:not(.theme-original) .hero-frame__badge {
  position: absolute;
  right: auto;
  bottom: 0.75rem;
  left: 0.75rem;
  width: min(14rem, calc(100% - 1.5rem));
  margin: 0;
}

body:not(.theme-original) .hero-floating {
  position: absolute;
  z-index: 3;
  width: min(13rem, 46%);
  margin: 0;
  padding: 0.85rem 1rem;
}

body:not(.theme-original) .hero-floating-left {
  inset: 0 auto auto -1rem;
}

body:not(.theme-original) .hero-floating-right {
  inset: auto -0.5rem -0.5rem auto;
}

body:not(.theme-original) .section-heading,
body:not(.theme-original) .location .section-heading,
body:not(.theme-original) .details .section-heading {
  max-width: 48rem;
  margin-bottom: clamp(1.25rem, 2.2vw, 1.75rem);
}

body:not(.theme-original) .section-heading h2,
body:not(.theme-original) .blessing-copy h2 {
  margin-top: 0.8rem;
  font-size: clamp(2.45rem, 4.2vw, 3.8rem);
  line-height: 1.02;
}

body:not(.theme-original) .section-heading p,
body:not(.theme-original) .blessing-copy p {
  margin-top: 0.9rem;
  line-height: 1.65;
}

body:not(.theme-original) .hero__grid,
body:not(.theme-original) .theme-showcase__grid,
body:not(.theme-original) .blessing-panel__inner,
body:not(.theme-original) .location,
body:not(.theme-original) .details,
body:not(.theme-original) .rsvp-card {
  column-gap: var(--template-grid-space);
}

body:not(.theme-original) .celebration-grid,
body:not(.theme-original) .details-grid,
body:not(.theme-original) .guest-notes-grid,
body:not(.theme-original) .theme-showcase__cards,
body:not(.theme-original) .blessing-side,
body:not(.theme-original) .blessing-points,
body:not(.theme-original) .form-grid {
  gap: clamp(0.9rem, 1.8vw, 1.25rem);
}

body:not(.theme-original) .celebration-card,
body:not(.theme-original) .theme-note,
body:not(.theme-original) .detail-card,
body:not(.theme-original) .guest-note-card {
  min-width: 0;
  padding: var(--template-card-space);
}

body:not(.theme-original) .blessing-panel,
body:not(.theme-original) .rsvp-card {
  padding: clamp(1.4rem, 2.5vw, 2rem);
}

body:not(.theme-original) .theme-note:nth-child(2),
body:not(.theme-original) .theme-note:nth-child(3),
body:not(.theme-original) .celebration-card--wide {
  transform: none;
}

@media (max-width: 960px) {
  body:not(.theme-original) {
    --template-gutter: 2rem;
    --template-section-space: clamp(2.75rem, 8vw, 3.75rem);
  }

  body:not(.theme-original) .hero {
    display: block;
    min-height: auto;
    padding-block: 1.75rem 3.25rem;
  }

  body:not(.theme-original) .hero__grid,
  body:not(.theme-original) .theme-showcase__grid,
  body:not(.theme-original) .blessing-panel__inner,
  body:not(.theme-original) .location,
  body:not(.theme-original) .details,
  body:not(.theme-original) .rsvp-card,
  body:not(.theme-original) .celebration-grid,
  body:not(.theme-original) .details-grid,
  body:not(.theme-original) .guest-notes-grid,
  body:not(.theme-original) .form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.theme-original) .hero__grid {
    gap: 1.5rem;
  }

  body:not(.theme-original) .hero-copy {
    order: 1;
    width: 100%;
    max-width: 36rem;
    margin-inline: auto;
    padding: clamp(1.2rem, 5vw, 1.65rem);
  }

  body:not(.theme-original) .hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(2.55rem, 11.5vw, 3.45rem);
    line-height: 0.98;
  }

  body:not(.theme-original) .hero-copy__lead {
    margin-top: 1rem;
    font-size: 0.98rem;
    line-height: 1.6;
  }

  body:not(.theme-original) .hero-copy__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 1.15rem;
  }

  body:not(.theme-original) .hero-copy__actions .button {
    width: 100%;
    justify-content: space-between;
  }

  body:not(.theme-original) .hero-copy__facts {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 1rem;
  }

  body:not(.theme-original) .hero-visual {
    order: 2;
    width: min(100%, 25rem);
    max-width: 25rem;
    margin-inline: auto;
    padding: 0;
    justify-self: center;
  }

  body:not(.theme-original) .hero-frame__peek img {
    max-height: 23rem;
  }

  body:not(.theme-original) .hero-floating {
    display: none;
  }

  body:not(.theme-original) .hero-frame__badge {
    right: auto;
    bottom: 0.6rem;
    left: 0.6rem;
    max-width: 11.5rem;
    padding: 0.8rem 0.9rem;
  }

  body:not(.theme-original) .section-heading,
  body:not(.theme-original) .location .section-heading,
  body:not(.theme-original) .details .section-heading {
    max-width: 36rem;
    margin-bottom: 1.15rem;
  }

  body:not(.theme-original) .section-heading h2,
  body:not(.theme-original) .blessing-copy h2 {
    margin-top: 0.65rem;
    font-size: clamp(2.1rem, 9.5vw, 2.8rem);
    line-height: 1.04;
  }

  body:not(.theme-original) .celebration-card,
  body:not(.theme-original) .celebration-card--wide,
  body:not(.theme-original) .detail-card,
  body:not(.theme-original) .guest-note-card,
  body:not(.theme-original) .theme-note {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 0;
    transform: none !important;
  }

  body:not(.theme-original) .theme-showcase__photo,
  body:not(.theme-original) .details-image,
  body:not(.theme-original) .blessing-image {
    width: min(100%, 28rem);
    margin-inline: auto;
  }

  body:not(.theme-original) .section-nav {
    width: min(calc(100vw - 1rem), 32rem);
    max-width: calc(100vw - 1rem);
    padding: 0.25rem;
  }

  body:not(.theme-original) .section-nav a {
    min-height: 2.45rem;
    padding: 0.55rem 0.08rem;
    font-size: clamp(0.6rem, 2.45vw, 0.72rem);
  }

  body:not(.theme-original) .music-toggle {
    right: 0.75rem;
    bottom: 4.8rem;
  }
}

@media (min-width: 961px) and (max-width: 1180px) {
  body:not(.theme-original) .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.82fr);
    gap: 2rem;
  }

  body:not(.theme-original) .hero-copy h1 {
    font-size: clamp(3rem, 5.8vw, 4.25rem);
  }
}

@media (max-width: 520px) {
  body:not(.theme-original) {
    --template-gutter: 2rem;
    --template-card-space: 1.15rem;
  }

  body:not(.theme-original) .hero-copy {
    padding: 1.15rem;
  }

  body:not(.theme-original) .hero-copy__facts {
    display: none;
  }

  body:not(.theme-original) .hero-copy h1 {
    font-size: clamp(2.35rem, 11.5vw, 2.85rem);
  }

  body:not(.theme-original) .hero-frame__peek img {
    max-height: 20rem;
  }

  body:not(.theme-original) .blessing-panel,
  body:not(.theme-original) .rsvp-card {
    padding: 1rem;
  }
}
