:root {
  --ink: #17131f;
  --muted: #655f6f;
  --paper: #fffdf8;
  --white: #ffffff;
  --coral: #ef4d5e;
  --teal: #0f8b8d;
  --yellow: #f6c944;
  --blue: #2f6fed;
  --line: rgba(23, 19, 31, 0.12);
  --shadow: 0 24px 70px rgba(20, 16, 31, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12px 12px, rgba(239, 77, 94, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle at 42px 34px, rgba(15, 139, 141, 0.12) 0 2px, transparent 3px),
    var(--paper);
  background-size: 56px 56px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

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

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

.hero {
  min-height: 88vh;
  overflow: hidden;
  position: relative;
  display: grid;
  align-items: center;
  padding: 96px clamp(20px, 6vw, 84px) 96px;
  isolation: isolate;
}

.hero__photo,
.hero__shade {
  inset: 0;
  position: absolute;
}

.hero__photo {
  background-image: url("assets/photos/photo-00.jpeg");
  background-position: center 41%;
  background-size: cover;
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.02);
  z-index: -3;
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(10, 8, 18, 0.76) 0%, rgba(10, 8, 18, 0.42) 44%, rgba(10, 8, 18, 0.08) 100%),
    linear-gradient(0deg, rgba(10, 8, 18, 0.72) 0%, rgba(10, 8, 18, 0.04) 44%);
  z-index: -2;
}

.topbar {
  align-items: center;
  color: var(--white);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  left: 0;
  padding: 18px clamp(16px, 5vw, 72px);
  position: absolute;
  right: 0;
  top: 0;
  z-index: 4;
}

.topbar a {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: 10px 14px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  transition: background 180ms ease, transform 180ms ease;
}

.topbar a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.hero__content {
  color: var(--white);
  max-width: 740px;
  position: relative;
  z-index: 3;
}

.eyebrow,
.section-kicker {
  color: var(--yellow);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.intro-band h2,
.section-heading h2,
.message-section h2,
.closing h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

.hero h1 {
  font-size: clamp(3.4rem, 12vw, 8.4rem);
  line-height: 0.92;
  margin: 16px 0 22px;
  max-width: 780px;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.hero__copy {
  font-size: clamp(1.04rem, 2vw, 1.32rem);
  line-height: 1.6;
  margin: 0;
  max-width: 580px;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.58);
}

.hero__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  align-items: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button--primary {
  background: var(--coral);
  box-shadow: 0 18px 36px rgba(239, 77, 94, 0.28);
  color: var(--white);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: var(--white);
}

.hero__ribbon {
  align-items: center;
  background: var(--yellow);
  bottom: 0;
  color: var(--ink);
  display: flex;
  font-weight: 900;
  gap: 32px;
  left: 0;
  overflow: hidden;
  padding: 13px 0;
  position: absolute;
  right: 0;
  white-space: nowrap;
}

.hero__ribbon span {
  animation: marquee 18s linear infinite;
  min-width: max-content;
  padding-left: 32px;
}

main {
  position: relative;
  z-index: 1;
}

.intro-band {
  align-items: end;
  background: var(--ink);
  color: var(--white);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  padding: clamp(52px, 9vw, 92px) clamp(20px, 7vw, 94px);
}

.intro-band h2,
.section-heading h2,
.message-section h2,
.closing h2 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1;
  margin: 12px 0 0;
}

.intro-band p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 0;
}

.gallery-section {
  padding: clamp(54px, 9vw, 96px) clamp(16px, 6vw, 84px);
}

.section-heading {
  margin: 0 auto 30px;
  max-width: 1120px;
}

.section-heading .section-kicker {
  color: var(--teal);
}

.spotlight {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  margin: 0 auto;
  max-width: 1120px;
}

.spotlight__frame {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0;
  overflow: hidden;
}

.spotlight__frame img {
  aspect-ratio: 16 / 10;
  background: #15111b;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.spotlight__frame figcaption {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  font-weight: 900;
  min-height: 54px;
  padding: 14px 18px;
}

.icon-button {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
  width: 52px;
}

.icon-button:hover {
  background: var(--teal);
  color: var(--white);
  transform: translateY(-2px);
}

.photo-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  margin: 22px auto 0;
  max-width: 1120px;
}

.photo-tile {
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  transition: border-color 180ms ease, transform 180ms ease;
}

.photo-tile:hover,
.photo-tile.is-active {
  border-color: var(--coral);
  transform: translateY(-2px);
}

.photo-tile img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

.message-section {
  align-items: stretch;
  background: var(--white);
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(280px, 1.08fr);
}

.message-section__media {
  min-height: 520px;
  overflow: hidden;
}

.message-section__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.message-section__text {
  align-self: center;
  padding: clamp(36px, 8vw, 86px);
}

.message-section__text .section-kicker {
  color: var(--blue);
}

.message-section__text p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
  margin: 22px 0 0;
  max-width: 620px;
}

.message-section__text .button {
  margin-top: 28px;
}

.wish {
  color: var(--teal) !important;
  font-weight: 900;
  min-height: 32px;
}

.closing {
  background:
    linear-gradient(135deg, rgba(239, 77, 94, 0.95), rgba(15, 139, 141, 0.95)),
    var(--coral);
  color: var(--white);
  padding: clamp(58px, 9vw, 108px) 20px;
  text-align: center;
}

.closing span {
  color: var(--yellow);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.closing h2 {
  margin-inline: auto;
  max-width: 900px;
}

.lightbox {
  background: transparent;
  border: 0;
  height: 100%;
  max-height: none;
  max-width: none;
  padding: 24px;
  width: 100%;
}

.lightbox::backdrop {
  background: rgba(12, 10, 17, 0.86);
}

.lightbox img {
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  height: min(86vh, 980px);
  margin: auto;
  object-fit: contain;
  width: min(92vw, 1180px);
}

.lightbox__close {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 2;
}

.toast {
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  bottom: 20px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  color: var(--white);
  font-weight: 900;
  left: 50%;
  max-width: min(520px, calc(100vw - 32px));
  opacity: 0;
  padding: 14px 18px;
  pointer-events: none;
  position: fixed;
  text-align: center;
  transform: translate(-50%, 20px);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 30;
}

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

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 86vh;
    padding-top: 108px;
  }

  .hero__shade {
    background:
      linear-gradient(0deg, rgba(10, 8, 18, 0.86) 0%, rgba(10, 8, 18, 0.22) 72%),
      linear-gradient(90deg, rgba(10, 8, 18, 0.6), rgba(10, 8, 18, 0.18));
  }

  .topbar {
    justify-content: center;
  }

  .intro-band,
  .message-section {
    grid-template-columns: 1fr;
  }

  .message-section__media {
    min-height: 420px;
  }

  .photo-grid {
    grid-template-columns: repeat(4, minmax(72px, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    gap: 6px;
    padding-inline: 10px;
  }

  .topbar a {
    font-size: 0.74rem;
    padding: 9px 10px;
  }

  .hero {
    min-height: 84vh;
    padding-inline: 18px;
  }

  .hero h1 {
    font-size: clamp(3.25rem, 19vw, 5.5rem);
  }

  .hero__actions,
  .button {
    width: 100%;
  }

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

  .spotlight__frame {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .spotlight__control {
    width: 100%;
  }

  .spotlight__frame img {
    aspect-ratio: 4 / 5;
  }

  .photo-grid {
    grid-template-columns: repeat(3, minmax(74px, 1fr));
  }

  .message-section__media {
    min-height: 360px;
  }

  .message-section__text {
    padding-inline: 20px;
  }
}

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

/* Version sencilla y especial */
:root {
  --ink: #2a2028;
  --soft-ink: #6d5d66;
  --paper: #fff8f2;
  --rose: #d94d64;
  --sun: #f4bd4f;
  --mint: #b8ded6;
  --sky: #9dc7e8;
  --white: #fffefd;
  --line: rgba(42, 32, 40, 0.12);
  --shadow: 0 18px 45px rgba(58, 36, 48, 0.16);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(244, 189, 79, 0.28), transparent 25%),
    radial-gradient(circle at 82% 18%, rgba(217, 77, 100, 0.17), transparent 24%),
    radial-gradient(circle at 14% 78%, rgba(184, 222, 214, 0.32), transparent 28%),
    linear-gradient(180deg, #fff8f2 0%, #fffdf8 48%, #f8fbff 100%),
    var(--paper);
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.cover {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 1.05fr);
  gap: clamp(22px, 5vw, 58px);
  align-items: center;
}

.cover__photo {
  position: relative;
  justify-self: center;
  width: min(430px, 100%);
  transform: rotate(-2deg);
}

.cover__photo::before,
.cover__photo::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  z-index: -1;
}

.cover__photo::before {
  width: 150px;
  height: 150px;
  left: -34px;
  top: -28px;
  background: var(--sun);
}

.cover__photo::after {
  width: 190px;
  height: 190px;
  right: -38px;
  bottom: -36px;
  background: var(--mint);
}

.cover__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 12px solid var(--white);
  border-bottom-width: 52px;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.cover__words {
  padding: 18px 0;
}

.tiny {
  display: inline-flex;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover h1,
.section-title h2,
.letter h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

.cover h1 {
  max-width: 660px;
  margin: 12px 0 0;
  font-size: clamp(4rem, 11vw, 8.2rem);
  line-height: 0.88;
}

.age-badge {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: clamp(112px, 15vw, 150px);
  height: clamp(136px, 18vw, 186px);
  margin: 0 0 18px 8px;
  border: 6px solid rgba(255, 255, 255, 0.96);
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(ellipse at 32% 24%, rgba(255, 255, 255, 0.82) 0 15%, transparent 32%),
    radial-gradient(ellipse at 70% 75%, rgba(171, 45, 72, 0.24), transparent 38%),
    linear-gradient(145deg, #ff8ca0 0%, #e95775 58%, #c94062 100%);
  color: var(--white);
  box-shadow: 0 18px 38px rgba(217, 77, 100, 0.28);
  transform: rotate(-3deg);
  animation: balloonEscape 5s ease-in-out infinite;
  z-index: 2;
}

.age-badge::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 20px;
  height: 16px;
  background: #c94062;
  border-radius: 0 0 7px 7px;
  clip-path: polygon(50% 100%, 8% 0, 92% 0);
  transform: translateX(-50%);
}

.age-badge::after {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  bottom: -76px;
  width: 2px;
  height: 72px;
  border-left: 0;
  border-radius: 999px;
  background: linear-gradient(rgba(42, 32, 40, 0.28), rgba(42, 32, 40, 0.08));
  transform: none;
}

.age-badge strong {
  display: block;
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.8rem, 8vw, 6rem);
  font-weight: 400;
  line-height: 0.72;
}

.age-badge span {
  display: block;
  font-size: clamp(0.82rem, 2vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover__words p {
  max-width: 560px;
  margin-top: 24px;
  color: var(--soft-ink);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  line-height: 1.7;
}

.wish-button {
  margin-top: 28px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: var(--white);
  background: var(--rose);
  box-shadow: 0 14px 30px rgba(217, 77, 100, 0.24);
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.wish-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(217, 77, 100, 0.3);
}

.secret {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 400ms ease, opacity 260ms ease, margin 400ms ease;
}

.secret.is-open {
  max-height: 260px;
  opacity: 1;
  margin: -18px auto 52px;
}

.secret p {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 254, 253, 0.76);
  box-shadow: 0 14px 38px rgba(58, 36, 48, 0.09);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.38;
  text-align: center;
}

.photos,
.letter {
  padding: clamp(42px, 7vw, 72px) 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-title h2,
.letter h2 {
  max-width: 680px;
  margin: 8px 0 0;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(14px, 2vw, 22px);
  align-items: start;
}

.photo {
  border: 0;
  border-radius: 6px;
  padding: 8px 8px 26px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(58, 36, 48, 0.14);
  cursor: pointer;
  transform: rotate(var(--tilt));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.photo:hover {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: 0 18px 34px rgba(58, 36, 48, 0.2);
}

.photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
}

.letter {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid var(--line);
}

.letter p {
  max-width: 700px;
  margin: 18px auto 0;
  color: var(--soft-ink);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.8;
}

.close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  z-index: 2;
}

.sparkles {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 10;
}

.sparkle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--color);
  animation: floatUp 900ms ease-out forwards;
}

@keyframes floatUp {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), -92px) scale(0.35);
  }
}

@media (max-width: 900px) {
  .cover,
  .letter {
    grid-template-columns: 1fr;
  }

  .cover {
    min-height: auto;
    padding: 24px 0 40px;
  }

  .cover__photo {
    width: min(360px, 92%);
  }

  .photo-strip {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 22px, 1120px);
    padding-top: 14px;
  }

  .cover__words {
    text-align: center;
  }

  .wish-button {
    width: 100%;
  }

  .secret.is-open {
    margin-top: 0;
  }

  .section-title {
    display: block;
  }

  .photo-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .letter {
    text-align: center;
  }
}

.party-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.party-layer::before {
  content: none;
}

.balloon {
  position: absolute;
  width: 72px;
  height: 92px;
  border-radius: 50% 50% 46% 46%;
  filter: drop-shadow(0 18px 24px rgba(78, 42, 56, 0.18));
  animation: balloonFloat 6s ease-in-out infinite;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 90px;
  width: 1px;
  height: 96px;
  background: rgba(42, 32, 40, 0.2);
}

.balloon--one {
  left: 4vw;
  top: 12vh;
  background: linear-gradient(145deg, #ff8798, #d94d64);
}

.balloon--two {
  right: 7vw;
  top: 18vh;
  width: 62px;
  height: 82px;
  background: linear-gradient(145deg, #ffe29b, #f4bd4f);
  animation-delay: -2s;
}

.balloon--three {
  right: 20vw;
  bottom: 12vh;
  width: 58px;
  height: 76px;
  background: linear-gradient(145deg, #bfe8ff, #76b8da);
  animation-delay: -3.4s;
}

.floating-star {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--sun);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 56%, 80% 92%, 50% 70%, 20% 92%, 32% 56%, 2% 35%, 39% 35%);
  animation: twinkle 2.6s ease-in-out infinite;
}

.star--one {
  left: 18vw;
  top: 66vh;
}

.star--two {
  right: 14vw;
  top: 42vh;
  background: #ff9fb0;
  animation-delay: -0.8s;
}

.star--three {
  left: 72vw;
  top: 8vh;
  background: #7fc7be;
  animation-delay: -1.5s;
}

.page {
  position: relative;
  z-index: 1;
}

.cover {
  position: relative;
}

.cover::after {
  content: "happy birthday";
  position: absolute;
  right: min(5vw, 44px);
  bottom: 24px;
  color: rgba(217, 77, 100, 0.12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 1;
  pointer-events: none;
}

.cover-note {
  max-width: 640px;
  margin-top: 26px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(217, 77, 100, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 244, 234, 0.86)),
    var(--white);
  box-shadow: 0 16px 34px rgba(58, 36, 48, 0.11);
  color: var(--ink);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.68;
}

.birthday-scene {
  display: grid;
  grid-template-columns: minmax(220px, 0.64fr) minmax(280px, 1fr);
  gap: clamp(22px, 5vw, 54px);
  align-items: center;
  margin: 8px 0 clamp(34px, 7vw, 72px);
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 22%, rgba(244, 189, 79, 0.3), transparent 28%),
    radial-gradient(circle at 84% 78%, rgba(184, 222, 214, 0.5), transparent 32%),
    rgba(255, 254, 253, 0.74);
  box-shadow: 0 16px 42px rgba(58, 36, 48, 0.1);
}

.birthday-scene h2 {
  max-width: 650px;
  margin: 10px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  font-weight: 400;
  line-height: 1;
}

.cake {
  position: relative;
  width: min(320px, 100%);
  height: 250px;
  margin: 0 auto;
}

.cake span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.cake__top,
.cake__middle,
.cake__bottom {
  border-radius: 18px 18px 8px 8px;
  box-shadow: 0 15px 30px rgba(58, 36, 48, 0.14);
}

.cake__top {
  bottom: 128px;
  width: 170px;
  height: 48px;
  background: linear-gradient(#fff1f5 0 44%, #ff9fb0 44% 100%);
}

.cake__middle {
  bottom: 72px;
  width: 230px;
  height: 64px;
  background: linear-gradient(#fff5dc 0 44%, #f4bd4f 44% 100%);
}

.cake__bottom {
  bottom: 0;
  width: 292px;
  height: 82px;
  background: linear-gradient(#e8fbf8 0 42%, #7fc7be 42% 100%);
}

.candle {
  bottom: 176px;
  width: 12px;
  height: 48px;
  border-radius: 8px;
  background: repeating-linear-gradient(45deg, #ffffff 0 7px, #d94d64 7px 14px);
  z-index: 2;
}

.candle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -18px;
  width: 18px;
  height: 24px;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 50% 70%, #fff7c7 0 20%, #f4bd4f 42%, #f28b4b 76%);
  transform: translateX(-50%);
  animation: flame 850ms ease-in-out infinite alternate;
}

.candle--one {
  margin-left: -48px;
}

.candle--three {
  margin-left: 48px;
}

.photo {
  position: relative;
}

.photo::after {
  content: "";
  position: absolute;
  inset: 8px 8px 26px;
  border-radius: 4px;
  background: linear-gradient(120deg, transparent 0 45%, rgba(255, 255, 255, 0.42) 48%, transparent 54%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.photo:hover::after {
  opacity: 1;
}

.garland {
  position: relative;
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 44px);
  height: 98px;
  margin: -14px 0 26px;
}

.garland::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 18px;
  height: 56px;
  border-top: 3px solid rgba(217, 77, 100, 0.34);
  border-radius: 50%;
}

.garland span {
  position: relative;
  top: 28px;
  width: 38px;
  height: 52px;
  border-radius: 0 0 16px 16px;
  background: var(--rose);
  transform-origin: top center;
  animation: flagSwing 2.8s ease-in-out infinite;
  box-shadow: 0 12px 24px rgba(58, 36, 48, 0.12);
}

.garland span:nth-child(2),
.garland span:nth-child(5) {
  background: var(--sun);
  animation-delay: -0.8s;
}

.garland span:nth-child(3),
.garland span:nth-child(6) {
  background: #7fc7be;
  animation-delay: -1.5s;
}

.garland span:nth-child(4) {
  background: #9dc7e8;
  animation-delay: -2.1s;
}

.photos {
  position: relative;
}

.photos::before,
.photos::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.55;
  animation: softPulse 4.2s ease-in-out infinite;
}

.photos::before {
  width: 86px;
  height: 86px;
  right: 5%;
  top: 28px;
  background: var(--sun);
}

.photos::after {
  width: 64px;
  height: 64px;
  left: 2%;
  bottom: 34px;
  background: var(--mint);
  animation-delay: -1.4s;
}

.letter {
  position: relative;
  padding-inline: clamp(18px, 4vw, 54px);
}

.letter::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 26px;
  width: 74px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--sun), #7fc7be);
  transform: translateX(-50%);
}

@keyframes flagSwing {
  0%,
  100% {
    transform: rotate(-4deg) translateY(0);
  }
  50% {
    transform: rotate(4deg) translateY(4px);
  }
}

@keyframes softPulse {
  0%,
  100% {
    transform: scale(0.88);
    opacity: 0.38;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.62;
  }
}

@keyframes badgeBounce {
  0%,
  100% {
    transform: rotate(-4deg) translateY(0);
  }
  50% {
    transform: rotate(3deg) translateY(-8px);
  }
}

@keyframes balloonEscape {
  0%,
  54% {
    opacity: 1;
    transform: rotate(-3deg) translateY(0) translateX(0);
  }
  72% {
    opacity: 1;
    transform: rotate(5deg) translateY(-42vh) translateX(12px);
  }
  88% {
    opacity: 0;
    transform: rotate(-4deg) translateY(-115vh) translateX(-18px);
  }
  89% {
    opacity: 0;
    transform: rotate(-3deg) translateY(34px) translateX(0);
  }
  100% {
    opacity: 1;
    transform: rotate(-3deg) translateY(0) translateX(0);
  }
}

.confetti-burst {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 30;
}

@keyframes confettiDrift {
  from {
    transform: translateY(-12vh);
  }
  to {
    transform: translateY(112vh);
  }
}

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

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.25) rotate(18deg);
  }
}

@keyframes flame {
  from {
    transform: translateX(-50%) scale(0.9) rotate(-4deg);
  }
  to {
    transform: translateX(-50%) scale(1.08) rotate(4deg);
  }
}

@media (max-width: 900px) {
  .birthday-scene {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .balloon--one {
    left: -18px;
  }

  .balloon--two {
    right: -14px;
  }

  .balloon--three {
    display: none;
  }
}

@media (max-width: 560px) {
  .cover::after {
    right: 0;
    bottom: -18px;
  }

  .cover-note {
    text-align: left;
  }

  .age-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .birthday-scene {
    border-radius: 18px;
    padding: 24px 14px;
  }

  .cake {
    transform: scale(0.82);
    transform-origin: center;
    margin-block: -18px;
  }
}
