/* The front page only. Shared parts live in site.css.
   The missing page still uses the hero, the tiles and the cue. */

/* ---------- the missing page still opens on the five tiles ---------- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 1;
  min-height: min(calc(100vh - 56px), 820px); justify-content: center; padding-top: 32px; padding-bottom: 72px; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto -10%; height: 130%; pointer-events: none;
  background:
    radial-gradient(28% 32% at 18% 62%, color-mix(in srgb, var(--people) 13%, transparent), transparent 70%),
    radial-gradient(30% 34% at 40% 40%, color-mix(in srgb, var(--prop) 14%, transparent), transparent 70%),
    radial-gradient(28% 32% at 62% 66%, color-mix(in srgb, var(--build) 12%, transparent), transparent 70%),
    radial-gradient(30% 34% at 84% 42%, color-mix(in srgb, var(--learn) 12%, transparent), transparent 70%); }
.hero h1, .index > h1 { font-size: clamp(38px, 5vw, 66px); font-weight: 700; }
.hero .site-note { margin-top: 16px; text-wrap: balance; }

.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 40px; width: 100%; text-align: left; }
.tile { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px 22px 20px; border-radius: 28px; text-decoration: none;
  min-height: 248px; overflow: hidden; color: var(--ink);
  background: linear-gradient(160deg, var(--tint), color-mix(in srgb, var(--tint) 55%, var(--surface)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 14%, transparent);
  transition: transform .25s ease, box-shadow .25s ease; }
.tile::after { content: ""; position: absolute; right: -34px; bottom: -34px; width: 120px; height: 120px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 14%, transparent); pointer-events: none; }
.tile:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent), var(--shadow-lg); }
.tile .badge { width: 58px; height: 58px; border-radius: 18px; font-size: 30px; margin-bottom: 10px; box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 30%, transparent); }
.tile > b { font-family: var(--display); font-size: 20px; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
.tile > span[data-wording] { font-size: 14.5px; color: var(--ink-2); line-height: 1.35; }
.tile .count { position: relative; z-index: 1; margin-top: auto; padding-top: 12px; display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.tile .count b { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.tile .go { margin-left: auto; font-size: 22px; line-height: 1; transition: transform .25s ease; }
.tile:hover .go { transform: translateX(3px); }
.cue { margin-top: 28px; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 550;
  color: var(--ink); text-decoration: none; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.cue:hover { border-color: var(--ink-2); }
.cue .arrow { transition: transform .3s ease; }
.cue:hover .arrow { transform: translateY(2px); }

/* ---------- learning: a flashcard and a game ---------- */
.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.flash { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash .tag { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.flash .mn { font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: .04em; color: var(--c-ink); line-height: 1; }
.flash .mn-long { font-size: 13px; color: var(--ink-2); }
.flash .q { margin-top: 4px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.flash .opts { display: flex; gap: 6px; }
.flash .opts span { flex: 1; text-align: center; padding: 6px 0; border-radius: 9px; background: var(--field); font-weight: 600; font-size: 14px; }
.flash .opts .right { background: var(--c-ink); color: var(--on-c); }

/* the homemade game: paper colours on purpose, the same in light and dark */
.game { background: #fffdf3; color: #2b2b2b; font-family: "Chalkboard SE", "Comic Sans MS", "Marker Felt", "Comic Neue", cursive; padding: 14px 14px 12px;
  border: 2.5px solid #2b2b2b; border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px; box-shadow: 4px 5px 0 rgba(0, 0, 0, .12);
  transform: rotate(1.2deg); }
.game h3 { font-family: inherit; font-size: 18px; letter-spacing: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.game h3 small { font-size: 12px; font-weight: 400; }
.apples { min-height: 64px; margin: 6px 0 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
.apples svg { width: 30px; height: 32px; }
.picks { display: flex; gap: 8px; }
.picks button { flex: 1; font: inherit; font-size: 20px; font-weight: 700; color: #2b2b2b; background: #ffe8a8; cursor: pointer; padding: 4px 0;
  border: 2px solid #2b2b2b; border-radius: 14px 6px 14px 6px / 6px 14px 6px 14px; transition: transform .12s; }
.picks button:nth-child(2) { background: #c9ecff; }
.picks button:nth-child(3) { background: #d6f5c8; }
.picks button:hover { transform: rotate(-3deg) scale(1.05); }
.picks button:focus-visible { outline: 3px solid #0a66e0; outline-offset: 2px; }
.said { min-height: 1.5em; margin-top: 6px; font-size: 14px; text-align: center; }
.stars { color: #9a6a00; letter-spacing: 2px; }
.game .play-more { display: block; margin-top: 4px; text-align: center; font-size: 14px; color: #2b2b2b; text-underline-offset: 3px; }

/* ---------- every tool, one click away ---------- */
.index { padding: 28px 16px 48px; scroll-margin-top: 72px; }
.index > .panel-sub { margin-top: 12px; }
.groups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 28px; align-items: start; }
.group { background: var(--surface); border-radius: 22px; padding: 20px 14px 12px; box-shadow: var(--shadow); border-top: 4px solid var(--c); scroll-margin-top: 72px; }
.group h2 { font-size: 15px; display: flex; align-items: center; gap: 10px; padding: 0 8px 10px; letter-spacing: -0.005em; }
.group h2 .badge { width: 30px; height: 30px; border-radius: 9px; background: var(--tint); color: var(--c-ink); font-size: 17px; }
.group ul { list-style: none; margin: 0; padding: 0; }
.group a { display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; padding: 9px 8px; border-radius: 12px; text-decoration: none; }
.group a:hover { background: var(--tint); }
.group a .icon { font-size: 19px; color: var(--c-ink); grid-row: span 2; margin-top: 1px; }
.group a b { font-size: 14.5px; font-weight: 600; }
.group a span { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.group .sub-h { margin: 10px 8px 2px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--sans); font-size: 11.5px; font-weight: 700;
  line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- a slight rise on scroll. Never fades: the words are always at full strength ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { transform: translateY(24px); }
  .rise.risen { transform: none; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
}

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .hero .wrap { min-height: 0; padding-top: 40px; }
  .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tile { grid-column: span 2; min-height: 210px; }
  .tile:nth-child(n+4) { grid-column: span 3; }
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .groups > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .hero .wrap { padding-top: 22px; padding-bottom: 48px; }
  .hero h1, .index > h1 { font-size: 34px; }
  .hero .site-note { margin-top: 10px; font-size: 13px; }
  .cue { margin-top: 20px; }
  /* on a phone the tiles become five full-width rows: icon, words, count */
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 22px; }
  .tile, .tile:nth-child(n+4) { grid-column: auto; min-height: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto;
    column-gap: 14px; row-gap: 2px; align-items: center; padding: 14px 16px; border-radius: 20px; }
  .tile::after { display: none; }
  .tile .badge { grid-row: span 2; width: 48px; height: 48px; border-radius: 14px; font-size: 25px; margin: 0; }
  .tile > b { font-size: 16.5px; }
  .tile > span[data-wording] { font-size: 13.5px; grid-column: 2; }
  .tile .count { grid-column: 3; grid-row: 1 / span 2; margin: 0; padding: 0; flex-direction: column; align-items: center; gap: 0; font-size: 12px; }
  .tile .count b { font-size: 22px; }
  .tile .go { display: none; }
  .groups { grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
  .collage { grid-template-columns: 1fr; }
  .index { padding-top: 16px; padding-bottom: 32px; }
}
