@font-face {
  font-family: "Baliglad";
  src: url("/fonts/Baliglad.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Qliesya";
  src: url("/fonts/Qliesya.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ivory: #fffaf6;
  --paper: #f9f1eb;
  --blush: #d1969a;
  --blush-light: #efd6d5;
  --rose-deep: #9f5f66;
  --wine: #624247;
  --sage: #7b876f;
  --gold: #b18a54;
  --ink: #463637;
  --line: rgba(98, 66, 71, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Qliesya", "Bodoni 72", Didot, Georgia, serif;
}

a {
  color: inherit;
}

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

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center start;
  padding: 3rem clamp(1.25rem, 7vw, 7rem) 5rem;
  background:
    linear-gradient(90deg, rgba(255,250,246,.9) 0%, rgba(255,250,246,.58) 43%, rgba(255,250,246,.08) 76%),
    url("images/template-hero.webp") center center / cover no-repeat;
  isolation: isolate;
}

.hero::before,
.hero::after {
  display: none;
}

.hero-shell {
  width: min(100%, 38rem);
  min-height: min(45rem, 82svh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 2rem;
  border: 1px solid rgba(177, 138, 84, 0.38);
  border-radius: 22rem 22rem 2rem 2rem;
  background: rgba(255, 250, 246, 0.76);
  box-shadow: 0 1.5rem 5rem rgba(98, 66, 71, 0.18);
  backdrop-filter: blur(10px);
}

.eyebrow,
.section-kicker,
.card-label,
.pantone,
.footer-date {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--rose-deep);
}

.monogram {
  width: 3.3rem;
  height: 3.3rem;
  display: grid;
  place-items: center;
  margin: 1.1rem 0 1.45rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.pretitle {
  max-width: 19rem;
  margin: 0;
  color: rgba(70, 54, 55, 0.75);
  font-size: clamp(0.88rem, 2.5vw, 1.05rem);
  letter-spacing: 0.08em;
}

.hero h1,
.countdown-section h2,
.details h2,
.godparents h2,
.dress-code h2,
.signature,
.footer-name {
  font-family: "Baliglad", "Brush Script MT", "Segoe Script", cursive;
  font-weight: 400;
}

.hero h1 {
  margin: 0.55rem 0 -0.6rem;
  color: var(--wine);
  font-size: clamp(5.2rem, 18vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.surname {
  margin: 0;
  color: var(--rose-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.29em;
  text-transform: uppercase;
}

.date-lockup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: min(100%, 24rem);
  margin: 2.2rem 0;
  color: var(--wine);
}

.date-lockup span {
  padding: 0.6rem 0;
  border-block: 1px solid var(--line);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.date-lockup strong {
  color: var(--rose-deep);
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1;
}

.button {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.45rem;
  border-radius: 999px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

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

.button:focus-visible,
.text-link:focus-visible,
.scroll-cue:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 4px;
}

.button-primary {
  background: var(--wine);
  color: #fff;
  box-shadow: 0 0.75rem 2rem rgba(98, 66, 71, 0.22);
}

.scroll-cue {
  position: absolute;
  bottom: 1.4rem;
  width: 1.7rem;
  height: 2.7rem;
  border: 1px solid rgba(98, 66, 71, 0.36);
  border-radius: 1rem;
}

.scroll-cue span {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: var(--rose-deep);
  animation: scroll 1.8s ease-in-out infinite;
}

@keyframes scroll {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.35; }
  50% { transform: translate(-50%, 0.75rem); opacity: 1; }
}

.petal {
  position: absolute;
  width: 0.85rem;
  height: 1.45rem;
  border-radius: 90% 10% 80% 20%;
  background: rgba(209, 150, 154, 0.68);
  animation: float 8s ease-in-out infinite;
}

.petal-one { top: 18%; left: 13%; rotate: 18deg; }
.petal-two { top: 27%; right: 12%; rotate: 82deg; animation-delay: -2s; }
.petal-three { bottom: 19%; left: 17%; rotate: 145deg; animation-delay: -4s; }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -1rem; }
}

.countdown-section,
.invitation-copy,
.details,
.godparents,
.dress-code {
  padding: 6rem 1.25rem;
}

.countdown-section {
  background: var(--ivory);
  text-align: center;
}

.section-icon {
  width: 4.25rem;
  height: 4.25rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1.2rem;
  border: 1px solid rgba(177, 138, 84, 0.32);
  border-radius: 1.35rem;
  background: linear-gradient(145deg, #fff, var(--paper));
  box-shadow: 0 0.8rem 2rem rgba(98, 66, 71, 0.1);
  rotate: -3deg;
}

.section-icon img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.section-icon-light {
  position: relative;
  z-index: 1;
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.16);
  box-shadow: none;
  rotate: 3deg;
}

.section-kicker {
  color: var(--rose-deep);
}

.countdown-section h2,
.details h2,
.godparents h2,
.dress-code h2 {
  margin: 0.25rem 0 2.4rem;
  color: var(--wine);
  font-size: clamp(3.2rem, 10vw, 5.4rem);
  line-height: 1;
}

.countdown {
  max-width: 46rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto 2rem;
  border-block: 1px solid var(--line);
}

.time-unit {
  position: relative;
  padding: 1.55rem 0.4rem;
}

.time-unit:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 27%;
  right: 0;
  width: 1px;
  height: 46%;
  background: var(--line);
}

.time-unit strong {
  display: block;
  color: var(--wine);
  font-size: clamp(1.65rem, 5vw, 2.9rem);
  font-weight: 400;
}

.time-unit span {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.48rem, 1.8vw, 0.62rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-link {
  color: var(--rose-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-underline-offset: 0.35rem;
}

.invitation-copy {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 30rem;
  background: var(--blush);
  color: #fffaf6;
  text-align: center;
}

.invitation-copy::before,
.invitation-copy::after {
  content: "“";
  position: absolute;
  color: rgba(255,255,255,.13);
  font-size: 15rem;
  line-height: 1;
}

.invitation-copy::before { top: 0; left: 4%; }
.invitation-copy::after { right: 4%; bottom: -2rem; rotate: 180deg; }

.invitation-copy p {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2.15rem);
  line-height: 1.55;
}

.signature {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  font-size: 3rem;
}

.details {
  position: relative;
  max-width: 74rem;
  margin: auto;
}

.details::before {
  content: "✦  ·  ✦";
  position: absolute;
  top: 3.2rem;
  right: 1.5rem;
  color: var(--blush);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: .8rem;
  opacity: .55;
}

.section-heading {
  text-align: center;
}

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

.event-card {
  position: relative;
  min-height: 28rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1.5rem 4rem rgba(98, 66, 71, 0.09);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.event-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: .38rem;
  background: linear-gradient(90deg, var(--blush), var(--gold), var(--sage));
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 2rem 5rem rgba(98, 66, 71, 0.14);
}

.featured-card {
  background: linear-gradient(145deg, var(--paper), #fff9f5);
}

.card-topline {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.card-icon {
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  border-radius: 1.35rem;
  background: var(--blush-light);
  box-shadow: inset 0 0 0 1px rgba(159,95,102,.1);
  rotate: -4deg;
}

.card-icon img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.card-number {
  padding: .45rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--rose-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.card-label {
  color: var(--rose-deep);
}

.event-card h3 {
  max-width: 20rem;
  margin: 0.75rem 0;
  color: var(--wine);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
}

.event-card p:not(.card-label):not(.card-time) {
  max-width: 23rem;
  margin: 0 0 1.6rem;
  line-height: 1.65;
}

.card-time {
  margin: 0 0 0.6rem;
  color: var(--gold);
  font-size: 1.05rem;
  font-style: italic;
}

.button-outline {
  border: 1px solid var(--wine);
  color: var(--wine);
}

.button-outline:hover {
  background: var(--wine);
  color: #fff;
}

.godparents {
  position: relative;
  background: #f7e7e4;
  text-align: center;
}

.godparents h2 {
  margin-bottom: 1.6rem;
}

.names p {
  margin: 0;
  color: var(--wine);
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.names span {
  display: block;
  margin: 0.6rem;
  color: var(--gold);
  font-style: italic;
}

.botanical {
  position: absolute;
  width: 8rem;
  height: 13rem;
  opacity: 0.17;
  background:
    radial-gradient(ellipse at 25% 20%, var(--sage) 0 10%, transparent 11%),
    radial-gradient(ellipse at 70% 38%, var(--sage) 0 11%, transparent 12%),
    radial-gradient(ellipse at 30% 58%, var(--sage) 0 10%, transparent 11%),
    linear-gradient(72deg, transparent 48%, var(--sage) 49% 51%, transparent 52%);
}

.botanical-left { left: -1rem; bottom: -2rem; rotate: 15deg; }
.botanical-right { right: -1rem; top: -2rem; rotate: 195deg; }

.dress-code {
  max-width: 62rem;
  display: grid;
  grid-template-columns: 15rem 1fr;
  align-items: center;
  gap: clamp(2rem, 7vw, 5rem);
  margin: 6rem auto;
  padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: 2.25rem;
  background: linear-gradient(135deg, #fff, var(--paper));
  box-shadow: 0 1.5rem 4rem rgba(98, 66, 71, 0.09);
}

.dress-visual {
  width: 15rem;
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 2rem;
  background: linear-gradient(145deg, var(--blush-light), #fff7f3);
  box-shadow: inset 0 0 0 1px rgba(159,95,102,.1);
}

.attire-art {
  width: 78%;
  height: auto;
  max-height: 10rem;
  object-fit: contain;
}

.dress-code h2 {
  margin-bottom: 1rem;
}

.dress-code p:not(.section-kicker):not(.color-name) {
  max-width: 31rem;
  font-size: 1.08rem;
  line-height: 1.7;
}

.color-name {
  margin-top: 1.4rem;
  color: var(--rose-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.6;
  text-transform: uppercase;
}

footer {
  min-height: 31rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.25rem;
  background:
    linear-gradient(rgba(67, 39, 44, 0.82), rgba(55, 31, 35, 0.9)),
    url("images/template-hero.webp") center center / cover no-repeat;
  color: #fffaf6;
  text-align: center;
}

.footer-mark {
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  margin-bottom: 2rem;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 50%;
  color: var(--blush-light);
}

.footer-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
}

.footer-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

footer > p:not(.footer-date) {
  max-width: 28rem;
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.6;
}

.footer-name {
  margin: 0.7rem 0 1.5rem;
  color: var(--blush-light);
  font-size: 4.5rem;
  line-height: 1;
}

.footer-date {
  color: rgba(255,255,255,.68);
}

.designer-credit {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-top: 2.2rem;
  color: rgba(255,255,255,.55);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .54rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.designer-credit a {
  color: inherit;
  text-decoration: none;
}

.designer-logo-link {
  display: flex;
  align-items: center;
  width: 6.25rem;
  padding: 0;
  background: transparent;
  transition: transform 180ms ease, opacity 180ms ease;
}

.designer-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: .72;
}

.designer-logo-link:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.music-control {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 2.9rem;
  padding: .62rem 1rem;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(91, 52, 59, .88);
  box-shadow: 0 .7rem 2rem rgba(55, 31, 35, .22);
  color: #fffaf6;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, background 180ms ease;
}

.music-control:hover {
  transform: translateY(-2px);
  background: rgba(91, 52, 59, .98);
}

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

.music-bars {
  width: 1.05rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.music-bars i {
  width: 2px;
  height: 45%;
  display: block;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.music-control.is-playing .music-bars i {
  animation: music-pulse .7s ease-in-out infinite alternate;
}

.music-control.is-playing .music-bars i:nth-child(2) {
  animation-delay: -.35s;
}

.music-control.is-playing .music-bars i:nth-child(3) {
  animation-delay: -.15s;
}

@keyframes music-pulse {
  from { transform: scaleY(.45); }
  to { transform: scaleY(1.65); }
}

@media (prefers-reduced-motion: reduce) {
  .music-control.is-playing .music-bars i {
    animation: none;
  }
}

@media (max-width: 720px) {
  .hero {
    place-items: center;
    padding-inline: 1.1rem;
    background:
      linear-gradient(180deg, rgba(255,250,246,.34), rgba(255,250,246,.58)),
      url("images/template-hero.webp") 62% center / cover no-repeat;
  }

  .hero-shell {
    width: 100%;
    min-height: 78svh;
    padding-inline: 1.25rem;
    background: rgba(255, 250, 246, 0.74);
  }

  .date-lockup {
    gap: 0.65rem;
  }

  .date-lockup span {
    font-size: 0.53rem;
  }

  .countdown-section,
  .invitation-copy,
  .details,
  .godparents,
  .dress-code {
    padding-block: 4.8rem;
  }

  .event-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    min-height: 26rem;
    border-radius: 1.6rem;
  }

  .dress-code {
    grid-template-columns: 1fr;
    justify-items: center;
    margin: 4.8rem 1.25rem;
    text-align: center;
  }

  .dress-visual {
    width: min(100%, 15rem);
  }
}

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