/* Our story: the parents' page. Builds on ../hub/hub.css and ../hub/pages.css. */

.story { max-width: 820px; overflow-x: clip; }

/* ---------- the welcome: Eva and Max either side of a warm hello ---------- */

.welcome {
  --kid-h: 150px;
  position: relative;
  display: flex; align-items: flex-end; justify-content: center; gap: 10px;
  margin: 0 0 26px; padding: 28px 18px 18px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.9) 0 18px, transparent 19px),
    radial-gradient(circle at 26% 26%, rgba(255, 255, 255, 0.9) 0 24px, transparent 25px),
    radial-gradient(circle at 80% 22%, rgba(255, 255, 255, 0.85) 0 20px, transparent 21px),
    radial-gradient(circle at 87% 28%, rgba(255, 255, 255, 0.85) 0 15px, transparent 16px),
    linear-gradient(180deg, #d6ecff 0%, #fff0f6 70%, #fff6e0 100%);
  box-shadow: inset 0 -16px 0 #c9efc4, var(--shadow);
  overflow: hidden;
}
.welcome .kid { position: relative; inset: auto; flex: none; bottom: 0; width: calc(var(--kid-h) * 0.8); height: var(--kid-h); }
.welcome-text { flex: 1 1 auto; max-width: 380px; text-align: center; padding-bottom: 26px; animation: popIn 0.7s cubic-bezier(0.2, 1.6, 0.4, 1) 0.3s both; }
.bubble {
  position: relative; display: inline-block; margin: 0 0 12px; padding: 14px 20px;
  border-radius: 24px; background: #fff; box-shadow: 0 5px 0 var(--line-d);
  font-size: clamp(20px, 3.4vw, 26px); font-weight: 700; line-height: 1.2;
}
.bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -12px; margin-left: -12px;
  border: 12px solid transparent; border-top-color: #fff; border-bottom: 0;
}
.welcome-sub { margin: 0; font-size: 18px; color: var(--ink-soft); line-height: 1.35; }

.hearts { position: absolute; inset: 0; pointer-events: none; }
.hearts span { position: absolute; font-size: 20px; opacity: 0.8; animation: drift 3.2s ease-in-out infinite alternate; }
.hearts span:nth-child(1) { left: 34%; top: 12%; }
.hearts span:nth-child(2) { left: 62%; top: 8%; font-size: 16px; animation-delay: -1.2s; }
.hearts span:nth-child(3) { left: 70%; top: 44%; font-size: 14px; animation-delay: -2s; }
.hearts span:nth-child(4) { left: 26%; top: 50%; font-size: 15px; animation-delay: -0.6s; }

/* ---------- story cards ---------- */

.card h2 { display: flex; align-items: center; gap: 12px; }
.card h2 .ico {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px;
  font-size: 26px; background: #fff; box-shadow: 0 4px 0 var(--line);
}
.card p { margin: 0 0 14px; }
.card p:last-child { margin-bottom: 0; }
.card .lead { font-size: 21px; }

.problems { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 18px 0 16px; padding: 0; list-style: none; }
.problems li {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px;
  background: #fff; box-shadow: 0 4px 0 var(--line); font-size: 17px; line-height: 1.25;
}
.problems li span { font-size: 26px; }

.goods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 18px 0 16px; padding: 0; list-style: none; }
.goods li {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px;
  background: #ecfbef; box-shadow: 0 4px 0 #c3ebcb; font-size: 18px; line-height: 1.25;
}
.goods li span { flex: none; font-size: 28px; }

/* ---------- made with love, by children too ---------- */

.card.love {
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.7) 0 40px, transparent 41px),
    linear-gradient(160deg, #fff0f6 0%, #fff6e8 60%, #f3f0ff 100%);
  box-shadow: 0 0 0 4px #ffd1e1, var(--shadow);
  padding-top: 34px;
}
.card.love::before { height: 14px; background: radial-gradient(circle at 10px 7px, #fff 0 3.5px, transparent 4.5px) 0 0 / 20px 14px, repeating-linear-gradient(90deg, #f783ac 0 20px, #ffb3cc 20px 40px); }
.love h2 { font-size: 30px; }
.love-heart { position: absolute; top: 22px; right: 20px; width: 64px; height: 58px; animation: beat 1.6s ease-in-out infinite; }
.love h2 { padding-right: 64px; }

.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 20px 0 18px; padding: 0; list-style: none; }
.note {
  position: relative; padding: 18px 16px 14px; border-radius: 6px 6px 18px 6px;
  font-size: 18px; line-height: 1.3; box-shadow: 0 6px 14px rgba(61, 44, 85, 0.14);
  transform: rotate(var(--r, -1.5deg));
}
.note::before { content: ''; position: absolute; top: -9px; left: 50%; width: 62px; height: 18px; margin-left: -31px; background: rgba(255, 255, 255, 0.65); border-radius: 3px; transform: rotate(-3deg); }
.note b { display: block; margin-bottom: 4px; font-size: 15px; color: var(--ink-soft); }
.note.yellow { background: #fff3bf; }
.note.blue { background: #dbeeff; --r: 1.5deg; }
.note.green { background: #dcf7e0; --r: -0.8deg; }
.note.pink { background: #ffe0ec; --r: 1deg; }

.games-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; padding: 0; list-style: none; }
.games-chips a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #fff; box-shadow: 0 3px 0 var(--line); font-size: 17px; text-decoration: none; }
.games-chips a:hover { background: #fffbe6; }

/* ---------- support ---------- */

.card.help { background: linear-gradient(180deg, var(--paper), #fff8e1); }
.actions { display: flex; flex-wrap: wrap; gap: 16px 18px; margin: 22px 0 18px; }
.soon-note {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; border-radius: 18px;
  background: #f3f0ff; border: 3px dashed #d0bfff; font-size: 17px !important; line-height: 1.3 !important;
}
.soon-note span { font-size: 24px; }

.signoff { margin-top: 18px !important; text-align: right; font-size: 21px !important; }
.signoff em { font-style: normal; color: #d6336c; }

.page-foot { line-height: 2; }
.page-foot p { margin: 4px 0; }

/* ---------- entrance ---------- */

.js .reveal { opacity: 0; transform: translateY(26px) scale(0.98); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 1.3, 0.4, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@keyframes popIn { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translateY(0) rotate(-8deg); } to { transform: translateY(-10px) rotate(8deg); } }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.12); } }

/* ---------- small screens ---------- */

@media (max-width: 600px) {
  .welcome { --kid-h: min(104px, 25vw); padding: 22px 8px 14px; gap: 4px; }
  .welcome-text { padding-bottom: 18px; }
  .welcome-sub { font-size: 15px; }
  .hearts span:nth-child(3) { left: 84%; top: 8%; }
  .hearts span:nth-child(4) { left: 10%; top: 10%; }
  .bubble { padding: 10px 12px; }
  .card { padding: 24px 18px 20px; }
  .card h2 { font-size: 23px; }
  .love h2 { font-size: 25px; }
  .love-heart { width: 46px; height: 42px; top: 24px; right: 14px; }
  .love h2 { padding-right: 44px; }
  .card p, .card li { font-size: 18px; }
  .card .lead { font-size: 19px; }
  .actions .btn { width: 100%; }
  .signoff { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}
