/* =====================================================================
   GAMIFY · ARCADE (2026-11-25) — the pitch deck's look, brought into the app.
   ---------------------------------------------------------------------
   Jay loved the motion and the type in the Gamify pitch (2026-11-25) and
   asked for it on the real site: crisper, cleaner, and a laptop layout
   that is a real desktop page, not a phone column. This layer adds three
   things and changes no behaviour:
     1. a pixel display face (Press Start 2P, SIL OFL, app/fonts) for the
        wordmark, screen titles and small section labels only. Body text,
        buttons and course text stay in Nunito and the system face.
     2. the pitch's arcade motion: buttons that press down on a lip,
        a pulse on the one big action, cards that deal in one after
        another, a lift under the pointer. Only transform and opacity
        move, and all of it is off under prefers-reduced-motion.
     3. a desktop layout from 1024px: a full height sidebar with the
        wordmark, Home as a two column dashboard (Today's mix beside the
        class cards), and Library and Profile using the width.
   Loaded LAST in index.html, after glass.css. Under 1024px the layout is
   the phone one, untouched. Every colour is a token from skin.css,
   redesign.css or glass.css, or one of the few arcade tokens below.
   ===================================================================== */

@font-face{font-family:"Gamify Pixel";src:url("fonts/press-start-2p-latin.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
:root{
  --font-pixel:"Gamify Pixel",ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  --arc-out:cubic-bezier(.2,.8,.2,1);       /* arrivals in the chrome (no overshoot) */
  --arc-pop:cubic-bezier(.3,1.35,.45,1);    /* the pitch's card landing, game moments only */
}
body{
  /* the lip under a primary button: the accent, darker, so the button reads as a key you press down */
  --arc-edge:color-mix(in oklab,var(--accent2) 62%,#4a1d00);
  /* the lip under a light glass control */
  --arc-edge-soft:rgba(var(--gl-shade,12,30,48),.16);
  /* the drop behind pixel titles */
  --arc-drop:var(--accent2);
}

/* ---- 1. type ------------------------------------------------------------- */
body.shell #screen-home .g-wordmark{font-family:var(--font-pixel);font-weight:400;font-size:16px;letter-spacing:.04em;line-height:1;
  text-shadow:2px 2px 0 var(--arc-drop)}
body.shell #screen-home .g-wordmark .spark{display:none}
body.shell :is(#screen-home,#screen-games,#screen-score,#screen-topics,#screen-class,#screen-uploads) .screen-title{font-family:var(--font-pixel);font-weight:400;font-size:24px;line-height:1.3;letter-spacing:.02em;
  text-transform:uppercase;text-shadow:3px 3px 0 var(--arc-drop);margin:10px 0 8px}
/* Topics sits under Profile on the same page, so its title is one size down (its h2 carries an inline size) */
body.shell #screen-topics .screen-title{font-size:16px !important}
/* small section labels: the pitch's kicker, a pixel caption with a lit square in front */
body.shell :is(#screen-home,#screen-games,#screen-score,#screen-topics,#screen-class,#screen-uploads) :is(.home-classes h2,.pair-sets h3){display:flex;align-items:center;gap:10px;font-family:var(--font-pixel);font-weight:400;
  font-size:12px;line-height:1.4;letter-spacing:.04em;text-transform:uppercase}
body.shell :is(.home-classes h2,.pair-sets h3)::before{content:"";width:8px;height:8px;flex:0 0 8px;background:var(--accent2);
  box-shadow:2px 2px 0 var(--arc-edge)}
body.shell .week-dots .g-dot:not(.done){font-family:var(--font-pixel);font-weight:400;font-size:8px}
body.shell :is(.hero-ring span,.stat-chip .v,.cls-stars){font-variant-numeric:tabular-nums}
/* Profile's level and score numbers read like an arcade scoreboard */
body.shell #screen-score .lvl-num{font-family:var(--font-pixel);font-weight:400 !important;line-height:1.2;letter-spacing:0;text-shadow:3px 3px 0 var(--arc-drop)}
body.shell #screen-score .stat-chip .v{font-family:var(--font-pixel);font-weight:400;font-size:16px;line-height:1.6}

/* ---- 2. buttons that press down ------------------------------------------
   The pitch's arcade key: a solid lip under the button that the button sinks
   into when pressed. It keeps the glass gloss and colour from glass.css. */
body.shell :is(.g-btn:not(.ghost),.btn:not(.ghost):not(.small)){box-shadow:0 4px 0 var(--arc-edge),var(--gl-btn-shadow)}
body.shell .g-play{box-shadow:0 3px 0 var(--arc-edge),var(--gl-btn-shadow)}
body.shell :is(.g-btn.ghost,.btn.ghost){box-shadow:var(--gl-in),0 3px 0 var(--arc-edge-soft),var(--e1)}
body.shell :is(.g-btn,.btn,.g-play){transition:transform var(--press-ms,100ms) var(--arc-out),box-shadow var(--press-ms,100ms) var(--arc-out),filter .2s}
body.shell :is(.g-btn:not(.ghost),.btn:not(.ghost):not(.small)):active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 var(--arc-edge),var(--gl-btn-shadow)}
body.shell .g-play:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 var(--arc-edge),var(--gl-btn-shadow)}
body.shell :is(.g-btn.ghost,.btn.ghost):active:not(:disabled){transform:translateY(2px);box-shadow:var(--gl-in),0 1px 0 var(--arc-edge-soft),var(--e1)}
body.shell .g-btn:disabled{box-shadow:0 4px 0 color-mix(in oklab,var(--arc-edge) 50%,transparent)}

/* the one big action on Home pulses, like the pitch's Start button: a ring that grows and fades, a few times, then rests */
body.shell #heroGo{position:relative}
body.shell #heroGo::after{content:"";position:absolute;inset:-2px;border-radius:inherit;border:2px solid var(--accent2);
  opacity:0;pointer-events:none}

/* ---- 3. cards ------------------------------------------------------------- */
body.shell .g-card.cls-row{position:relative}
body.shell .g-card.cls-row{border-radius:18px}
/* under the pointer a card lifts like a cartridge picked off the shelf */
@media (hover:hover) and (pointer:fine){
  body.shell :is(.g-card.cls-row,.game-tile,.big-tile):hover{transform:translateY(-3px);box-shadow:var(--gl-in),var(--e3)}
  body.shell .g-card.cls-row:hover .g-play{transform:scale(1.06)}
}

/* ---- 4. motion (all of it waits for no-preference) ------------------------ */
@media (prefers-reduced-motion:no-preference){
  /* the class and set cards deal in one after another when the list is drawn */
  body.shell :is(#homeClassList,.pair-sets ul) > li{animation:arcDeal .42s var(--arc-out) backwards}
  body.shell :is(#homeClassList,.pair-sets ul) > li:nth-child(2){animation-delay:.05s}
  body.shell :is(#homeClassList,.pair-sets ul) > li:nth-child(3){animation-delay:.1s}
  body.shell :is(#homeClassList,.pair-sets ul) > li:nth-child(4){animation-delay:.15s}
  body.shell :is(#homeClassList,.pair-sets ul) > li:nth-child(5){animation-delay:.2s}
  body.shell :is(#homeClassList,.pair-sets ul) > li:nth-child(n+6){animation-delay:.25s}
  body.shell #heroGo:not(:disabled)::after{animation:arcPulse 2.4s var(--arc-out) 1.1s 4}
  /* the wordmark blinks on once, like a cabinet powering up */
  body.shell .g-wordmark{animation:arcPower .9s steps(4,end) .15s backwards}
}
@keyframes arcDeal{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
@keyframes arcPulse{0%{opacity:.8;transform:scale(1)}70%,100%{opacity:0;transform:scale(1.035,1.4)}}
@keyframes arcPower{0%{opacity:0}50%{opacity:1}75%{opacity:.3}100%{opacity:1}}

/* ---- 5. the desktop page (1024px and up) -----------------------------------
   The tab rail becomes a full height sidebar with the wordmark at its top and
   the tabs as wide rows. The screens clear it and use the window. */
@media (min-width:1024px){
  body.shell .bottom-nav.g-nav{left:16px;top:16px;bottom:16px;right:auto;transform:none;width:216px;
    flex-direction:column;justify-content:flex-start;gap:6px;padding:88px 12px 16px;border-radius:26px}
  body.shell .bottom-nav.g-nav::after{content:"GAMIFY";position:absolute;left:24px;top:34px;pointer-events:none;
    font-family:var(--font-pixel);font-size:16px;line-height:1;letter-spacing:.04em;color:var(--ink);text-shadow:2px 2px 0 var(--arc-drop)}
  body.shell .g-nav .nav-tile{flex:0 0 auto;flex-direction:row;justify-content:flex-start;gap:14px;min-height:54px;padding:0 16px;
    font-size:15px;letter-spacing:.01em;transform:none}
  body.shell .g-nav .nav-tile.current{transform:none}
  body.shell .g-nav .nav-tile .nico svg{width:24px;height:24px}
  body.shell .g-nav .g-badge{top:50%;left:auto;right:12px;translate:0 -50%}
  body.shell .screen,body.shell #screen-home{padding:28px 40px 40px 272px}
  body.shell .screen-inner{width:min(100%,1080px)}
  /* the upload steps stay a readable column */
  body.shell #screen-uploads .screen-inner{width:min(100%,680px)}

  /* Home: a two column dashboard. Today's mix and Upload on the left, the class cards in a grid on the right. */
  #screen-home .home-wrap{display:grid;grid-template-columns:minmax(320px,380px) minmax(0,1fr);grid-template-rows:auto auto auto 1fr;
    align-items:start;gap:20px 28px;width:min(100%,1160px);padding:6px 0 40px;margin:0 auto}
  #screen-home .home-top{grid-column:1 / -1;grid-row:1}
  #screen-home .home-top .g-wordmark{visibility:hidden}
  #screen-home #homeBanner{grid-column:1 / -1}
  #screen-home #homeHero{grid-column:1;grid-row:2;padding:20px 20px 22px;gap:14px}
  #screen-home #homeUploadBtn{grid-column:1;grid-row:3}
  #screen-home :is(#homeClasses,#roadEmpty){grid-column:2;grid-row:2 / 5;min-width:0}
  #screen-home #homeClassList{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
  #screen-home #homeClassList > li{min-height:96px;align-items:center}
  #screen-home #roadEmpty{padding:40px 32px}
  #homeHero h1{font-size:28px}
  #homeHero .week-dots .g-dot{width:34px;height:34px;flex-basis:34px}

  /* Library: class groups side by side, practice sets in a grid, Upload a right hand button that stays in reach */
  #screen-games #gamesList{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr));gap:18px 20px;align-items:start}
  #screen-games #gamesList > :is(.empty-note,.archived-group,details:not(.set-each)){grid-column:1 / -1}
  #screen-games .set-group{margin:0;padding:16px;border-radius:20px;background:var(--glass);border:1px solid transparent;box-shadow:var(--gl-in),var(--e1)}
  body.shell .pair-sets ul{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
  body.shell .lib-upload{width:auto;min-width:300px;margin-left:auto;padding:0 32px}

  /* Profile: the four numbers in one row, cards at full width */
  #screen-score .stat-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
}
/* a short laptop window: the sidebar tightens so all the tabs fit */
@media (min-width:1024px) and (max-height:640px){
  body.shell .bottom-nav.g-nav{padding-top:70px}
  body.shell .bottom-nav.g-nav::after{top:26px}
  body.shell .g-nav .nav-tile{min-height:48px}
}

/* ---- 6. reduced motion: the information stays, the movement goes ---------- */
@media (prefers-reduced-motion:reduce){
  body.shell :is(.g-btn,.btn,.g-play,.g-card.cls-row){transition:none}
}

/* the sidebar rows do not hop on hover the way the phone tiles do */
@media (min-width:1024px) and (hover:hover) and (pointer:fine){
  body.shell .g-nav .nav-tile:hover{transform:none}
}
