/*
 * The PuckIQ website's theme: every colour, size, space and duration a page may use. Pages style from these
 * names only. Look: "Matchday" (docs/design/nightly/reference.png): black ice, one black-and-white photograph,
 * heavy upright type, one red, green for what is confirmed.
 */
:root {
  color-scheme: dark;

  --ice: #050A0C;
  --light: #F6F1E7;
  --text: #F2EFE9;
  --text-dim: #A3ABAE;
  --text-faint: #7F898D;
  --rule: rgba(246, 241, 231, .16);
  --red: #FF252D;
  --green: #29D6A0;
  /* Over the hero photograph: keeps the side the type sits on dark at any crop, and the top under the bar. */
  --shade-hero: linear-gradient(90deg, rgba(5, 10, 12, .68), rgba(5, 10, 12, .2) 50%, rgba(5, 10, 12, 0) 68%), linear-gradient(180deg, rgba(5, 10, 12, .7), rgba(5, 10, 12, 0) 26%);

  /* Where the photograph is held when a window crops it: the goalie whole, the net's bar and mesh at the foot. */
  --photo-focus: 50% 21%;
  /* A mask over the photograph: none where it fills the hero; a narrow window melts its top into the ice. */
  --fade-photo: none;
  /* A pressed-looking button under the pointer. */
  --dim-hover: .88;

  --font: ui-sans-serif, system-ui, -apple-system, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --size-hero: clamp(3.25rem, 12vw, 9rem);
  --size-numeral: clamp(2.25rem, 9vw, 6rem);
  /* A player page's question and answer: a name makes the headline long, so it sets a step below a numeral. */
  --size-question: clamp(2.25rem, 6vw, 4.5rem);
  --size-name: clamp(1.1875rem, 3vw, 2.5rem);
  --size-cta: var(--size-name);
  --size-wordmark: clamp(1.75rem, 6vw, 4.5rem);
  /* A row's team and status lines, the date and the red button: the title size, larger where a window has room. */
  --size-label: clamp(1.1875rem, 2.4vw, 1.75rem);
  --size-title: 1.1875rem;
  --size-body: 1rem;
  --size-small: .875rem;
  --size-micro: .75rem;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-strong: 650;
  --weight-heavy: 800;
  --weight-wordmark: 900;
  --track-display: -.045em;
  --track-tight: -.03em;
  --track-caps: .09em;
  --lead-display: .92;
  --lead-tight: 1.15;
  --lead-snug: 1.35;
  --lead-body: 1.5;

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  --measure: 65ch;        /* a column of running text */
  /* The hero's sentence and headline keep to the ice, left of the goalie. */
  --measure-hero: 30rem;
  --measure-headline: 58%;
  --measure-wide: 90rem;  /* the page: on a wider window it stands as a frame in the middle */
  --touch: 2.75rem;       /* 44 px, the smallest thing a thumb is asked to hit */
  --touch-loud: 3.5rem;   /* the red button where a window has room */
  --bar-height: clamp(5rem, 7vw, 6rem);
  /* Tall enough for the goalie from helmet to the net's bar, short enough that a laptop shows the first game. */
  --hero-height: clamp(28rem, 47vw, 42rem);
  /* The photograph's own height: all of the hero, or on a narrow window all but the strip its headline starts in. */
  --photo-height: var(--hero-height);
  --col-time: clamp(14.5rem, 28vw, 20rem);
  --col-time-compact: 9.5rem;
  --line: 1px;
  --line-bold: 3px;
  --tick-width: .5rem;
  --tick-height: 1.25em;
  --radius-control: .125rem;

  --quick: 160ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* A team's flat mark: its own colour that shows on black ice (a navy or black first colour gives way to the next). */
  --team-ANA: #F47A38; --team-BOS: #FFB81C; --team-BUF: #FFB81C; --team-CAR: #CE1126;
  --team-CBJ: #CE1126; --team-CGY: #D2001C; --team-CHI: #CF0A2C; --team-COL: #8B2942;
  --team-DAL: #00843D; --team-DET: #CE1126; --team-EDM: #FF4C00; --team-FLA: #C8102E;
  --team-LAK: #A2AAAD; --team-MIN: #1F7A4D; --team-MTL: #AF1E2D; --team-NJD: #CE1126;
  --team-NSH: #FFB81C; --team-NYI: #F47D30; --team-NYR: #CE1126; --team-OTT: #C52032;
  --team-PHI: #F74902; --team-PIT: #FCB514; --team-SEA: #99D9D9; --team-SJS: #008C99;
  --team-STL: #FCB514; --team-TBL: #FFFFFF; --team-TOR: #FFFFFF; --team-UTA: #71AFE5;
  --team-VAN: #00843D; --team-VGK: #B4975A; --team-WPG: #7B9FCB; --team-WSH: #C8102E;
}

/* A narrow window (night.css stacks the teams at the same width): the goalie stands right, the type in a column on his left. */
@media (max-width: 48rem) {
  :root {
    --hero-height: 34rem;
    --photo-height: 28rem;
    --photo-focus: 80% 50%;
    --fade-photo: linear-gradient(180deg, transparent, #000 30%);
    --shade-hero: linear-gradient(90deg, rgba(5, 10, 12, .72), rgba(5, 10, 12, 0) 62%);
    --measure-hero: 11.5rem;
  }
}

/*
 * Home page ("Seven nights", docs/design/website/quiet/quiet-b.png): bars of warm light on the ice. Its own names
 * live on :root; the four it sets differently from the shared look are scoped to the home page's body.
 */
:root {
  --size-lede: 1.125rem;
  --size-hero-lede: clamp(1.125rem, 1.7vw, 1.625rem);
  --glass: rgba(246, 241, 231, .3);
  --glass-fill: rgba(246, 241, 231, .03);      /* an empty night: clear glass */
  --light-edge: #EADFCB;                       /* a lit bar's sides, so it reads as a prism, not a stripe */
  --green-edge: #20C892;
  --glow-light: 0 0 22px rgba(255, 240, 210, .42);
  --glow-green: 0 0 22px rgba(41, 214, 160, .55);
  --glow-light-far: 0 0 90px rgba(255, 240, 210, .16);
  --glow-green-far: 0 0 90px rgba(41, 214, 160, .2);
  --radius-bar: .125rem;
  --slow: 1.1s;                                /* a night lighting up */
  --fill-time: 2.8s;                           /* the pickup filling its empty night */
  --ease-out: cubic-bezier(.16, .84, .24, 1);
}
body.home, body.lineup {
  --edge: clamp(1.5rem, 4vw, 4rem);            /* page margin: the wordmark's and headline's left edge */
  --wordmark-tall: clamp(1.625rem, 2.6vw, 2.375rem);
  --size-hero: clamp(3rem, 6.4vw, 6.5rem);     /* the picture's headline fills ~40% of the page width */
  --measure: 55rem;
  --radius-control: .625rem;
  --rule: rgba(246, 241, 231, .12);
}

/*
 * Lineup check ("The anthem", docs/design/website/lineup-check/lineup-e.png): the team on the blue line seen from
 * behind, each player under his own lamp, his name on his sweater. The photograph is lineup-line.webp, one frame a
 * pose (scripts/lineup/art.py); the numbers that describe a frame change with that file.
 */
:root {
  --frame-count: 7;                            /* frames in the sheet, side by side */
  --frame-tall: calc(1440 / 300);              /* a frame's height, in its widths: half of it is the ice in front */
  --figure-step: .7;                           /* neighbours' lamps, in frame widths: shoulder to shoulder */
  --line-room: .4;                             /* air left at the ends of the one long line: frame widths */
  --figure-max: 15rem;                         /* a frame's width at most, so a huge window keeps the line's shape */
  --blend-from: 0%;                            /* where a frame starts to show over its left neighbour's, */
  --blend-to: 30%;                             /* and where it has taken over: the dark between two players */
  --line-fade: .5;                             /* a row's outer ends melt into the ice over this much of a frame */
  --rank-step: .358;                           /* a rank stands this far below the one behind, in frame heights */
  --rank-head-from: 8.3%;                      /* a rank in front loses its lamps: clear to here, */
  --rank-head-to: 13.1%;                       /* whole from the helmets down */
  --rank-foot-from: 45.7%;                     /* a rank behind keeps its skates and loses its reflection */
  --rank-foot-to: 50.5%;
  --jersey-top: 20.2%;                         /* the name sits across the shoulders, */
  --jersey-wide: 40%;                          /* arm to arm */
  --jersey-name: .094;                         /* the name's size, in frame widths */
  --jersey-slot: .07;
  --jersey-squeeze: .62;                       /* a long name narrows to this, as on a real sweater, before it shrinks */
  --note-size: .064;                           /* a word under his position: day-to-day, the goalie's start */
  --pickup-wide: 16rem;                        /* the room the pickup's callout keeps */
  --band-rise: .444;                           /* the bench and the pickup stand on the reflections: frame heights */
  --bench-wide: clamp(13rem, 24vw, 22rem);
  --fade-bench: linear-gradient(to right, #000 74%, transparent), linear-gradient(transparent, #000 16%, #000 78%, transparent);
  --mask-on: #000;                             /* the part of a mask that shows, */
  --mask-most: rgba(0, 0, 0, .85);             /* and the part that has nearly melted in */
  --squad-most: 4;                             /* players in a row: a squad on a phone, */
  --rank-most: 7;                              /* a rank on a tablet, */
  --line-most: 13;                             /* the whole line on a wide window */
  --goalie-step: .82;                          /* a goalie next to a goalie: their pads need the room */
  --jersey-slot-near: .085;                    /* a phone's frames are small: the position and the word under it */
  --note-size-near: .075;                      /* stay readable */
  --entry-tall: 8.25rem;                       /* the roster box: room for five names */
  --shade-callout: linear-gradient(90deg, rgba(5, 10, 12, .78) 60%, rgba(5, 10, 12, 0));   /* the pickup's words, clear of the reflection behind them */
  --shade-text: 0 0 .75rem rgb(5, 10, 12), 0 0 .25rem rgb(5, 10, 12);   /* words standing on a reflection */
  --mint: #C9F7E7;                             /* lettering under the green lamp */
  --stagger: 70ms;                             /* lamp to lamp, as the line lights up */
  --measure-entry: 26rem;                      /* the roster box */
}

/* Pool page (/pool, site/pool.css). */
:root {
  --col-rank: 3.5rem;      /* wide enough for "20" at the numeral size on a phone */
  --measure-lede: 40rem;   /* the sentence under the photograph */
  --measure-chart: 48rem;  /* the record's bars: long enough to compare, short enough to read across */
  --col-year: 3.5rem;      /* a year or a margin like "−13" at the title size */
  --bar-thickness: .75rem;
  /* The headline at its widest four lines still stands inside the photograph, with a gap under the bar and over the
     boards (Zach, 2026-12-03: on a 1280 window "ranked." ran off the photograph's bottom). */
  --headline-lines: 4;
  /* A tile's numeral when three stand in a row: "12 of 17" (3.64em wide) keeps to one line down to the 48rem break. */
  --size-tile-numeral: min(var(--size-numeral), 7.5vw);
  --size-pool-headline: min(var(--size-hero), calc((var(--hero-height) - var(--bar-height) - 2 * var(--space-6)) / (var(--headline-lines) * var(--lead-display))));
  --measure-step: 22rem;   /* a step's sentence under its numeral */
}

/* Home page bands under the hero (site/home.css): the app's screens, what the words mean, who it is for, price. */
:root {
  --card-ice: #0B1215;                         /* a card on the ice: one step lighter than the page */
  --card-edge: rgba(246, 241, 231, .1);
  --phone-edge: rgba(246, 241, 231, .18);
  --radius-card: 1rem;
  --radius-phone: 2.25rem;
  --phone-wide: clamp(12rem, 22vw, 18rem);     /* one screen in the fan: big enough to read, three fit a laptop */
  --phone-fan-phone: 38vw;                     /* on a phone the fan's three screens still fit side by side */
  --fan-tilt: 7deg;                            /* the side screens lean out like cards in a hand */
  --fan-overlap: 2.5rem;                       /* how far each side screen tucks behind the middle one */
  --fan-lift: 2rem;                            /* the middle screen stands a little higher */
  --fan-side: .82;                             /* the side screens sit just outside the spotlight */
  --spot: radial-gradient(ellipse 50% 60% at 50% 45%, rgba(246, 241, 231, .09), transparent 70%);
  --object-wide: 30rem;                        /* a band's object photo beside its words */
  --object-phone: min(70vw, 20rem);            /* the object above its words on a phone */
  --object-fade: radial-gradient(closest-side, #000 72%, transparent 100%);
  --font-serif: ui-serif, "New York", Georgia, "Times New Roman", serif;   /* band headlines: system serif, no download */
  --track-serif: -.015em;
  --size-feature-sm: 1.375rem;
  --step-numeral: 2.5rem;
  --shadow-phone: 0 24px 60px rgba(0, 0, 0, .45), 0 0 100px rgba(255, 37, 45, .1);
  --size-band: clamp(2rem, 4.4vw, 3.75rem);    /* a band's headline */
  --size-feature: clamp(1.5rem, 2.6vw, 2.25rem);
  --measure-copy: 32rem;
  --key: .75rem;                               /* a legend swatch */
}
