/* Birthday signup (/birthday, /birthday/thanks) — standalone, mobile-first */

:root {
  --bd-red: #a31f24;
  --bd-red-deep: #7f191d;
  --bd-blue: #00569f;
  --bd-gold: #f2b632;
  --bd-ink: #1f2630;
  --bd-ink-dim: #4b5a6c;
  --bd-line: #d8dee7;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f6f7f9 0%, #eceff3 100%);
  color: var(--bd-ink);
  font-family: Lato, "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

.bd-main {
  flex: 1;
  width: min(560px, calc(100vw - 1.25rem));
  margin: 0 auto;
  padding: 0.9rem 0 1.5rem;
}

/* Hero */
.bd-hero {
  position: relative;
  isolation: isolate;
  padding: 0.85rem 2.6rem 1rem;
  text-align: center;
}

.bd-hero::before {
  content: "";
  position: absolute;
  inset: -0.4rem 0 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle, var(--bd-gold) 0 3px, transparent 3.5px) 8% 18% / 14px 14px no-repeat,
    radial-gradient(circle, var(--bd-blue) 0 2.5px, transparent 3px) 22% 82% / 12px 12px no-repeat,
    radial-gradient(circle, var(--bd-red) 0 2.5px, transparent 3px) 30% 6% / 12px 12px no-repeat,
    radial-gradient(circle, var(--bd-gold) 0 2px, transparent 2.5px) 50% 96% / 10px 10px no-repeat,
    radial-gradient(circle, var(--bd-blue) 0 3px, transparent 3.5px) 70% 4% / 14px 14px no-repeat,
    radial-gradient(circle, var(--bd-red) 0 2.5px, transparent 3px) 80% 88% / 12px 12px no-repeat,
    radial-gradient(circle, var(--bd-gold) 0 2.5px, transparent 3px) 94% 40% / 12px 12px no-repeat,
    radial-gradient(circle, var(--bd-blue) 0 2px, transparent 2.5px) 4% 60% / 10px 10px no-repeat;
  opacity: 0.85;
}

.bd-hero h1 {
  margin: 0;
  font-family: Montserrat, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.6rem, 7.2vw, 2.35rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--bd-ink);
}

.bd-hero h1 em {
  font-style: normal;
  color: var(--bd-red);
}

.bd-sub {
  margin: 0.55rem auto 0;
  max-width: 34ch;
  font-size: 1rem;
  color: var(--bd-ink-dim);
}

/* Balloons */
.bd-balloon {
  position: absolute;
  width: 30px;
  height: 60px;
  pointer-events: none;
  animation: bd-float 4.5s ease-in-out infinite;
}

.bd-balloon--red {
  top: 0.2rem;
  left: 0;
  color: var(--bd-red);
}

.bd-balloon--blue {
  top: 1.6rem;
  left: 1.1rem;
  width: 22px;
  height: 44px;
  color: var(--bd-blue);
  animation-delay: -1.5s;
}

.bd-balloon--gold {
  top: 0.6rem;
  right: 0;
  color: var(--bd-gold);
  animation-delay: -3s;
}

@keyframes bd-float {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-6px) rotate(3deg);
  }
}

/* Form card */
.bd-card {
  position: relative;
  margin-top: 0.4rem;
  padding: 1.05rem 0.9rem 0.4rem;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--bd-line);
  box-shadow: 0 16px 34px rgba(17, 37, 57, 0.09);
  overflow: hidden;
}

.bd-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--bd-red) 0 10px,
    #ffffff 10px 16px,
    var(--bd-blue) 16px 26px,
    #ffffff 26px 32px
  );
}

.bd-card iframe {
  display: block;
  width: 100%;
  min-height: 600px;
  border: 0;
}

.bd-note {
  position: relative;
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #fff6e0;
  border: 1px solid #f2d48a;
  color: var(--bd-ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.bd-fineprint {
  margin: 0.8rem auto 0;
  max-width: 40ch;
  text-align: center;
  font-size: 0.78rem;
  color: #7a8594;
}

.bd-footer {
  padding: 0.5rem 1rem 1.2rem;
  text-align: center;
  font-size: 0.72rem;
  color: #98a3b2;
}

.bd-footer a {
  display: inline-block;
  padding: 0.5rem 0.15rem;
  color: #5b6676;
}

/* Thanks page */
.bd-main--thanks {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 14vh;
}

.bd-thanks {
  position: relative;
  margin-top: 1.4rem;
  padding: 2.2rem 1.4rem 2rem;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--bd-line);
  box-shadow: 0 16px 34px rgba(17, 37, 57, 0.09);
  text-align: center;
  overflow: hidden;
}

.bd-thanks .bd-gift {
  display: block;
  width: 84px;
  height: 84px;
  margin: 0 auto 0.9rem;
  animation: bd-pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.bd-thanks h1 {
  margin: 0;
  font-family: Montserrat, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(2rem, 9vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bd-red);
}

.bd-thanks p {
  margin: 0.5rem auto 0;
  max-width: 28ch;
  font-size: 1.05rem;
  color: var(--bd-ink-dim);
}

.bd-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bd-burst i {
  position: absolute;
  top: 34%;
  left: 50%;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0;
  animation: bd-burst 1.4s ease-out 0.15s forwards;
}

.bd-burst i:nth-child(3n + 1) { background: var(--bd-red); }
.bd-burst i:nth-child(3n + 2) { background: var(--bd-blue); }
.bd-burst i:nth-child(3n + 3) { background: var(--bd-gold); }

.bd-burst i:nth-child(1)  { --x: -130px; --y: -70px;  --r: 200deg; }
.bd-burst i:nth-child(2)  { --x: 120px;  --y: -80px;  --r: -160deg; }
.bd-burst i:nth-child(3)  { --x: -90px;  --y: 60px;   --r: 120deg; }
.bd-burst i:nth-child(4)  { --x: 100px;  --y: 70px;   --r: -220deg; }
.bd-burst i:nth-child(5)  { --x: -150px; --y: 10px;   --r: 260deg; }
.bd-burst i:nth-child(6)  { --x: 150px;  --y: -10px;  --r: -280deg; }
.bd-burst i:nth-child(7)  { --x: -40px;  --y: -110px; --r: 180deg; }
.bd-burst i:nth-child(8)  { --x: 50px;   --y: -100px; --r: -140deg; }
.bd-burst i:nth-child(9)  { --x: -60px;  --y: 100px;  --r: 300deg; }
.bd-burst i:nth-child(10) { --x: 70px;   --y: 95px;   --r: -240deg; }

@keyframes bd-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r));
  }
}

@keyframes bd-pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (min-width: 640px) {
  .bd-main {
    padding-top: 1.6rem;
  }

  .bd-hero {
    padding: 1rem 3.4rem 1.3rem;
  }

  .bd-balloon {
    width: 38px;
    height: 76px;
  }

  .bd-balloon--blue {
    width: 28px;
    height: 56px;
    left: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-balloon,
  .bd-thanks .bd-gift {
    animation: none;
  }

  .bd-burst {
    display: none;
  }
}
