/* The parents' landing page. It inherits direction A's world from base.css and
   page.css, and only adds what this page has and the checklist page does not:
   a single-column hero with no booklet and the seven numbered topics. The sample
   topic is the checklist's own chapter 2, styled by guide.css. */

.p-hero {
  /* The shared header is absolutely positioned over the hero, so the top padding
     has to clear it, exactly as the checklist page's hero does. */
  padding-block: clamp(108px, 12vw, 152px) clamp(48px, 6vw, 92px);
  background:
    radial-gradient(120% 90% at 85% 0%, var(--navy-3) 0%, transparent 55%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
}
.p-scene { max-width: 46ch; color: var(--gold-soft); font-size: clamp(1rem, .95rem + .3vw, 1.15rem); }
.p-hero h1 {
  margin-block: 14px 18px; max-width: 20ch;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 1.5rem + 3.4vw, 4.2rem); line-height: 1.05; text-wrap: balance;
}
.p-hero h1 em { font-style: normal; color: var(--gold-soft); display: block; }
.p-sub { max-width: 56ch; font-size: clamp(1.03rem, 1rem + .3vw, 1.18rem); color: #DCE4F1; }
.p-hero .hero-actions { margin-top: 28px; }
.p-facts { margin-top: 30px; }

/* The seven topics: a numbered list, not a card grid. */
.p-items { display: grid; gap: 4px; margin-top: 30px; counter-reset: topic; }
.p-items li {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  padding-block: 22px; border-block-start: 1px solid var(--line);
}
.p-items li:last-child { border-block-end: 1px solid var(--line); }
.p-num {
  font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: .9;
  color: var(--gold); min-width: 1.6ch; text-align: center; font-variant-numeric: tabular-nums;
}
.p-items h3 { font-size: 1.22rem; color: var(--navy); line-height: 1.3; }
.p-items p { margin-top: 5px; color: var(--muted); max-width: 70ch; }

/* Hero: the copy on the start side, a crib mobile on the other. The mobile is the
   page's one authored motion: the arm sways and each shape dangles a beat behind. */
.p-hero-grid { display: grid; gap: 22px; align-items: center; }
@media (min-width: 960px) { .p-hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; } }
.p-mobile { width: min(100%, 360px); height: auto; justify-self: center; overflow: visible; }
@media (max-width: 959px) { .p-mobile { width: 200px; margin-top: 6px; } }
.p-mobile-hook { fill: none; stroke: var(--gold-soft); stroke-width: 2; }
.p-mobile-cord { fill: none; stroke: rgba(231, 204, 147, .55); stroke-width: 1.2; }
.p-mobile-bar { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.p-mobile-shape { fill: none; stroke: var(--gold-soft); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.p-mobile-coin { fill: rgba(194, 135, 34, .2); }
.p-mobile-sign { fill: var(--gold-soft); font-family: var(--font-text); font-weight: 700; font-size: 17px; }
/* One swing when the page opens, back at rest within five seconds. Motion that runs longer
   needs a pause button (WCAG 2.2.2, which the Israeli standard follows). The inline --d
   values (0s to -5s) become starts a beat apart, 0 to .8s. */
@media (prefers-reduced-motion: no-preference) {
  .p-mobile-arm { transform-origin: 160px 12px; animation: p-sway 4.8s ease-in-out; }
  .p-mobile-drop {
    transform-box: fill-box; transform-origin: top center;
    animation: p-dangle 4s ease-in-out; animation-delay: calc(var(--d, 0s) * -.16);
  }
  @keyframes p-sway { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.2deg); } 75% { transform: rotate(2.2deg); } }
  @keyframes p-dangle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(3deg); } 75% { transform: rotate(-3deg); } }
}

/* One line icon per topic, next to its title. */
.p-items h3 { display: flex; align-items: center; gap: 10px; }
.p-ico {
  width: 26px; height: 26px; flex: none;
  fill: none; stroke: var(--gold-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* The savings timeline: birth to 21, the deadline marked in gold. Vertical on a
   phone, horizontal from a tablet up; either way it reads from the start side. */
.p-timeline { break-inside: avoid; }
.p-timeline h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; color: var(--navy); }
.p-timeline ol { position: relative; display: grid; gap: 18px; margin-top: 16px; }
.p-timeline ol::before {
  content: ""; position: absolute; inset-block: 11px; inset-inline-start: 10px; width: 2px; background: var(--line);
}
.p-timeline li { position: relative; display: grid; gap: 3px; padding-inline-start: 36px; }
.p-timeline li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: inset 0 0 0 2px var(--navy);
}
.p-timeline li.is-deadline::before { background: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.p-timeline b { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.2; color: var(--navy); }
.p-timeline li.is-deadline b { color: var(--gold-ink); }
.p-timeline span { font-size: .93rem; line-height: 1.45; color: var(--muted); }
@media (min-width: 700px) {
  .p-timeline ol { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .p-timeline ol::before { inset-block: auto; top: 11px; inset-inline: 11px; width: auto; height: 2px; }
  .p-timeline li { padding-inline-start: 0; padding-top: 36px; }
  .p-timeline li::before { top: 0; }
}
/* Chapter illustrations: a third column in the chapter head, only where one exists. */
.g-head:has(.gp-art) { grid-template-columns: auto minmax(0, 1fr) auto; }
.gp-art {
  grid-row: 1 / span 2; grid-column: 3; align-self: end;
  width: clamp(58px, 9cqw, 82px); height: auto; aspect-ratio: 1;
  fill: none; stroke: var(--gold-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
symbol[id^="a-"] .fill { fill: rgba(231, 204, 147, .45); }
symbol[id^="a-"] .dot { fill: var(--navy); stroke: none; }
symbol[id^="a-"] .glyph { fill: var(--gold-ink); stroke: none; font-family: var(--font-display); font-weight: 800; font-size: 13px; }

/* The fridge page: all seven topics on one sheet, right after the cover. Each row is the
   chapter's illustration, what to do, until when (gold where there is a real deadline),
   and a box that ticks together with the chapter's own box. On screen the same list opens
   the page, above the reader, so here it is kept for print. */
@media screen { .reader .gp-glance { display: none; } }
.gp-glance-list { display: grid; margin-top: 24px; border-top: 2px solid var(--navy); }
.gp-glance-list li {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) 26px;
  grid-template-areas: "art body tick" "art when tick";
  gap: 6px 14px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--line);
}
.gp-glance-art {
  grid-area: art; align-self: start; width: 46px; height: 46px;
  fill: none; stroke: var(--gold-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.gp-glance-body { grid-area: body; min-width: 0; }
.gp-glance-t { display: flex; align-items: baseline; gap: 8px; font-weight: 800; font-size: 1.1rem; line-height: 1.3; color: var(--navy); }
.gp-glance-n { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--gold); }
.gp-glance-t + p { margin-top: 3px; font-size: .98rem; line-height: 1.55; }
.gp-when {
  grid-area: when; justify-self: start; padding: 3px 12px; border-radius: var(--r-pill);
  background: var(--mist); font-size: .88rem; font-weight: 700; line-height: 1.5; color: var(--muted);
}
.gp-when.is-deadline { background: rgba(194, 135, 34, .18); color: var(--gold-ink); }
.gp-glance-list .tick-wrap { grid-area: tick; }
.gp-glance-foot { margin-top: 16px; font-size: .95rem; color: var(--muted); }
@container (min-width: 640px) {
  .gp-glance-list li { grid-template-columns: 52px minmax(0, 1fr) 190px 26px; grid-template-areas: "art body when tick"; gap: 6px 18px; }
  .gp-glance-art { align-self: center; width: 52px; height: 52px; }
  .gp-when { justify-self: stretch; text-align: center; }
}

/* The crib mobile hangs on the checklist's cover as well, opposite the title. */
#gp-cover { position: relative; }
.gp-cover-mobile { position: absolute; top: 8%; inset-inline-end: 7%; width: min(34%, 260px); height: auto; z-index: 0; }
@media (max-width: 600px) { .gp-cover-mobile { width: 30%; top: 5%; } }

@media print {
  /* The on-page print button prints the checklist, never the landing sections above it. */
  .p-hero, .p-inside, .p-sample { display: none !important; }
  .p-timeline li::before, .gp-art, .gp-cover-mobile, symbol[id^="a-"] .fill, .gp-glance-art, .gp-when, .gp-glance-list .tick-box {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .gp-art { width: 21mm; }
  /* The fridge page is read from a step away, so it prints larger than the chapters. */
  .gp-glance-list { margin-top: 14px; }
  .gp-glance-list li { padding-block: 13px; break-inside: avoid; }
  .gp-glance-art { width: 14mm; height: 14mm; }
  .gp-glance-t { font-size: 14pt; }
  .gp-glance-n { font-size: 15pt; }
  .gp-glance-t + p { font-size: 12pt; line-height: 1.45; }
  .gp-when { font-size: 10.5pt; }
  .gp-glance-foot { font-size: 11pt; }
  .gp-cover-mobile { width: 62mm; top: 26mm; }
  /* Heebo runs wider than the serif it replaced: at the shared cover size the title ran under the mobile. */
  #gp-cover .g-cover-title { font-size: 36pt; }
}
