/* Baloo Bhaijaan 2 is loaded by template/kit.html with the other fonts (not an @import, which would hold up the page). */
/* Balloons design (kids' birthdays): pastel sky, a balloon bunch tied to a gift, party garland, confetti, rounded type.
   Built on css/kit.css; everything drawn lives in js/balloons.js. */
:root {
  --bg: #fffaf4;
  --paper: #ffffff;
  --stone: #f3ecf9;
  --accent: #ad94e8;
  --accent-soft: #f3eefc;
  --accent-deep: #45397a;
  --ink: #3f3770;
  --gold: #f08eaa;
  --gold-text: #b5436a;     /* raspberry for kickers, ≥ 4.5:1 on cream */
  --text: #3e3a5c;
  --text-soft: #57527a;
  --text-mute: #67618a;
  --shade: 70, 55, 120;
  --line: #e2d9f3;
  --line-soft: #efe9fa;
  --card: #ffffff;
  --font-script: 'Baloo Bhaijaan 2', 'Readex Pro', system-ui, sans-serif;
  --font-serif: 'Baloo Bhaijaan 2', 'Readex Pro', system-ui, sans-serif;
  --font-ui: 'Baloo Bhaijaan 2', 'Readex Pro', system-ui, sans-serif;
  --caps: .08em;
  --sky-grad: linear-gradient(180deg, #ffe6ee 0%, #f1e8ff 50%, #e0f0ff 100%);
}
html[lang="ar"], html[lang="ar"][data-font-ar] {
  --font-script: 'Baloo Bhaijaan 2', 'Readex Pro', system-ui, sans-serif;
  --font-serif: 'Baloo Bhaijaan 2', 'Readex Pro', system-ui, sans-serif;
  --font-ui: 'Baloo Bhaijaan 2', 'Readex Pro', system-ui, sans-serif;
  --caps: 0;
}
body { background: #f4eefb; font-size: 17px; line-height: 1.6; }
.script, html[lang="ar"] .script { font-weight: 700; line-height: 1.2; }
.title { margin-bottom: 18px; font-size: 44px; line-height: 1.15; color: var(--ink); }
html[lang="ar"] .title { font-size: 40px; line-height: 1.35; }
.kicker { font-weight: 600; letter-spacing: .14em; color: var(--gold-text); }
html[lang="ar"] .kicker { font-size: 17px; letter-spacing: 0; }
.amp { color: var(--gold); }
.ornament { width: min(150px, 46%); margin: 0 auto 22px; }
.pill { font-weight: 600; letter-spacing: .04em; text-transform: none; font-size: 16px; }
.pill--fill, .pill--soft { background: var(--accent-deep); color: #fff; }
.pill--line { background: #fff; border-color: #d9cdf3; color: var(--ink); }
.textlink, .place__map { color: var(--accent-deep); }
.sound { background: var(--accent-deep); }
.petals { z-index: 30; }

/* ---------- cover: balloons tied to a gift on a pastel sky ---------- */
.gate { background: radial-gradient(110% 60% at 50% 0%, #fff7ec 0%, rgba(255, 247, 236, 0) 62%), var(--sky-grad); transition: opacity .9s ease .1s; }
.gate.is-open { opacity: 0; }
.bl-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(18px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom)); overflow: hidden; }
.bl-cover__text { position: relative; z-index: 2; max-width: 92vw; text-align: center; transition: opacity .35s ease, transform .6s var(--soft); }
.bl-kicker { margin: 0; font: 600 14px/1.4 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
html[lang="ar"] .bl-kicker { font-size: 18px; letter-spacing: 0; text-transform: none; }
.bl-cover .env__to { margin: 0; color: var(--text-soft); font: 500 15px/1.4 var(--font-ui); }
.bl-cover .env__to bdi { font: 700 30px/1.2 var(--font-script); color: var(--ink); }
.bl-cover__name { margin: 2px auto 0; max-width: 88vw; white-space: nowrap; font-size: 60px; line-height: 1.1; color: var(--ink); text-shadow: 0 2px 0 #fff, 0 0 18px rgba(255, 255, 255, .9); }
html[lang="ar"] .bl-cover__name { font-size: 62px; line-height: 1.3; }
.bl-scene { position: relative; z-index: 1; width: min(78vw, 46vh, 350px); aspect-ratio: 2 / 3; margin-top: 2px; }
.bl-scene__art { width: 100%; height: 100%; overflow: visible; }
.bl-cb { transform-origin: 200px 438px; animation: bl-sway 4.4s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -9); }
@keyframes bl-sway { from { transform: rotate(calc(-1.8deg * var(--sway))); } to { transform: rotate(calc(1.8deg * var(--sway))); } }
.bl-tap { position: absolute; left: 28%; right: 28%; top: 66%; bottom: 1%; border: 0; border-radius: 22px; background: none; cursor: pointer; }
.bl-tap:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 4px; }
.bl-hint { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 8px 20px; border-radius: 999px; background: rgba(255, 255, 255, .78); font: 600 15px/1.3 var(--font-ui); color: var(--accent-deep); box-shadow: 0 8px 20px -12px rgba(var(--shade), .55); animation: bl-nudge 2.2s ease-in-out infinite; }
html[lang="ar"] .bl-hint { font-size: 17px; }
@keyframes bl-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.bl-cloud { position: absolute; z-index: 0; width: 130px; opacity: .85; pointer-events: none; }
.bl-cloud--a { top: 9%; left: -34px; animation: bl-drift 14s ease-in-out infinite alternate; }
.bl-cloud--b { top: 30%; right: -40px; width: 160px; animation: bl-drift 17s ease-in-out infinite alternate-reverse; }
.bl-cloud--c { bottom: 9%; left: 6%; width: 96px; opacity: .7; animation: bl-drift 19s ease-in-out infinite alternate; }
@keyframes bl-drift { to { translate: 26px 0; } }
/* the tap: text fades, the lid hops, confetti bursts, every balloon flies off with its string */
.gate.is-opening .bl-cover__text, .gate.is-opening .bl-hint, .gate.is-opening .env__to { opacity: 0; transform: translateY(-10px); animation: none; }
.gate.is-opening .bl-cb { animation: bl-fly 2s cubic-bezier(.5, 0, .75, .45) var(--d) forwards; }
@keyframes bl-fly {
  0% { transform: none; }
  14% { transform: translate(calc(var(--dx) * .06), 12px) rotate(calc(var(--r) * .2)); }
  100% { transform: translate(var(--dx), -1050px) rotate(var(--r)); }
}
.bl-gift__lid { transform-origin: 200px 456px; }
.gate.is-opening .bl-gift__lid { animation: bl-lid .75s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes bl-lid { 45% { transform: translateY(-40px) rotate(-12deg); } 100% { transform: translateY(-22px) rotate(-7deg); } }
.gate.is-opening .bl-gift__box, .gate.is-opening .bl-gift__lid { opacity: 0; transition: opacity .6s ease .55s; }
.bl-burst { position: absolute; z-index: 3; top: 73%; left: 50%; width: 0; height: 0; pointer-events: none; }
.bl-cf { position: absolute; top: -4px; left: -4px; width: 9px; height: 9px; border-radius: 2px; background: var(--c); opacity: 0; }
.gate.is-opening .bl-burst .bl-cf, .bl-burst--pop .bl-cf { animation: bl-burst 1.15s cubic-bezier(.15, .7, .3, 1) var(--dl) forwards; }
@keyframes bl-burst {
  0% { opacity: 1; transform: translate(0, 0) scale(.3) rotate(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), calc(var(--ty) + 70px)) scale(1) rotate(var(--r)); }
}
.bl-burst--pop { position: absolute; top: 0; left: 0; z-index: 4; }

/* ---------- opening view: garland, the age on a big balloon, balloons to pop ---------- */
.bl-hero { display: flex; flex-direction: column; align-items: center; background: radial-gradient(90% 50% at 50% 34%, #fffaf4 0%, rgba(255, 250, 244, 0) 70%), linear-gradient(180deg, #ffe8ef 0%, #f2eaff 46%, #fffaf4 100%); text-align: center; }
.bl-bunting { position: absolute; z-index: 2; top: -4px; left: -2%; width: 104%; height: 92px; pointer-events: none; }
.bl-cloud--d { top: 17%; left: -40px; width: 140px; opacity: .9; }
.bl-cloud--e { top: 41%; right: -46px; width: 150px; opacity: .8; }
.bl-hero__in { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; width: 100%; padding: 92px 20px 0; opacity: 0; transform: translateY(18px); transition: opacity 1s ease .15s, transform 1.2s var(--soft) .15s; }
.hero.is-in .bl-hero__in { opacity: 1; transform: none; }
.bl-hero .bl-kicker { margin: 0 0 4px; }
.bl-pop { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.bl-pop .bl-b { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 50% 30%; animation: bl-bob 5s ease-in-out infinite alternate; animation-delay: calc(var(--d, 0s) * -3); }
@keyframes bl-bob { from { transform: translateY(0) rotate(-2.5deg); } to { transform: translateY(-12px) rotate(2.5deg); } }
.bl-pop--big { width: 134px; margin: 0 0 -26px; }
.bl-pop--big .bl-b { animation-duration: 4s; filter: drop-shadow(0 16px 18px rgba(201, 87, 122, .28)); }
.bl-pop.is-popped .bl-b { animation: bl-pop .28s ease-out forwards; }
@keyframes bl-pop { 0% { transform: scale(1); opacity: 1; } 55% { transform: scale(1.22); opacity: .8; } 100% { transform: scale(1.4); opacity: 0; } }
.bl-pop.is-back .bl-b { animation: bl-inflate .9s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes bl-inflate { from { transform: scale(.15); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bl-name { position: relative; z-index: 2; margin: 0; max-width: 100%; white-space: nowrap; font-size: clamp(46px, 15.5vw, 70px); line-height: 1.1; color: var(--ink); text-shadow: 0 3px 0 #fff, 0 0 22px rgba(255, 255, 255, .95); }
html[lang="ar"] .bl-name { line-height: 1.35; }
.bl-tagline { margin: 2px 0 0; font: 600 21px/1.4 var(--font-ui); color: var(--gold-text); text-shadow: 0 0 12px #fff; }
.bl-when { margin: 12px 0 0; padding: 6px 18px; border-radius: 999px; background: rgba(255, 255, 255, .8); font: 500 15px/1.4 var(--font-ui); color: var(--text-soft); box-shadow: 0 8px 18px -12px rgba(var(--shade), .5); }
html[lang="ar"] .bl-when { font-size: 16px; }
.bl-pops { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.bl-pops .bl-pop { position: absolute; top: max(var(--y), 470px); width: var(--w); max-width: 120px; pointer-events: auto; transform: translateY(70vh); transition: transform 2.4s var(--soft) var(--d); }
.bl-pop--l { left: var(--x); }
.bl-pop--r { right: var(--x); }
.hero.is-in .bl-pops .bl-pop { transform: none; }
.hero .scroll-hint { z-index: 6; color: var(--ink); }

/* ---------- sections: pastel bands with scalloped tops ---------- */
.bl-band { --band: #fff; position: relative; background: var(--band); }
.bl-band::before { content: ""; position: absolute; z-index: 1; top: -13px; right: 0; left: 0; height: 14px; background: radial-gradient(circle at 50% 100%, var(--band) 13px, transparent 13.5px) 0 0 / 28px 14px repeat-x; pointer-events: none; }
.bl-band--mint { --band: #e4f6ef; }
.bl-band--lilac { --band: #f1ecfd; }
.bl-band--butter { --band: #fff4d6; }
.bl-band--rose { --band: #ffeaf0; }
.bl-band--sky { --band: #e6f2fd; }
.date__hint { color: var(--accent-deep); }
.scratch__tile { border-radius: 20px; box-shadow: 0 14px 26px -16px rgba(var(--shade), .5), inset 0 0 0 2px #fff; }
.scratch__value { font: 800 44px/1 var(--font-script); color: var(--ink); }
.scratch__value--word { font-size: 22px; line-height: 1.2; }
.date__full { color: var(--text-soft); }
.timer__cell { border-radius: 18px; background: #fff; box-shadow: 0 10px 20px -16px rgba(var(--shade), .6); }
.timer__num { font: 800 30px/1 var(--font-script); color: #c9577a; }
.timer__cell:nth-child(2) .timer__num { color: #cf7440; }
.timer__cell:nth-child(3) .timer__num { color: #3f9c7b; }
.timer__cell:nth-child(4) .timer__num { color: #3f7fc0; }
.timer__msg { font-size: 30px; color: var(--ink); }

.bl-letter { position: relative; padding: 60px 18px 66px; background: var(--bg); }
.bl-card { position: relative; max-width: 420px; margin: 0 auto; padding: 44px 24px 36px; border-radius: 32px; background: #fff; text-align: center; box-shadow: 0 0 0 7px #fff, 0 0 0 9px #f6d5df, 0 28px 50px -30px rgba(var(--shade), .6); }
.bl-card::before { content: ""; position: absolute; inset: 12px; border: 2px dashed #e6dbf7; border-radius: 24px; pointer-events: none; }
.bl-card__dots { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background:
  radial-gradient(circle at 9% 7%, #f5cd5c 0 4px, transparent 4.5px), radial-gradient(circle at 15% 4%, #79cdb0 0 3px, transparent 3.5px),
  radial-gradient(circle at 92% 6%, #f08eaa 0 4px, transparent 4.5px), radial-gradient(circle at 86% 3.5%, #7fb8ec 0 3px, transparent 3.5px),
  radial-gradient(circle at 7% 95%, #ad94e8 0 4px, transparent 4.5px), radial-gradient(circle at 93% 94%, #f5a676 0 4px, transparent 4.5px); }
.bl-card .letter__dear { color: var(--gold-text); font-size: 24px; }
.bl-card .letter__line { font-size: 19px; line-height: 1.7; color: var(--text-soft); }
.bl-card .letter__names { margin: 6px 0 6px; font-size: 54px; line-height: 1.15; color: var(--ink); }
html[lang="ar"] .bl-card .letter__names { font-size: 50px; line-height: 1.4; }
.bl-card .letter__age { margin: -8px 0 12px; font: 700 26px/1.4 var(--font-script); color: var(--gold-text); opacity: 1; }
.bl-card .letter__when, .bl-card .letter__where { font-size: 18px; line-height: 1.7; }
.bl-card .letter__close { font-style: normal; font-weight: 600; font-size: 18px; color: var(--accent-deep); }
.families { border-bottom-color: var(--line); }

.line::before { width: 3px; border-radius: 2px; background: #d9cdf3; opacity: 1; }
.line__time { font: 800 24px/1.1 var(--font-script); color: var(--ink); }
.line__label { font-weight: 600; letter-spacing: .04em; text-transform: none; font-size: 16px; color: var(--text-soft); }
html[lang="ar"] .line__label { font-size: 18px; }
.line__dot { width: 18px; height: 18px; border-radius: 50%; background: #f08eaa; transform: none; box-shadow: 0 0 0 5px #fff; }
.line__item:nth-child(6n + 2) .line__dot { background: #f5cd5c; }
.line__item:nth-child(6n + 3) .line__dot { background: #79cdb0; }
.line__item:nth-child(6n + 4) .line__dot { background: #7fb8ec; }
.line__item:nth-child(6n + 5) .line__dot { background: #ad94e8; }
.line__item:nth-child(6n + 6) .line__dot { background: #f5a676; }

.bl-place { background: var(--bg); padding-bottom: 50px; }
.place__name { font: 700 27px/1.3 var(--font-script); }
.bl-place .place__photo { width: calc(100% - 40px); margin: 0 auto; border-radius: 30px; box-shadow: 0 0 0 6px #fff, 0 22px 40px -24px rgba(var(--shade), .65); }
.attire__note { font-style: normal; font-size: 18px; }
.swatches span { box-shadow: 0 0 0 5px #fff, 0 10px 18px -10px rgba(var(--shade), .5); }
.looks__item, .album__item { border-radius: 24px; }

.bl-reply { background: var(--band); }
.reply-card { border-radius: 30px; box-shadow: 0 24px 44px -26px rgba(var(--shade), .55), inset 0 0 0 2px #f6dce5; }
.field input, .field textarea { font: 500 19px/1.4 var(--font-serif); }
.choice__opt span { border-radius: 20px; font: 600 17px/1.3 var(--font-ui); }
.choice__opt input:checked + span { border-color: #ad94e8; background: #f3eefc; box-shadow: inset 0 0 0 1px #ad94e8; }
.tile { border-radius: 30px; }
.tile__icon { background: #ffeaf0; color: #c9577a; }
.mic { background: radial-gradient(circle at 35% 30%, #f6a3bb, #b5436a); }
.levels i { background: #f08eaa; }

.bl-farewell { background: linear-gradient(180deg, var(--bg), #f1ecfd); }
.bl-farewell .farewell__line { font-size: 32px; line-height: 1.3; color: var(--ink); }
.bl-farewell .farewell__names { font-size: 48px; color: var(--gold-text); }
.bl-trio { width: 92px; margin: 14px auto 6px; }

/* ---------- confetti that drifts down after the opening ---------- */
.bl-fall { position: absolute; top: -18px; left: var(--px); width: 9px; height: 9px; border-radius: 2px; background: var(--c); opacity: .9; animation: bl-fall var(--pt) linear forwards; }
@keyframes bl-fall { to { transform: translate(var(--pd), calc(100vh + 40px)) rotate(var(--pr)); } }
.bl-cf--1 { width: 6px; height: 13px; }
.bl-cf--2 { border-radius: 50%; }

/* ---------- link preview ---------- */
.og-mode { background: #fdeef3; }
.bl-og { background: radial-gradient(50% 70% at 50% 42%, #fffaf4 0%, rgba(255, 250, 244, 0) 72%), var(--sky-grad); }
.bl-og .bl-bunting { top: -6px; left: 0; width: 1200px; height: 128px; }
.bl-og__cloud--a { top: 150px; left: 260px; width: 150px; }
.bl-og__cloud--b { top: 96px; right: 250px; width: 120px; opacity: .7; }
.bl-og__side { position: absolute; z-index: 1; bottom: -150px; display: flex; align-items: flex-end; }
.bl-og__side .bl-b { width: 120px; height: auto; margin: 0 -14px; }
.bl-og__side .bl-b:nth-child(2) { width: 146px; margin-bottom: 70px; }
.bl-og__side--l { left: 22px; }
.bl-og__side--r { right: 22px; }
.bl-og .og__text { z-index: 2; top: 168px; right: 270px; left: 270px; }
.bl-og .og__kicker { color: var(--gold-text); font-weight: 600; }
.bl-og .og__names { font-size: 124px; line-height: 1.15; color: var(--ink); text-shadow: 0 4px 0 #fff; }
html[lang="ar"] .bl-og .og__names { font-size: 118px; line-height: 1.35; }
.bl-og__tag { margin: 4px 0 0; font: 600 36px/1.3 var(--font-ui); color: var(--gold-text); }
.bl-og .og__line { z-index: 2; bottom: 34px; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .bl-cb, .bl-pop .bl-b, .bl-hint, .bl-cloud { animation: none; }
  .bl-pops .bl-pop, .bl-hero__in { transition: none; transform: none; }
}
