/* Buli: loud, warm and happy. Big rounded bubbles of color, a headline you can hear, balloons in the
   corners, and at the opening they all float up and away. */

:root {
  --wall-bg: #fff4e0;
  --wall-ink: #1d1530;
  --wall-muted: #5b4f72;
  --wall-accent: #ff4f6d;
  --wall-accent-ink: #fff;
  --wall-surface: #fff;
  --wall-line: rgba(29, 21, 48, 0.14);
  --wall-font: 'Baloo', 'Nunito', system-ui, sans-serif;
  --wall-font-display: 'Bricolage', 'Baloo', system-ui, sans-serif;
  --wall-font-hand: 'Baloo', system-ui, sans-serif;
  --wall-card-font: 'Baloo', system-ui, sans-serif;
  --wall-card-ink: #1d1530;
  --wall-card-radius: 28px;
  --wall-card-shadow: 0 6px 0 rgba(29, 21, 48, 0.9);
  --wall-gap: 20px;
  --c1: #ffd23f;
  --c2: #ff8fab;
  --c3: #7ae582;
  --c4: #6ec3ff;
  --c5: #c59bff;
  --c6: #ffffff;
}

* { box-sizing: border-box; }

html { background: var(--wall-bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--wall-ink);
  font: 18px/1.45 var(--wall-font);
  overflow-wrap: anywhere;
  hyphens: auto;
  overflow-x: clip;
  background:
    radial-gradient(circle, rgba(255, 79, 109, 0.22) 2.5px, transparent 3px) 0 0 / 46px 46px,
    radial-gradient(circle, rgba(110, 195, 255, 0.3) 2px, transparent 2.5px) 23px 23px / 46px 46px,
    var(--wall-bg);
}

/* ——— Balloons ——— */

.balloon {
  position: absolute;
  width: 74px;
  height: 92px;
  border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.7) 0 7%, transparent 8%), var(--b, #ff4f6d);
  box-shadow: inset -8px -10px 0 rgba(0, 0, 0, 0.08);
}
.balloon::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 70px; background: rgba(29, 21, 48, 0.35); }
.sky { position: absolute; inset: 0 0 auto; height: 360px; overflow: hidden; pointer-events: none; }
.sky .b1 { --b: #ff4f6d; left: 3%; top: 40px; transform: rotate(-8deg); }
.sky .b2 { --b: #ffd23f; left: 9%; top: 110px; transform: scale(0.75) rotate(6deg); }
.sky .b3 { --b: #6ec3ff; right: 4%; top: 30px; transform: rotate(8deg); }
.sky .b4 { --b: #7ae582; right: 10%; top: 120px; transform: scale(0.7) rotate(-6deg); }

/* ——— The top ——— */

.hero { position: relative; max-width: 980px; margin: 0 auto; padding: 56px 20px 18px; display: grid; justify-items: center; text-align: center; gap: 14px; }
.hero-from { margin: 0; padding: 4px 16px; border-radius: 999px; background: var(--wall-ink); color: #fff; font-weight: 700; transform: rotate(-2deg); }
.hero-title {
  margin: 0;
  max-width: 14ch;
  font-family: var(--wall-font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 9.5vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--wall-ink);
  text-shadow: 4px 4px 0 var(--c1), 8px 8px 0 var(--wall-accent);
}
.hero-row { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 10px; max-width: 760px; }
.blob { margin: 0; flex: none; width: min(190px, 40vw); aspect-ratio: 1; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; overflow: hidden; border: 6px solid var(--wall-ink); box-shadow: 8px 8px 0 var(--c4); transform: rotate(-4deg); }
.blob img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-intro { margin: 0; white-space: pre-line; text-align: left; font-size: 1.1rem; max-width: 30em; }
.hero-status { margin: 4px 0 0; padding: 10px 20px; background: var(--wall-surface); border: 3px solid var(--wall-ink); border-radius: 20px; font-weight: 700; box-shadow: 4px 4px 0 var(--wall-ink); max-width: 40em; }
.hero-actions .wall-btn { border: 3px solid var(--wall-ink); box-shadow: 4px 4px 0 var(--wall-ink); font-size: 1.05rem; }
.hero-actions .wall-btn.primary { background: var(--wall-accent); }
.hero-actions .wall-btn:hover { transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--wall-ink); }

/* ——— The wall ——— */

.wall { max-width: 1240px; margin: 0 auto; padding: 22px 20px 40px; }
.wall-card { border: 3px solid var(--wall-ink); padding: 22px 22px 16px; }
.wall-card:nth-child(3n + 2) { border-radius: 34px 18px 34px 18px; }
.wall-card-sticker { font-size: 44px; top: -24px; right: 14px; transform: rotate(calc(var(--tilt) * 4)); }
.wall-card-text { font-size: 1.18rem; line-height: 1.4; font-weight: 500; }
.wall-card-text.is-long { font-size: 1.02rem; }
.wall-card-author { font-family: var(--wall-font-display); font-weight: 800; font-size: 1.15rem; }
.wall-card-author::before { content: ''; }
.wall-card-photo-button { border-radius: 18px; border: 3px solid var(--wall-ink); }
.wall-react, .wall-card-love { background: rgba(255, 255, 255, 0.75); border: 2px solid var(--wall-ink); font-weight: 700; }
.wall-react.is-given { background: var(--wall-ink); color: #fff; box-shadow: none; }
.wall-card-love.is-loved { background: #fff; color: #e0144c; }
.wall-card-pin { font-size: 26px; top: -18px; }
.wall-empty { background: var(--wall-surface); border: 3px solid var(--wall-ink); border-radius: 28px; box-shadow: 6px 6px 0 var(--wall-ink); max-width: 560px; margin: 0 auto; }

.thanks { padding: 6px 20px 26px; }
.wall-thanks { border: 3px solid var(--wall-ink); border-radius: 28px; box-shadow: 6px 6px 0 var(--wall-accent); }
.wall-thanks-text { font-family: var(--wall-font-display); font-weight: 700; }

.signatures { max-width: 900px; margin: 10px auto 70px; padding: 22px; background: var(--c1); border: 3px solid var(--wall-ink); border-radius: 28px; box-shadow: 6px 6px 0 var(--wall-ink); }
.signatures .wall-signatures-title { color: var(--wall-ink); font-weight: 800; }
.wall-signature { font-family: var(--wall-font-display); font-weight: 800; font-size: 1.35rem; }

/* ——— The opening: balloons float up, the card pops ——— */

.surprise { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; overflow: hidden; background: radial-gradient(circle, rgba(255, 79, 109, 0.25) 2.5px, transparent 3px) 0 0 / 40px 40px, #ffe6b8; transition: opacity 0.5s 0.9s; }
.surprise-balloons { position: absolute; inset: 0; pointer-events: none; }
.surprise-balloons .balloon { bottom: 10%; animation: bob 3s ease-in-out infinite alternate; }
.surprise-balloons .b1 { --b: #ff4f6d; left: 8%; }
.surprise-balloons .b2 { --b: #ffd23f; left: 24%; bottom: 4%; animation-delay: -1s; }
.surprise-balloons .b3 { --b: #6ec3ff; right: 22%; bottom: 6%; animation-delay: -2s; }
.surprise-balloons .b4 { --b: #7ae582; right: 7%; animation-delay: -0.5s; }
.surprise-balloons .b5 { --b: #c59bff; left: 46%; bottom: -2%; animation-delay: -1.5s; }
@keyframes bob { to { translate: 0 -14px; } }
.surprise-card { position: relative; z-index: 1; text-align: center; display: grid; gap: 10px; justify-items: center; padding: 28px 26px; background: #fff; border: 4px solid var(--wall-ink); border-radius: 32px; box-shadow: 8px 8px 0 var(--wall-ink); max-width: min(440px, calc(100vw - 40px)); transition: transform 0.5s cubic-bezier(0.5, -0.5, 0.5, 1.5), opacity 0.4s 0.2s; }
.surprise-kicker { margin: 0; padding: 4px 14px; border-radius: 999px; background: var(--wall-accent); color: #fff; font-weight: 800; transform: rotate(-3deg); }
.surprise-card h2 { margin: 0; font-family: var(--wall-font-display); font-weight: 800; font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.02; }
.surprise-count { margin: 0; color: var(--wall-muted); font-weight: 700; }
.surprise .wall-btn { border: 3px solid var(--wall-ink); box-shadow: 4px 4px 0 var(--wall-ink); font-size: 1.15rem; }
.is-opening .surprise-balloons .balloon { animation: fly 1.4s ease-in forwards; }
.is-opening .surprise-balloons .b2 { animation-delay: 0.1s; }
.is-opening .surprise-balloons .b3 { animation-delay: 0.2s; }
.is-opening .surprise-balloons .b5 { animation-delay: 0.05s; }
@keyframes fly { to { translate: 0 -120vh; rotate: 12deg; } }
.is-opening .surprise-card { transform: scale(1.15); opacity: 0; }
.is-opening .surprise { opacity: 0; }

@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  .hero-row { flex-direction: column; }
  .hero-intro { text-align: center; }
  .sky .b2, .sky .b4 { display: none; }
  .sky .balloon { width: 52px; height: 66px; }
  .wall { padding: 18px 16px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .surprise-balloons .balloon { animation: none; }
  .surprise, .surprise-card { transition: none; }
}

@media print {
  .sky, .hero-status { display: none; }
  .hero-title { text-shadow: none; }
}
