:root {
  --ink: #21162b;
  --cream: #fff9e9;
  --red: #ee304c;
  --orange: #ff8d29;
  --yellow: #ffc933;
  --blue: #4267e6;
  --purple: #6d3ebf;
  --pink: #ff6e9d;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--cream);
  font-family: "Fredoka", "Arial Rounded MT Bold", sans-serif;
}

#confetti {
  position: fixed;
  z-index: 20;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(840px, 100svh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(34px, 6vw, 70px) 24px 26px;
  color: var(--cream);
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, #4b0f20 0 7%, transparent 7.3%),
    linear-gradient(145deg, #e92341 0%, #f64e38 56%, #df1e48 100%);
}

.sun-rays {
  position: absolute;
  z-index: -1;
  width: 135vmax;
  height: 135vmax;
  top: 30%;
  left: 50%;
  opacity: .15;
  background: repeating-conic-gradient(from -10deg, #ffd86b 0 8deg, transparent 8deg 18deg);
  transform: translate(-50%, -50%);
}

.eyebrow, .section-label, .weather-kicker, .plan-type {
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow {
  padding: .5em .85em;
  border: 2px solid currentColor;
  border-radius: 99px;
  transform: rotate(-2deg);
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 600; }

h1 {
  max-width: 760px;
  margin: clamp(18px, 3vw, 28px) 0 2px;
  font-size: clamp(3.4rem, 10vw, 7.8rem);
  line-height: .85;
  letter-spacing: -.065em;
  text-transform: lowercase;
  text-shadow: 4px 5px 0 #9b1e35;
}

.hero-copy {
  position: relative;
  z-index: 3;
  margin: 16px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  letter-spacing: .01em;
}

.tunnel-wrap {
  position: relative;
  width: min(56vw, 460px, 52svh);
  aspect-ratio: 1;
  margin: clamp(20px, 4vh, 42px) auto 0;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.orbit, .tunnel-center {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 -12px 0 rgb(86 14 35 / .15), 0 9px 0 rgb(97 14 37 / .12);
}

.orbit-outer { background: var(--orange); transform: rotate(-4deg); }
.orbit-middle { width: 76%; height: 76%; background: var(--yellow); }
.orbit-inner { width: 54%; height: 54%; background: var(--orange); }
.tunnel-center { width: 31%; height: 31%; background: #6b1530; box-shadow: inset 0 0 0 8px #8e1834; }

.birthday-number {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48%;
  height: 48%;
  padding-bottom: .05em;
  border: clamp(4px, .7vw, 8px) solid var(--ink);
  border-radius: 49% 51% 47% 53%;
  color: var(--ink);
  background: var(--cream);
  font-size: clamp(4.2rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.1em;
  opacity: 0;
  transform: scale(.08) translateZ(0);
  animation: spring-out 1.3s cubic-bezier(.13, .83, .17, 1.35) .42s forwards;
}

@keyframes spring-out {
  0% { opacity: 0; transform: scale(.08) rotate(-20deg); }
  60% { opacity: 1; transform: scale(1.28) rotate(8deg); }
  78% { transform: scale(.88) rotate(-3deg); }
  100% { opacity: 1; transform: scale(1) rotate(3deg); }
}

.scroll-hint {
  margin-top: auto;
  padding-top: 18px;
  font-family: "DM Mono", monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.scroll-hint span { display: inline-block; margin-left: 8px; font-size: 1.2em; animation: bounce 1.6s infinite; }
@keyframes bounce { 50% { transform: translateY(5px); } }

.details, .plan { max-width: 1100px; margin: 0 auto; padding-inline: 24px; }
.details { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px, 8vw, 110px); align-items: center; padding-top: clamp(72px, 12vw, 146px); padding-bottom: clamp(72px, 10vw, 126px); }
.section-label { margin-bottom: 16px; color: var(--red); }
.details h2, .plan h2 { margin-bottom: 21px; font-size: clamp(2.25rem, 5vw, 4.3rem); line-height: .95; letter-spacing: -.055em; }
.details h2 em { color: var(--blue); font-style: normal; }
.details-intro > p:last-child { max-width: 445px; margin: 0; font-size: 1.16rem; line-height: 1.45; }

.weather-card { position: relative; padding: 25px; overflow: hidden; border: 3px solid var(--ink); border-radius: 23px; color: var(--ink); background: #9bddfa; box-shadow: 8px 9px 0 var(--ink); transform: rotate(2deg); }
.weather-card::after { position: absolute; content: ""; width: 110px; aspect-ratio: 1; border-radius: 50%; right: -32px; bottom: -43px; background: var(--yellow); box-shadow: -18px -15px 0 #ffd95d; opacity: .8; }
.weather-card-top, .weather-main, .weather-note, .weather-source { position: relative; z-index: 1; }
.weather-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; border-bottom: 2px solid rgb(33 22 43 / .25); padding-bottom: 17px; }
.weather-kicker { margin-bottom: 5px; font-size: .6rem; }
.weather-card h3 { margin-bottom: 0; font-size: 1.3rem; }
.weather-icon { font-size: 3rem; line-height: .65; }
.weather-main { display: flex; align-items: center; gap: 17px; padding: 20px 0 18px; }
.temperature { font-size: 4.3rem; font-weight: 700; line-height: .8; letter-spacing: -.09em; }
.weather-condition { margin-bottom: 3px; font-size: 1.1rem; line-height: 1.05; }
.weather-range, .weather-note { margin-bottom: 0; font-family: "DM Mono", monospace; font-size: .65rem; line-height: 1.45; }
.weather-note { padding-top: 12px; border-top: 2px dashed rgb(33 22 43 / .35); }
.weather-source {
  display: inline-block;
  margin-top: 9px;
  color: currentColor;
  font-family: "DM Mono", monospace;
  font-size: .58rem;
  line-height: 1.4;
  text-underline-offset: 3px;
}
.weather-source:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; border-radius: 2px; }

.plan { padding-bottom: clamp(80px, 12vw, 140px); text-align: center; }
.plan .section-label { color: var(--purple); }
.plan h2 { font-size: clamp(2rem, 4.6vw, 3.85rem); }
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 42px; text-align: left; }
.plan-card { min-height: 260px; padding: clamp(25px, 4vw, 42px); border-radius: 25px; }
.sun-plan { color: var(--ink); background: var(--yellow); transform: rotate(-1deg); }
.rain-plan { color: var(--cream); background: var(--blue); transform: rotate(1deg); }
.plan-symbol { display: block; margin-bottom: 20px; font-size: 3rem; line-height: 1; }
.plan-type { margin-bottom: 8px; color: currentColor; opacity: .72; }
.plan-card h3 { margin-bottom: 10px; font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: .95; letter-spacing: -.04em; }
.plan-card p:last-child { max-width: 365px; margin-bottom: 0; font-size: 1.06rem; line-height: 1.35; }
.final-note { max-width: 590px; margin: 45px auto 0; font-size: 1.25rem; line-height: 1.3; }
.final-deadline { margin: 10px auto 0; font-family: "DM Mono", monospace; font-size: .72rem; line-height: 1.5; text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 650px) {
  .hero { min-height: 720px; }
  .tunnel-wrap { width: min(80vw, 400px); }
  .details { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .sun-plan, .rain-plan { transform: none; }
}

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