/* ── Lead the whole class (schools.html, Tom 2026-11-10) ────────────────────
   Read Together and Table Time as two layered cards behind one switcher.
   Both cards are complete static HTML; nothing here ever uses display:none
   or `hidden` on a card, so every word stays readable by crawlers and LLMs.
   Without the `.js` class the cards simply stack, one after the other.
   Behaviour: schools-lead.js (ARIA tabs, swipe, the first-use hint). ───── */

.sc-lead { margin-top: 3.2rem; scroll-margin-top: 1.5rem; }
.sc-lead > .sc-lede { margin-bottom: 0.4rem; }

/* Each sibling has its own accent: Read Together keeps the house gold,
   Table Time the palette's quiet sky blue (#7EC8E3). */
#lead-tab-rt, .sc-card--rt { --acc: #F5A623; --acc-rgb: 245, 166, 35; --acc-ink: #FFE9B8; }
#lead-tab-tt, .sc-card--tt { --acc: #7EC8E3; --acc-rgb: 126, 200, 227; --acc-ink: #D9F0F8; }

.sc-lead-icon { display: block; flex-shrink: 0; width: auto; }   /* painted icons (Tom, 2026-11-13): an open book with a fan of stars; the Table Time table */

/* ── The switcher: one big two-part control ───────────────────────────── */
.sc-switch {
  position: relative;
  display: flex; align-items: stretch; gap: 4px;
  width: max-content; max-width: 100%;
  margin: 1.4rem auto 1.7rem;
  padding: 5px;
  border-radius: 999px;
  background: rgba(8, 15, 44, 0.78);
  border: 1px solid rgba(245, 166, 35, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 233, 184, 0.07), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
}
.sc-switch-tab {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 58px;
  padding: 0.5rem 1.55rem 0.5rem 1.15rem;
  border: 0; border-radius: 999px;
  background: transparent;
  color: rgba(250, 246, 239, 0.66);
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 600;
  font-size: 1.14rem; line-height: 1.2; letter-spacing: 0.01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--duration-slow) var(--ease-default),
              color var(--duration-slow) var(--ease-default),
              box-shadow var(--duration-slow) var(--ease-default);
}
.sc-switch-tab .sc-lead-icon { height: 34px; opacity: 0.62; transition: opacity var(--duration-slow) var(--ease-default); position: relative; z-index: 1; }
.sc-switch-label { position: relative; z-index: 1; white-space: nowrap; }
.sc-switch-tab:hover { color: rgba(250, 246, 239, 0.9); }
.sc-switch-tab:hover .sc-lead-icon { opacity: 0.9; }
.sc-switch-tab[aria-selected="true"] {
  color: var(--acc-ink);
  background: rgba(var(--acc-rgb), 0.16);
  box-shadow: inset 0 0 0 1.5px rgba(var(--acc-rgb), 0.6);
}
.sc-switch-tab[aria-selected="true"] .sc-lead-icon { opacity: 1; }
.sc-switch-tab:focus-visible { outline: 2px solid #FFE9B8; outline-offset: 3px; }

/* The first-use hint: the inactive half wears the house's way-on light
   (the homepage sound chip's, markup copied) until the visitor first
   touches the switcher or the back card. schools-lead.js adds .is-hinting. */
.sc-switch-light { display: none; position: absolute; inset: 10px 18px; pointer-events: none; --wo-z: 0; }
.sc-switch-light .way-on-glow { inset: -40%; opacity: 0.75; }
.sc-lead.is-hinting .sc-switch-tab[aria-selected="false"] .sc-switch-light { display: block; }
@media (prefers-reduced-motion: reduce) {
  .sc-lead .sc-switch-light { display: none !important; }
}

/* ── The cards ────────────────────────────────────────────────────────── */
.sc-card {
  position: relative;
  border-radius: 30px;
  padding: 1.7rem 1.6rem 2.1rem;
  background:
    radial-gradient(ellipse 62% 34% at 50% 0%, rgba(var(--acc-rgb), 0.13) 0%, transparent 72%),
    linear-gradient(180deg, #17265f 0%, #101b4c 100%);
  border: 1px solid rgba(var(--acc-rgb), 0.34);
  box-shadow: 0 26px 60px -24px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 233, 184, 0.06);
}
.sc-card + .sc-card { margin-top: 1.6rem; }
.sc-card-head {
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
}
.sc-card-head .sc-lead-icon { height: 72px; filter: drop-shadow(0 6px 10px rgba(4, 8, 32, 0.45)); }
.sc-card .sc-eyebrow { color: var(--acc); }
.sc-card-h {
  text-align: center;
  font-family: 'Fraunces', 'M PLUS Rounded 1c', Georgia, serif;
  font-variation-settings: 'opsz' 60, 'wght' 700, 'SOFT' 100, 'WONK' 1;
  font-weight: 700; letter-spacing: -0.005em;
  font-size: 1.45rem; line-height: 1.4;
  color: var(--gold);
  margin: 0.35rem 0 0.6rem;
}
.sc-card-h > span {
  background: linear-gradient(180deg, #FFE9B8 0%, #F5A623 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.sc-card--tt .sc-rt-panel--teacher {
  border-color: rgba(126, 200, 227, 0.5);
  box-shadow: 0 0 28px rgba(126, 200, 227, 0.12), inset 0 0 24px rgba(126, 200, 227, 0.05);
}
.sc-card--tt .sc-rt-panel-title { color: #A9DDF0; }
.sc-card--tt .sc-rt-link::before { border-color: rgba(126, 200, 227, 0.55); }
.sc-card--tt .sc-rt-star { color: #E4F5FB; text-shadow: 0 0 10px rgba(126, 200, 227, 0.9); }
.sc-card-hit { display: none; }

/* ── Layered (with JS) ────────────────────────────────────────────────────
   Both cards share one grid cell. The front card is opaque, so nothing of
   the back card's text shows through it. On tablet and desktop the back
   card sits offset to the side; on a phone it peeks out ABOVE, like a
   file-folder tab. Its title and icon stay crisp; its body fades and blurs. */
.js .sc-deck {
  --peek: 132px; --peek-y: 0px;
  --back-t: translateX(var(--peek)) scale(0.94);
  --leave-t: translateX(calc(var(--peek) + 7%)) rotate(1.4deg) scale(0.97);
  --enter-t: translateX(-4%) rotate(-0.6deg) scale(0.985);
  position: relative;
  display: grid;
  padding-right: var(--peek);
  touch-action: pan-y;
}
.js .sc-card {
  grid-area: 1 / 1;
  align-self: start;
  margin: 0;
  overflow: hidden;
  transform-origin: 100% 50%;
}
.js .sc-lead.is-live .sc-card { transition: max-height 0.62s cubic-bezier(0.45, 0.05, 0.25, 1), transform 0.3s var(--ease-default); }
.js .sc-card.is-front { z-index: 2; transform: none; }
.js .sc-card.is-back { z-index: 1; transform: var(--back-t); cursor: pointer; }
.js .sc-card-body { transition: opacity 0.45s var(--ease-gentle), filter 0.45s var(--ease-gentle); }
.js .sc-card.is-back .sc-card-body { opacity: 0.16; filter: blur(3px); will-change: transform; }
.js .sc-card.is-back .sc-card-head {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 2;
  width: calc(var(--peek) / 0.94);
  justify-content: center; gap: 0.7rem;
  padding: 0 0.5rem;
}
.js .sc-card.is-back .sc-eyebrow { font-size: 0.92rem; line-height: 1.35; text-align: center; color: var(--acc-ink); }
.js .sc-card.is-back .sc-card-hit { display: block; position: absolute; inset: 0; z-index: 3; }
/* An answer to pointing at it: the back card leans out a little. */
@media (hover: hover) and (pointer: fine) {
  .js .sc-lead.is-live .sc-deck:not(.is-anim) .sc-card.is-back:hover { transform: translateX(calc(var(--peek) - 14px)) scale(0.94); }
}

/* The shuffle: the front card slides back, the other comes forward. */
.js .sc-card.is-leaving { animation: sc-card-leave 0.62s cubic-bezier(0.45, 0.05, 0.25, 1) both; }
.js .sc-card.is-entering { animation: sc-card-enter 0.62s cubic-bezier(0.45, 0.05, 0.25, 1) both; }
.js .sc-deck.is-anim .sc-card-head { animation: sc-card-head-in 0.62s ease both; }
@keyframes sc-card-leave {
  0% { transform: none; z-index: 2; }
  46% { transform: var(--leave-t); z-index: 2; }
  54% { z-index: 1; }
  100% { transform: var(--back-t); z-index: 1; }
}
@keyframes sc-card-enter {
  0% { transform: var(--back-t); z-index: 1; }
  46% { transform: var(--enter-t); z-index: 1; }
  54% { z-index: 2; }
  100% { transform: none; z-index: 2; }
}
@keyframes sc-card-head-in {
  0%, 50% { opacity: 0; }
  100% { opacity: 1; }
}
/* Reduced motion: a simple crossfade (schools-lead.js fades the deck out,
   swaps, fades it back in). */
.js .sc-deck { transition: opacity 0.17s ease; }
.js .sc-deck.is-fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .js .sc-lead.is-live .sc-card,
  .js .sc-card-body { transition: none; }
  .js .sc-card.is-leaving, .js .sc-card.is-entering, .js .sc-deck.is-anim .sc-card-head { animation: none; }
}

/* Wide screens have room beside the column: the front card takes the full
   column width, centred under the switcher, and the back card peeks out
   into the margin. */
@media (min-width: 1200px) {
  .js .sc-deck { margin-right: calc(-1 * var(--peek)); }
}
@media (max-width: 900px) {
  .js .sc-deck { --peek: 112px; }
}
@media (max-width: 768px) {
  .js .sc-deck { --peek: 96px; }
  .sc-card { padding: 1.5rem 1.15rem 1.8rem; }
}
/* Phones: no room at the side, so the back card peeks out ABOVE the front
   one, its head showing like a file-folder tab. */
@media (max-width: 600px) {
  /* The hint's light and embers may drift past the screen edge; the section
     reaches the edge and clips there, so the page never scrolls sideways. */
  .sc-lead { overflow-x: clip; margin-left: -1.25rem; margin-right: -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem; }
  .sc-switch { width: 100%; }
  .sc-switch-tab { flex: 1 1 0; min-width: 0; padding: 0.45rem 0.7rem; gap: 0.45rem; font-size: 1.02rem; min-height: 54px; }
  .sc-switch-tab .sc-lead-icon { height: 28px; }
  .sc-switch-light { inset: 8px 10px; }
  .sc-card { padding: 0.85rem 1rem 1.7rem; border-radius: 24px; }
  .sc-card-head { flex-direction: row; justify-content: center; gap: 0.55rem; min-height: 44px; }
  .sc-card-head .sc-lead-icon { height: 48px; }
  .js .sc-deck {
    --peek: 0px; --peek-y: 62px;
    --back-t: translateY(calc(-1 * var(--peek-y))) scale(0.93);
    --leave-t: translateY(calc(-1 * var(--peek-y) - 48px)) rotate(-0.8deg) scale(0.96);
    --enter-t: translateY(26px) scale(0.985);
    padding-right: 0;
    padding-top: var(--peek-y);
  }
  .js .sc-card { transform-origin: 50% 0; }
  .js .sc-card.is-back .sc-card-head {
    position: static; width: auto; padding: 0;
    flex-direction: row; gap: 0.55rem;
  }
  .js .sc-card.is-back .sc-eyebrow { font-size: 0.86rem; }
}
