/*=============== SKILLBALL – THEME ON TOP OF THE INDEXO PAGE ===============
  Loaded only by skillball.html, after styles.css, etherlocked-cartoon.css and
  indexo.css. The page uses <body class="ether-page indexo-page skillball-page">,
  so it gets every INDEXO layout (facts, picture frames, phone rows, the
  components table, chips). This file only:
    1. swaps the colour tokens for SkillBall's: its near-black background
       and the football yellow as the accent,
    2. puts the website hero behind the title,
    3. adds what this page needs: the four-step flow, the
       colour scales and type, the light/dark slider, the site map and the
       scrolling home page.
===================================================================== */

/* ───────────── 1. TOKENS ───────────── */
.skillball-page {
  /* ground: SkillBall's own background (#101213) and card colour (#16171A) */
  --paper: #101213;
  --paper-2: #18191c;
  --paper-3: #26272b;
  --night: #0b0b0c;
  --text: #f1f1f2;
  --ink: #101213;
  --pencil: #8b8b90;

  /* accents: the primary yellow (#E5CF2C) */
  --orange: #e5cf2c;
  --orange-hi: #efe385;
  --orange-dk: #ead858;
  --mustard: #f5edb2;
  --brick: #ead858;
  --itch: #e5cf2c;
  --itch-hi: #ead858;
  --mark: rgba(229, 207, 44, 0.14);

  background-color: var(--paper);
}

/* white label and arrow, like every other button */
.skillball-page .hero-cta,
.skillball-page .next-button {
  color: #fff;
}

.skillball-page .hero-cta .hand-arrow path,
.skillball-page .next-button .hand-arrow path {
  fill: currentColor;
}

/* ───────────── 2. HERO ───────────── */
.skillball-page .work-details {
  overflow: hidden;
  /* the dark Player profile screen from the app */
  background: var(--night) url("../img/SkillBall/sb-hero-bg.webp") 50% 40% / cover no-repeat;
}

/* the screen has bright white text of its own: darken it so the title and
   facts on top stay the clearest thing */
.skillball-page .indexo-hero-shade {
  background:
    radial-gradient(ellipse at center, rgba(11, 11, 12, 0.55) 0%, rgba(11, 11, 12, 0.88) 100%),
    linear-gradient(to bottom, rgba(11, 11, 12, 0.4) 0%, rgba(11, 11, 12, 0.85) 100%);
}

.skillball-page .work-title {
  text-shadow: 0 4px 0 rgba(11, 11, 12, 0.6), 0 10px 40px rgba(0, 0, 0, 0.7);
}

/* ───────────── 4. THE PRODUCT ───────────── */
/* the path through the app, drawn like the Puzzles diagram on EtherLocked:
   one SVG that reuses its lines, open chevron heads and labels sitting on a
   gap in the line (.puzzle-map, .pm-line, .pm-head, .pm-label). Only the
   node colours are this page's: the six colours of the site's shared tag
   palette. */
.skillball-page .sb-diagram {
  max-width: var(--content-width);
  margin: var(--flow-gap) 0 0;
}

.skillball-page .sb-diagram .pm-node text {
  font-size: 30px;
}

.skillball-page .sb-pm--moss rect { fill: color-mix(in srgb, #5f6b2b 50%, var(--paper)); stroke: color-mix(in srgb, #9aa94a 55%, var(--paper)); }
.skillball-page .sb-pm--plum rect { fill: color-mix(in srgb, #54405a 50%, var(--paper)); stroke: color-mix(in srgb, #a98cc9 55%, var(--paper)); }
.skillball-page .sb-pm--teal rect { fill: color-mix(in srgb, #3f5d63 50%, var(--paper)); stroke: color-mix(in srgb, #7fb0a8 55%, var(--paper)); }
.skillball-page .sb-pm--khaki rect { fill: color-mix(in srgb, #5e5434 50%, var(--paper)); stroke: color-mix(in srgb, #c9b77a 55%, var(--paper)); }
.skillball-page .sb-pm--slate rect { fill: color-mix(in srgb, #34466a 50%, var(--paper)); stroke: color-mix(in srgb, #8ea6d6 55%, var(--paper)); }
.skillball-page .sb-pm--wine rect { fill: color-mix(in srgb, #6a2f4a 50%, var(--paper)); stroke: color-mix(in srgb, #d98aa8 55%, var(--paper)); }

/* from match to highlight: six stages. Each one is the text on one side
   and a close-up of the real window on the other, sides taking turns down
   the page. The numbers are the tilted sticker chips of the Design decisions
   cards. */
.skillball-page .sb-stages {
  display: grid;
  gap: var(--space-2xl);
  max-width: var(--content-width);
  margin: var(--flow-gap) 0 0;
  padding: 0;
  list-style: none;
}

.skillball-page .sb-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--space-l);
  align-items: center;
}

/* every other stage: the picture first */
.skillball-page .sb-stage--flip .sb-stage__text {
  order: 2;
}

/* a stage with a wide picture or several: the text above, the pictures under */
.skillball-page .sb-stage--full,
.skillball-page .sb-stage:has(.sb-stage__pic--wide) {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-m);
}

.skillball-page .sb-stage__text {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-s);
  align-items: center;
}

.skillball-page .sb-stage__num {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  font-family: var(--cartoon-font);
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--ink);
  background: var(--orange);
  border: var(--stroke-thick) solid var(--pencil);
  border-radius: var(--wobble-sm);
  transform: rotate(-6deg);
}

.skillball-page .sb-stage__title {
  margin: 0;
  font-family: var(--cartoon-font);
  font-size: var(--fs-h3);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: var(--lh-tight);
  color: var(--orange-dk);
}

.skillball-page .sb-stage__text p {
  grid-column: 1 / -1;
}

.skillball-page .sb-stage__text p {
  margin: var(--space-s) 0 0;
  font-size: var(--fs-body-s);
  line-height: var(--lh-body);
}

/* key words highlighted, as in the paragraphs */
.skillball-page .sb-stage__text p span {
  padding: 0.02em 0.18em;
  margin-inline: -0.05em;
  color: var(--orange-dk);
  background: var(--mark);
  border-radius: 0.4em;
  box-decoration-break: clone;
}

/* the editor's three tools: each a whole screen with numbered outlines on
   its parts and a numbered note for each, the same marks and notes as the
   annotated screens on the INDEXO page. The outlines are yellow so they
   show on the dark screens. */
.skillball-page .sb-annots {
  display: grid;
  gap: var(--space-xl);
  margin-top: var(--space-s);
}

.skillball-page .sb-annot {
  --mark-c: var(--orange);
}

.skillball-page .sb-annot__title {
  margin: 0 0 var(--space-s);
  font-family: var(--cartoon-font);
  font-size: var(--fs-h4);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text);
}

.skillball-page .sb-annot .dash-compare__shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  outline: var(--stroke-thin) solid var(--divider);
  outline-offset: -1px;
}

.skillball-page .sb-annot__notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-s) var(--space-m);
  margin-top: var(--space-m);
}

/* the waiting time between configuring and the moments being found: a
   dashed line across with a label on it, a line of text, and the two ways
   the player is told it is done */
.skillball-page .sb-wait {
  display: grid;
  justify-items: center;
  gap: var(--space-s);
  text-align: center;
}

.skillball-page .sb-wait__label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  width: 100%;
  justify-content: center;
  font-family: var(--cartoon-font);
  font-size: var(--fs-h4);
  letter-spacing: 0.03em;
  color: var(--pencil);
}

/* the dashed line, broken where the label sits */
.skillball-page .sb-wait__label::before,
.skillball-page .sb-wait__label::after {
  content: "";
  flex: 1;
  border-top: var(--stroke-thick) dashed var(--pencil);
}

.skillball-page .sb-wait__label::before {
  margin-right: var(--space-xs);
}

.skillball-page .sb-wait__label::after {
  margin-left: var(--space-xs);
}

.skillball-page .sb-wait__text {
  max-width: 34rem;
  margin: 0;
  font-size: var(--fs-body-s);
  line-height: var(--lh-body);
}

.skillball-page .sb-wait__notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.skillball-page .sb-wait__notes li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-3xs) var(--space-s);
  font-size: var(--fs-label);
  background: var(--paper-3);
  border: var(--stroke) solid var(--pencil);
  border-radius: var(--wobble-sm);
}

/* the close-up: the window on its own, no panel around it */
.skillball-page .sb-stage__pic {
  display: grid;
  place-items: center;
  margin: 0;
}

.skillball-page .sb-stage__pic img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 26rem;
  border-radius: var(--radius);
  /* the dark windows need an edge to stand out from the dark panel */
  outline: var(--stroke-thin) solid var(--divider);
  outline-offset: -1px;
}

.skillball-page .sb-stage__pic--wide img {
  max-height: none;
}

/* the editor's three tools side by side */
.skillball-page .sb-stage__gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-m);
  align-items: stretch;
}

.skillball-page .sb-stage__gallery .sb-stage__pic {
  grid-template-rows: 1fr auto;
}

.skillball-page .sb-stage__gallery .sb-stage__pic img {
  max-height: 20rem;
}

/* ───────────── 5. DESIGN SYSTEM ───────────── */
/* built the same way as on the INDEXO page (token flow, token blocks,
   ramps, spacing and radius scales, semantic list, components table, button
   tiles); only what differs for SkillBall is here */

/* SkillBall's scales have ten shades, 50 to 900 */
.skillball-page .ramp__swatches {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

/* the type chips in the real font */
.skillball-page .sb-inter {
  font-family: "Inter", system-ui, sans-serif;
}

.skillball-page .sb-bowlby {
  font-family: "Bowlby One SC", system-ui, sans-serif;
}

/* the primary button, drawn from the tokens: primary/400 fill, text in
   primary-foreground, radius medium (12), Inter Medium */
.skillball-page .sb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: 12px;
}

.skillball-page .sb-btn--solid {
  color: #101213;
  background: #e4ce2b;
}

.skillball-page .sb-btn--bordered {
  color: #e4ce2b;
  border-color: #e4ce2b;
}

.skillball-page .sb-btn--light {
  color: #e4ce2b;
}

.skillball-page .sb-btn--icon i {
  font-size: 1.1rem;
}

.skillball-page .sb-btn--sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.skillball-page .sb-btn--disabled {
  opacity: 0.4;
}

/* the tiles sit on the system's own dark card colour (content1) */
.skillball-page .sb-tile {
  background: #16171a;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pencil) 30%, transparent);
}

/* ───────────── 6. LIGHT AND DARK: THE SLIDER ───────────── */
/* the dark screen underneath, the light one on top cut off at --pos; a
   range input across the whole picture moves the cut, so it works with a
   mouse, a finger and the arrow keys */
.skillball-page .sb-ba {
  max-width: var(--content-width);
  margin: var(--flow-gap) 0 0;
}

.skillball-page .sb-ba__stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 0 0 var(--stroke-thin) var(--divider);
  touch-action: pan-y;
}

.skillball-page .sb-ba__img {
  display: block;
  width: 100%;
  height: auto;
}

.skillball-page .sb-ba__top {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.skillball-page .sb-ba__top .sb-ba__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skillball-page .sb-ba__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: var(--stroke-thick);
  background: var(--orange);
  translate: -50% 0;
  pointer-events: none;
}

.skillball-page .sb-ba__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  translate: -50% -50%;
}

.skillball-page .sb-ba__tag {
  position: absolute;
  top: var(--space-s);
  padding: var(--space-3xs) var(--space-xs);
  font-size: var(--fs-label);
  font-weight: 600;
  border-radius: var(--radius-pill);
  pointer-events: none;
}

.skillball-page .sb-ba__tag--l {
  left: var(--space-s);
  color: #101213;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.skillball-page .sb-ba__tag--r {
  right: var(--space-s);
  color: #fff;
  background: #101213;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* the range input covers the picture, invisible; only its thumb area
   catches the pointer so the page still scrolls on a phone */
.skillball-page .sb-ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}

.skillball-page .sb-ba__range {
  touch-action: pan-y;
}

.skillball-page .sb-ba__stage:has(.sb-ba__range:focus-visible) {
  outline: var(--stroke) solid var(--orange);
  outline-offset: 3px;
}

/* ───────────── 7. MARKETING SITE ───────────── */
/* the site map is shared with Datakom (indexo.css); on yellow the site
   name needs dark text */
.skillball-page .site-map__root {
  color: var(--ink);
}

/* the other pages, three to a row, each the top of the page */
.skillball-page .sb-pages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-m);
  align-items: start;
  max-width: var(--content-width);
}

.skillball-page .sb-pages .shot {
  margin-top: var(--space-s);
}

.skillball-page .sb-pages figcaption {
  display: grid;
  gap: var(--space-3xs);
  text-align: left;
}

.skillball-page .sb-pages figcaption b {
  font-family: var(--cartoon-font);
  font-size: var(--fs-h4);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: var(--orange);
}

.skillball-page .sb-pages figcaption span {
  font-size: var(--fs-body-s);
  line-height: var(--lh-snug);
  color: color-mix(in srgb, var(--text) 80%, transparent);
}

.skillball-page .sb-pages .shot img {
  aspect-ratio: 735 / 1203;
  object-fit: cover;
  object-position: top;
}

/* ───────────── 8. SMALL SCREENS ───────────── */
@media (max-width: 768px) {
  .skillball-page .sb-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  /* the drawing scales down with the page: bigger labels keep them readable */
  .skillball-page .sb-diagram .pm-label text {
    font-size: 25px;
    stroke-width: 12px;
  }

  .skillball-page .sb-diagram .pm-node text {
    font-size: 32px;
  }

  /* galleries and pages: a row that scrolls sideways, the first card lined up
     with the text */
  .skillball-page .sb-stages {
    gap: var(--space-xl);
  }

  .skillball-page .sb-annot__notes {
    grid-template-columns: minmax(0, 1fr);
  }

  .skillball-page .sb-stage--flip .sb-stage__text {
    order: 0;
  }

  .skillball-page .sb-stage__gallery,
  .skillball-page .sb-pages {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 62%;
    margin-inline: calc(var(--page-gutter) * -1);
    padding-inline: var(--page-gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--page-gutter);
    scrollbar-width: none;
  }

  .skillball-page .sb-stage__gallery::-webkit-scrollbar,
  .skillball-page .sb-pages::-webkit-scrollbar {
    display: none;
  }

  .skillball-page .sb-stage__gallery > *,
  .skillball-page .sb-pages > * {
    scroll-snap-align: start;
  }
}
