/* aitism: the home page. styles.css comes first: the tiled wall, the sign bar, plates, buttons and the sheet itself.
   The page is a station wall: one enamel headline sign, example sheets hung in poster frames, a departure board. */
.home { --gut: 32px; --wide: 1376px; }
html:has(.home) { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 24px); }
@media (prefers-reduced-motion: reduce) { html:has(.home) { scroll-behavior: auto; } }
.home ::selection { background: var(--sign); color: #fff; }
.home :is(.bar, .sign, .dboard-sign) ::selection { background: var(--amber); color: var(--sign); }

.skip { position: absolute; left: 12px; top: -64px; z-index: 40; padding: 9px 14px; border-radius: var(--r); background: #fff; color: var(--sign);
  font-weight: 700; text-decoration: none; box-shadow: 0 2px 8px rgba(11,21,40,.3); }
.skip:focus { top: 12px; }

/* ---------- sign bar ---------- */
.home .bar { gap: 24px; }
.home-nav { display: flex; gap: 6px 18px; margin-left: auto; flex-wrap: wrap; }
.home-nav a { color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; border-radius: 4px; padding: 2px 0; }
.home-nav a:hover { color: var(--amber); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.home .bar .acct { margin-left: 4px; font-size: 15px; }
/* the main action on a navy sign is a white button: on navy, white is the loudest thing there is */
.btn-sign { background: #fff; border-color: #fff; color: var(--sign); text-decoration: none; }
.btn-sign:hover:not(:disabled) { background: var(--hover); border-color: var(--hover); }
.bar .btn-sign { flex: none; padding: 9px 15px; font-size: 15px; }
.btn-big { padding: 13px 22px; font-size: 17px; }

/* ---------- the headline sign ---------- */
.hero, .sec { max-width: calc(var(--wide) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.hero { padding-top: 28px; }
.sign { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 64px; align-items: center;
  padding: 38px 48px 40px; border-radius: 8px; color: #fff;
  background: var(--sign) linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,0) 55%);
  box-shadow: 0 1px 0 rgba(11,21,40,.4), 0 3px 8px rgba(11,21,40,.16); }
/* enamel: a pale keyline just inside the edge */
.sign::before { content: ""; position: absolute; inset: 5px; border: 1.5px solid rgba(255,255,255,.6); border-radius: 5px; pointer-events: none; }
.sign :focus-visible { outline-color: var(--amber); }
.sign h1, .sign h2 { font-weight: 800; line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; }
.sign h1 { font-size: clamp(40px, 4.6vw, 68px); }
.sign h2 { font-size: clamp(34px, 3.6vw, 54px); }
.sign-lede { margin-top: 16px; max-width: 60ch; font-size: 20px; line-height: 1.5; color: #C9D2DE; text-wrap: pretty; }
.sign-who { margin-top: 12px; font-size: 17px; font-weight: 700; line-height: 1.45; }
.sign-act { position: relative; display: grid; gap: 12px; justify-items: start; min-width: 260px; }
/* the home page's sign: the headline runs the full width, the action sits beside the promise */
.hero .sign { align-items: end; row-gap: 0; padding: 34px 48px 36px; }
.hero .sign-copy { display: contents; }
.hero .sign h1 { grid-column: 1 / -1; margin-bottom: 18px; }
.hero .sign-lede { grid-column: 1; margin-top: 0; max-width: 68ch; }
.hero .sign-who { grid-column: 1; }
.hero .sign-act { grid-column: 2; grid-row: 2 / span 2; }
.sign-act p { font-size: 15px; line-height: 1.45; color: #C9D2DE; }
.sign-act a:not(.btn) { color: #fff; font-weight: 700; text-underline-offset: 3px; border-radius: 3px; }
.sign-act a:not(.btn):hover { color: var(--amber); }
.sign-safe { display: flex; align-items: center; gap: 8px; }
.sign-safe svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the poster wall: three readers, three equal posters ---------- */
.wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); gap: 0 32px; margin-top: 34px; }
/* each poster spans the wall's rows, so plates, headlines, sheets and controls line up across all three */
.poster { grid-row: span 5; display: grid; grid-template-rows: subgrid; min-width: 0; }
.poster .plate { margin: 0 0 16px; }
.poster .plate h3 { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.poster-h { font-size: clamp(25px, 2.15vw, 32px); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.poster-p { margin: 10px 0 20px; max-width: 46ch; font-size: 17px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* a poster frame round one sheet of A4, the page scaled to fit: the same frame the sheet maker hangs its sheet in */
.frame { position: relative; align-self: start; padding: 8px; border-radius: 4px; background: linear-gradient(180deg, var(--poster-frame), var(--poster-frame-deep));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 0 0 1px #0B1528, 0 18px 32px -10px rgba(11,21,40,.45); }
.frame-in { position: relative; aspect-ratio: 794 / 1120; overflow: hidden; background: var(--paper); }
.frame-in .sheet { position: absolute; top: 0; left: 0; transform: scale(var(--s, .5)); transform-origin: 0 0; box-shadow: none; }

.poster-foot { display: grid; gap: 12px; justify-items: start; margin-top: 18px; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.who-k { flex: 1 0 100%; margin-bottom: 2px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.who-b { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 14px 4px 4px; border: 1px solid var(--rule-2); border-radius: 999px;
  background: var(--paper); font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.who-b:hover { border-color: var(--ink-2); }
.who-b .bullet { width: 28px; height: 28px; font-size: 13px; }
/* the chosen child is a white chip in a navy ring, like the chosen child in the sheet maker: their bullet already wears their colour */
.who-b[aria-pressed="true"] { border-color: var(--sign); box-shadow: inset 0 0 0 1px var(--sign); }
/* every child's description shares one cell, so switching never moves what comes after it */
.who-is { display: grid; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.who-is > span { grid-area: 1 / 1; }
.who-is > span:not(.on) { visibility: hidden; }
.dl { color: var(--ink); text-decoration: none; padding: 9px 14px; font-size: 15px; }
.dl small { font-size: 12px; font-weight: 700; color: var(--ink-2); border: 1px solid var(--rule-2); border-radius: 999px; padding: 0 6px; line-height: 18px; }
.wall-note { margin-top: 28px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }

/* ---------- sections below the wall, each with clear wall above it ---------- */
.sec { margin-top: 136px; }
.sec > h2 { max-width: 22ch; font-size: clamp(32px, 3.4vw, 50px); font-weight: 800; line-height: 1.06; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.sec > h2 .ln { display: block; }
.sec-p { margin-top: 14px; max-width: 62ch; font-size: 19px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* how it works: three stops on Sam's line, beside the line itself */
.how { --line: #00804A; --line-ink: #fff; }
.how-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 40px 72px; align-items: start; margin-top: 44px; }
.howto { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 44px; counter-reset: stop; }
.howto::before { content: ""; position: absolute; left: 21px; top: 30px; bottom: 30px; width: 6px; margin-left: -3px; border-radius: 3px; background: var(--line); }
.howto li { position: relative; padding-left: 76px; counter-increment: stop; }
.howto li::before { content: counter(stop); position: absolute; left: -3px; top: -6px; width: 48px; height: 48px; border-radius: 50%; background: var(--paper);
  border: 6px solid var(--line); display: grid; place-items: center; font: 800 19px/1 var(--ui); color: var(--ink); }
.howto h3 { font-size: clamp(23px, 1.9vw, 28px); font-weight: 800; line-height: 1.2; color: var(--ink); }
.howto p { margin-top: 10px; max-width: 56ch; font-size: 18px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.line-fig { margin: 0; }
.line-fig .about { min-height: 200px; }
.line-fig figcaption { margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }

/* what it makes: a departure board in its sign */
.dboard-sign { position: relative; margin-top: 40px; padding: 14px; border-radius: 8px;
  background: var(--sign) linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0) 50%);
  box-shadow: 0 1px 0 rgba(11,21,40,.4), 0 3px 8px rgba(11,21,40,.16); }
/* the board's housing is a sign too, so it carries the keyline, as the sign bar does round the sheet maker's board */
.dboard-sign::before { content: ""; position: absolute; inset: 5px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 5px; pointer-events: none; }
.dboard { padding: 20px 28px 16px; border-radius: var(--r);
  background: var(--sign-deep) radial-gradient(circle, rgba(255,181,71,.12) .8px, transparent 1.25px) 0 0 / 4px 4px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6), inset 0 0 0 1px #24355A, 0 1px 0 rgba(255,255,255,.16); }
.dboard-k { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #C9D2DE; margin-bottom: 6px; }
.dboard-rows { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 64px; }
/* a destination on one line, where it calls beneath it: every row the same height, so the two columns stay in step */
.dboard-rows li { break-inside: avoid; display: grid; gap: 3px; padding: 12px 0 13px; border-bottom: 1px solid rgba(255,181,71,.16); }
.d-to { color: var(--amber); font: 900 22px/28px "Doto", var(--ui); letter-spacing: .02em; white-space: nowrap; text-shadow: 0 0 7px rgba(255,181,71,.38); }
.d-via { color: var(--amber-pale); font-size: 15px; font-weight: 700; line-height: 1.4; }

/* how a page is laid out: one sheet with four of its parts marked, the numbers kept in the gutter so they never cover the page */
.layout-grid { display: grid; grid-template-columns: minmax(340px, 552px) minmax(0, 1fr); gap: 40px 64px; align-items: start; margin-top: 44px; }
.layout-fig { position: relative; padding: 0 56px; }
.parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.parts li { position: relative; padding-left: 66px; }
.parts h3 { font-size: clamp(21px, 1.7vw, 25px); font-weight: 800; line-height: 1.25; color: var(--ink); padding-top: 3px; }
.parts p { margin-top: 6px; max-width: 52ch; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.layout-copy .sec-p { margin-top: 36px; font-size: 16px; }
/* a part pointed at: a navy sign carrying its number, ringed in amber (squared, so it is never read as the sheet's own numbers);
   the same marker as the sheet maker's "What changed" */
.mark { display: grid; place-items: center; min-width: 42px; height: 34px; padding: 0 7px; border-radius: 9px; background: var(--sign); color: #fff;
  font: 800 16px/1 var(--ui); box-shadow: 0 0 0 3px var(--amber), 0 2px 8px rgba(0,0,0,.35); }
.parts .mark { position: absolute; left: 0; top: 0; }
.layout-fig .mark { position: absolute; z-index: 2; }
.layout-fig .lead { position: absolute; z-index: 1; height: 0; border-top: 2px dashed var(--sign); }
/* the outline follows each part's own corners, so a round stop stays round */
.frame-in .xpart { outline: calc(2px / var(--s, .5)) dashed var(--sign); outline-offset: calc(4px / var(--s, .5)); }

/* your child's details */
.privacy { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 72px; align-items: start; }
.privacy-copy p { max-width: 60ch; font-size: 19px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.privacy-copy p + p { margin-top: 18px; }

/* the close */
.sign-end { padding-top: 44px; padding-bottom: 46px; }
.foot { max-width: calc(var(--wide) + 2 * var(--gut)); margin: 96px auto 0; padding: 22px var(--gut) 48px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 12px 32px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--rule); }
.foot b { color: var(--ink); font-weight: 800; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--ink-2); font-weight: 700; text-underline-offset: 3px; border-radius: 3px; }
.foot a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  .sign { grid-template-columns: minmax(0, 1fr); }
  .hero .sign-act { grid-column: 1; grid-row: auto; margin-top: 24px; }
  .sign-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
  .sign-safe { flex-basis: 100%; }
}
/* tablets: one poster per row, the words beside the sheet */
@media (max-width: 1023px) {
  .wall { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 64px; }
  .poster { grid-row: auto; grid-template-rows: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas:
    "plate frame" "h frame" "p frame" "foot frame" ". frame"; align-content: start; column-gap: 32px; }
  .poster .plate { grid-area: plate; } .poster-h { grid-area: h; } .poster-p { grid-area: p; } .poster-foot { grid-area: foot; margin-top: 0; }
  .poster .frame { grid-area: frame; }
  .how-grid, .layout-grid, .privacy { grid-template-columns: minmax(0, 1fr); }
  .line-fig { max-width: 440px; }
  .layout-fig { max-width: 552px; }
  .dboard-rows { columns: 1; }
  .sec { margin-top: 104px; }
}
@media (max-width: 899px) {
  .home-nav { display: none; }
  .home .bar .acct { margin-left: auto; }
}
@media (max-width: 859px) {
  .home .bar { position: sticky; flex-wrap: nowrap; padding: 10px 16px; gap: 12px; min-height: 64px; }
  .home .bar .acct { order: 0; }
}
@media (max-width: 639px) {
  .home { --gut: 16px; }
  .hero { padding-top: 16px; }
  .home .bar .acct { display: none; }
  .home .bar .btn-sign { margin-left: auto; padding: 8px 12px; font-size: 14px; }
  .sign, .hero .sign { padding: 28px 22px 30px; gap: 22px; }
  .sign-lede { font-size: 18px; }
  .sign-act { display: grid; justify-items: stretch; }
  .sign-act .btn-big { justify-content: center; }
  .wall { margin-top: 28px; gap: 56px; }
  .poster { display: block; }
  .poster .frame { margin: 0 0 4px; }
  .poster-foot { margin-top: 16px; }
  .poster-p { margin-bottom: 18px; }
  .sec { margin-top: 88px; }
  .sec-p, .privacy-copy p { font-size: 17px; }
  .howto { gap: 34px; }
  .howto li { padding-left: 64px; }
  .howto p { font-size: 17px; }
  .dboard-sign { padding: 10px; }
  .dboard { padding: 16px 16px 10px; }
  .dboard-rows li { padding: 10px 0; }
  .d-to { font-size: 20px; line-height: 26px; white-space: normal; }
  .parts li { padding-left: 60px; }
  .layout-fig { padding: 0 50px; }
}
