/* Top of the home page: welcome paragraph, the rotating question, the three question panels and the problems-we-solve strip.
   Colours come from the theme variables, so Light, Dark and Brite all work. Motion is switched off for prefers-reduced-motion. */
.welcome { position: relative; z-index: 2; padding: 4.2rem 1.25rem 1.2rem; }
.welcome-in { width: min(100%, 62rem); margin-inline: auto; display: grid; gap: 1.2rem; align-items: center; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 14px; background: var(--bg); }
.welcome-title { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 600; margin: 0 0 0.5rem; color: var(--ink); }
.welcome-text p { margin: 0 0 0.6rem; color: var(--ink-2); line-height: 1.6; font-weight: 300; }
.welcome-text p:last-child { margin-bottom: 0; color: var(--ink); }
.welcome-count { margin: 0; display: grid; justify-items: center; text-align: center; gap: 0.2rem; }
.wc-num { font-family: var(--font-display); font-size: clamp(3rem, 9vw, 4.6rem); line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.wc-label { max-width: 12rem; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--ink-2); }
@media (min-width: 760px) { .welcome-in { grid-template-columns: 1fr auto; gap: 2rem; } }

.q-type { position: relative; z-index: 2; margin: 0.2rem auto 0.8rem; min-height: 1.6em; max-width: 44rem; padding-inline: 1.25rem; text-align: center; font-family: var(--font-display); font-size: clamp(1.05rem, 2.6vw, 1.35rem); color: var(--gold); }
.q-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; vertical-align: -0.15em; background: var(--gold); animation: q-blink 1s steps(1) infinite; }
@keyframes q-blink { 50% { opacity: 0; } }

.chapter-ask { padding-block: 3rem 2rem; }
.ask-title { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 600; text-align: center; margin: 0 0 1.6rem; color: var(--ink); }
.q-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .q-grid { grid-template-columns: repeat(3, 1fr); } }
.q-panel { position: relative; overflow: hidden; display: grid; align-content: start; gap: 0.5rem; padding: 1.4rem 1.3rem 2.6rem; min-height: 15rem; text-decoration: none; color: var(--ink); border: 1.5px solid var(--line); border-radius: 18px; background: var(--bg); transition: transform 0.35s ease, border-color 0.25s, background-color 0.25s; }
.q-panel::after { content: "\2192"; position: absolute; right: 1.1rem; bottom: 0.9rem; color: var(--gold); font-size: 1.4rem; transition: transform 0.3s; }
.q-art { width: 3.6rem; height: 3.6rem; color: var(--ink-2); transition: transform 0.4s ease, color 0.25s; }
.q-art svg { width: 100%; height: 100%; display: block; }
.q-who { font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.q-text { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.q-answer { color: var(--ink-2); font-weight: 300; line-height: 1.5; font-size: 0.95rem; max-width: 30ch; }
.q-panel:hover, .q-panel:focus-visible { transform: translateY(-4px); border-color: var(--gold); background: rgba(19, 86, 214, 0.12); }
.q-panel:hover .q-art, .q-panel:focus-visible .q-art { transform: rotate(-4deg) scale(1.08); color: var(--ink); }
.q-panel:hover::after, .q-panel:focus-visible::after { transform: translateX(6px); }
.q-panel:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (hover: hover) and (min-width: 820px) {
  .q-answer { max-height: 0; opacity: 0; transition: max-height 0.35s ease, opacity 0.3s; }
  .q-panel:hover .q-answer, .q-panel:focus-visible .q-answer { max-height: 8rem; opacity: 1; }
}

.ps-title { margin: 2.2rem 0 0.8rem; text-align: center; font-size: 0.75rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
.ps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
@media (min-width: 820px) { .ps { grid-template-columns: repeat(3, 1fr); } }
.ps li { display: grid; gap: 0.3rem; padding: 0.9rem 1.1rem; border-top: 1px solid var(--line); }
.ps-p { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--gold); font-weight: 300; }
.ps-s { color: var(--ink); font-weight: 500; }
.ps-s::before { content: "\2192\00a0"; color: var(--gold); }

.chapter-compact { padding-block: 2rem; }
.chapter-compact .lede { font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
  .q-type { display: none; }
  .q-caret { animation: none; }
  .q-panel, .q-art, .q-panel::after { transition: none; }
  .q-panel:hover, .q-panel:focus-visible, .q-panel:hover .q-art, .q-panel:hover::after { transform: none; }
  .q-answer { max-height: none !important; opacity: 1 !important; transition: none; }
}

/* Big titles: the white and yellow parts on the SAME line (stacked only on phones, where there is no room) */
@media (min-width: 640px) {
  .chapter .kinetic { font-size: clamp(1.3rem, 0.4rem + 2.7vw, 3.4rem); }
  .chapter .kinetic .line { display: inline-block; vertical-align: top; margin-right: 0.28em; }
}

/* Top of the page: the logo stays compact so the rotating question, the welcome text and the XAG Education tabs come into view at once. */
.chapter.hero { min-height: 0; padding-bottom: 1.6rem; }
.chapter.hero .cue { display: none; }
.q-line { position: relative; z-index: 2; padding-top: 0.4rem; }
.welcome { padding-top: 1rem; }
