/* The hero (rebuild 01). The page's stylesheet (css/home.css, from the kit) lays out the wall hero: the stage, the
   wall, the shade, the column, the lower third, the scoreboard. This file keeps what the build adds to it:
     the board   the hero board is the build's (css/board.css), sized here with the page, letters on the 8 px grid.
                 On phones the lever goes and a tap on the board pulls (css/board.css), and under 600 px the board
                 spans the column.
     the words   they arrive when the board lands (board.js adds .visible), as today. */

/* the hero board scales with the page, letters stay on the 8 px grid */
.hero .board-assembly{
  --flap-w:clamp(38px,3.95vw,58px);
  --flap-h:calc(var(--flap-w) * 1.38);
}
@media (max-width:1199px){
  .hero .board-assembly{--flap-fs:24px;--lever-w:24px;--handle-h:30px}
}
/* the stacked hero (under 1000 px): the column sits in the top 44 percent of the wall, above the portrait, so the
   board keeps the prototype's 38 px flaps there (larger ones pushed the tagline onto the portrait on square windows) */
@media (max-width:999px){
  .hero .board-assembly{--flap-w:38px}
}
/* phones: the board spans the width of the column (no lever there, a tap on the board pulls, css/board.css) */
@media (max-width:480px){
  .hero .board-assembly{display:flex;width:100%}
  .hero .board-frame{flex:1}
  .hero .board-row{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
  .hero .flap{width:auto}
}
@media (max-width:359px){
  .hero .board-assembly{--flap-w:32px;--flap-fs:16px}
}
/* short phones (the rest of their tighter column is in css/home.css): smaller flaps, the face on the 8 px grid */
@media (max-width:999px) and (max-height:760px){
  .hero .board-assembly{--flap-w:32px;--flap-fs:16px}
  .hero .board-note{margin-top:8px}
}

/* Both boards: their letters, their line and their focus ring take the red for small text, which a visitor's dark
   colour lifts so it stays readable (js/show.js). css/board.css draws them in --red, the same colour until then. */
.flap,.board-note{color:var(--red-text)}
.lever-track:focus-visible{outline-color:var(--red-text)}

/* The words arrive after the board lands (live page behaviour), in three hard steps of opacity (step-in, base.css).
   board.js adds .visible when the board lands. If it never lands (a script failed), an inline script in index.html
   adds .visible at 8 s. Adding it twice changes nothing, so neither ever restarts it.
   .shown: reduced motion is on or has been on (site.js), or focus came in. The words show and never step again. */
.reveal{opacity:0}
.reveal.visible{opacity:1;animation:step-in .24s steps(3,end) both}
.hero-col > .reveal.visible:nth-child(3){animation-delay:.2s}
.hero-col > .reveal.visible:nth-child(4){animation-delay:.35s}
.no-js .reveal,.reveal.shown{opacity:1;animation:none}

@media (prefers-reduced-motion:reduce){
  /* site.js marks them .shown as well, so switching reduced motion back off never steps them again */
  .reveal,.reveal.visible{opacity:1;animation:none}
}
