/* Laserglow site LAYOUT layer. Written 2026-09-09.
   Loads after base.css and before any page's own <style>.

   WHY THIS FILE EXISTS
   --------------------
   design/laserglow-signal-system.html is the visual authority and it settles marks, colour,
   type, controls, charts and slide layouts. It does not settle how a WEB PAGE is composed:
   how wide the work area is, how a section divides, how tall a hero stands, where a text
   block stops. base.css took the homepage's tokens but left its layout rules behind in the
   homepage, so the second page invented its own.

   The cost was measured on 2026-09-09 across site/index.html and site/pulse/index.html:

     - the container was 1320px on one page and 1220px on the other above 1600px, because the
       wide-screen retune lived inside the homepage file
     - eleven different two-column ratios, no two the same
     - nine different text measures, all chosen by eye
     - two different heroes, one locked to the viewport and one free-running
     - two different eyebrows, one of them invented

   This file is the layout contract. WEB-LAYOUT-CONTRACT.md states it in prose and
   check_layout.py fails a page that breaks it. Change the rule here, in the document and in
   the checker together, or not at all.

   NOTHING IN THIS FILE IS A NEW VISUAL VALUE. Every number is either already in the Signal
   System, already in base.css, or derived by arithmetic from the two. Where a number is
   derived the arithmetic is written down. */


/* ===========================================================================
   1 · THE CONTAINER
   One work area, one gutter, one wide-screen retune. `.wrap` itself is defined
   in base.css; this only adds the breakpoint the homepage was keeping to itself.
   =========================================================================== */

/* Full HD and wider. The composition was tuned at 1440, where the display type and the
   vertical rhythm are already at their clamp maximums. At 1920 nothing grows except the
   empty margins, so a section eats the whole screen and the page reads as cluttered:
   zooming out fixes it because it fits a section into view. Widen the measure a little,
   pull the display sizes and the block spacing back down.
   Moved out of site/index.html on 2026-09-09, unchanged, so every page gets it. */
@media (min-width: 1600px) {
  :root {
    --maxw: 1320px;
    --fs-hero: 4.15rem;
    --fs-h2: 2.65rem;
    --fs-body: 1.02rem;
    --pad-y: 92px;
    --sp-block: 58px;
    --sp-eyebrow-title: 22px;
    --sp-text-action: 30px;
  }
}


/* ===========================================================================
   2 · THE COLUMN GRID
   Twelve columns. Every multi-object layout is a span of them, so a two-up in
   section 3 lands on the same edges as a media split in section 6. That
   agreement between sections is what was missing, and it is what made the page
   read as crooked even though each section was internally fine.

   The gap is the Signal System's own .grid2 gap, clamp(20px,2.8vw,34px), pulled
   back to 2.4vw so twelve columns at 1220 do not spend more space on gaps than
   on content.

   THE ARITHMETIC, at --maxw 1220 and gutter 40, measured in the browser 2026-09-09:
     work area          1220 - 80              = 1140px
     eleven gaps        11 x 34                =  374px
     twelve columns     1140 - 374             =  766px
     one column         766 / 12               = 63.75px

   which gives the only four spans a text block may use:
     12 cols  1140px   display type only
      8 cols   749px   ~89 characters, the uncapped lede (decision of 2026-09-03)
      6 cols   553px   ~66 characters, body text
      5 cols   455px   ~54 characters, captions and small print
   =========================================================================== */

:root {
  --col-gap: clamp(20px, 2.4vw, 34px);
  --row-gap: clamp(24px, 3vw, 40px)
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: var(--row-gap);
  /* start, not stretch: two children of different heights line up on their top edge
     instead of each centring inside its own row, which is the other half of crooked. */
  align-items: start
}

/* Centre both children on the row. Declared per split, never assumed. */
.grid.g-mid {
  align-items: center
}

.c-2 { grid-column: span 2 }
.c-3 { grid-column: span 3 }
.c-4 { grid-column: span 4 }
.c-5 { grid-column: span 5 }
.c-6 { grid-column: span 6 }
.c-7 { grid-column: span 7 }
.c-8 { grid-column: span 8 }
.c-9 { grid-column: span 9 }
.c-12 { grid-column: span 12 }

/* THE SIX APPROVED SPLITS. There is no seventh. A layout that does not fit one of these
   is a layout that has not been decided yet, and the checker will say so.

     .s-even    6 + 6    two things of equal weight
     .s-media   7 + 5    media leads, copy answers
     .s-copy    5 + 7    copy leads, media answers
     .s-rail    4 + 8    a rail of labels and the content it steers
     .s-third   4 x 3    three of a kind
     .s-quarter 3 x 4    four of a kind

   They are written as spans so they inherit the twelve-column edges rather than
   approximating them with fr values that the gap then pulls off the grid. */
.s-even > *,
.s-third > *,
.s-quarter > * { min-width: 0 }

.s-even > * { grid-column: span 6 }
.s-media > *:first-child { grid-column: span 7 }
.s-media > *:last-child { grid-column: span 5 }
.s-copy > *:first-child { grid-column: span 5 }
.s-copy > *:last-child { grid-column: span 7 }
.s-rail > *:first-child { grid-column: span 4 }
.s-rail > *:last-child { grid-column: span 8 }
.s-third > * { grid-column: span 4 }
.s-quarter > * { grid-column: span 3 }

/* THE ONE EXCEPTION: a strip whose count comes from the content, not from the grid.
   Eleven Risk Units and seven kits are fixed numbers that no twelve-column split divides.
   A strip is equal-width, scrolls sideways below the collapse point, and states its count
   on the element: `style="--strip-n:11"`. It is the only place a page may set its own
   column count, and it may not be used for section composition. */
.s-strip {
  display: grid;
  grid-template-columns: repeat(var(--strip-n), 1fr);
  column-gap: var(--col-gap)
}

@media (max-width: 960px) {
  .s-strip {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: minmax(180px, 1fr);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    /* the gutter is restored inside the scroller so the first and last item are not
       flush against the viewport edge */
    padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1)
  }
  .s-strip > * { scroll-snap-align: start }
}

/* ONE set of collapse points for all six, so the whole page reflows at the same two
   widths instead of each section choosing its own. 960 and 620 are the Signal System's
   own grid breakpoints (960 and 540); 620 is raised because a web card carries more
   than a documentation swatch. */
@media (max-width: 960px) {
  .s-even > *,
  .s-media > *:first-child, .s-media > *:last-child,
  .s-copy > *:first-child, .s-copy > *:last-child,
  .s-rail > *:first-child, .s-rail > *:last-child { grid-column: span 12 }
  .s-third > * { grid-column: span 6 }
  .s-quarter > * { grid-column: span 6 }
  /* an odd count leaves a lonely last card in a half-width row, so the last child of an
     odd three-up spans the full row instead of sitting orphaned on the left. */
  .s-third > *:last-child:nth-child(odd) { grid-column: span 12 }
}

@media (max-width: 620px) {
  .grid > * { grid-column: span 12 }
}


/* ===========================================================================
   3 · THE MEASURE
   A text block is capped by the columns it spans. It never carries its own
   `ch` value, because a `ch` chosen by eye agrees with nothing else on the page
   and that is exactly what looked arbitrary.

   Use these three when a block sits outside a grid. Inside a grid the column
   span has already done the job and no measure class is needed.
   =========================================================================== */

/* These are the 1220 column widths and they stay fixed above 1600, where the container
   grows to 1320 and eight columns would run to 815px, about 97 characters. The grid may
   widen; the reading measure may not. That is deliberate, not an oversight. */
.m-lede { max-width: 749px }   /* 8 columns */
.m-body { max-width: 553px }   /* 6 columns */
.m-note { max-width: 455px }   /* 5 columns */


/* ===========================================================================
   4 · SECTION RHYTHM AND BANDS
   base.css already gives every <section> `padding-block: var(--pad-y)`. A page
   must not override it. What this adds is the band vocabulary, so no two
   sections in a row sit on the same ground and the closing call to action never
   dissolves into the footer.
   =========================================================================== */

.band-paper { background: var(--s-50) }
.band-plain { background: var(--s-0) }

/* A band that carries its own edge-to-edge composition and supplies its own vertical
   space: a full-bleed media strip, a stat rail, the disclosure band. It is the only
   sanctioned way to leave the --pad-y rhythm, and saying so out loud is the point. */
.band-flush { padding-block: 0 }

/* .band-ink is `.dark` plus its surface, already in base.css. Named here so the four
   bands read as one family in the markup. */
.band-ink { background: var(--ink-0); color: #ffffff }

/* The conversion band. Brand red, once per page, and only for the closing call to
   action. It is the one ground that outranks the footer, which is why it is rationed. */
.band-accent {
  background: var(--accent-fill);
  color: #ffffff
}

.band-accent h1, .band-accent h2, .band-accent h3, .band-accent h4 { color: #ffffff }
/* Measured 2026-09-10: rgba(255,255,255,.88) on --accent-fill is 3.85:1, under the
   4.5 floor for body text. Only a computed-contrast pass catches it, because
   guard_signal reads the selector and .band-accent tells it the ground is dark, which
   is true and not the point. White clears it. */
.band-accent p { color: #ffffff }

/* the eyebrow is a red pill, which would vanish on the red ground, so it inverts */
.band-accent .signal {
  background: #ffffff;
  color: var(--accent-ink)
}

.band-accent .btn-line {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, .7)
}

.band-accent .btn-primary {
  background: #ffffff;
  color: var(--accent-ink)
}

/* Dark theme: --accent-ink turns light (#ff6169) for dark grounds, and these two sit on a
   white pill, where it measured 2.93:1 (blog review, 2026-10-19; every close band on the site).
   --accent-fill is the same red in both themes and clears 4.6:1 on white. */
:root[data-theme="dark"] .band-accent .signal,
:root[data-theme="dark"] .band-accent .btn-primary {
  background: #ffffff;
  color: var(--accent-fill)
}

.band-accent .btn-primary:hover {
  background: #ffffff;
  color: var(--ink-0)
}


/* ===========================================================================
   5 · THE HEROES
   Three, named, and there is no fourth. The complaint that started this file was
   that the second page's hero was 772px where the homepage's was 1194px, because
   the homepage's rule never left the homepage.
   =========================================================================== */

.hero-full,
.hero-mid,
.hero-flat {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* a new stacking context, so the hero's own media can sit at a negative z-index
     without falling behind the page background. */
  isolation: isolate
}

/* The homepage hero, verbatim. The site front door and each top-level platform page.
   Requires media: an approved video, or an approved still. */
.hero-full {
  min-height: calc(100svh - var(--hdr-h) - var(--disc-h, 44px));
  padding-block: clamp(60px, 7vw, 88px) clamp(150px, 16vw, 210px)
}

/* Section landings. Tall enough to carry media and a headline, short enough that the
   first section below it is already promised at the fold. */
.hero-mid {
  min-height: 62svh;
  padding-block: clamp(56px, 6vw, 80px) clamp(56px, 6vw, 80px)
}

/* Deep pages, legal, forms, anything with no approved media of its own. It is a section
   with a headline in it, and it does not pretend otherwise. */
.hero-flat {
  min-height: 0;
  padding-block: var(--pad-y)
}

/* The media layers, shared by all three. Named once so a page never rebuilds them. */
.hero-media {
  position: absolute;
  inset: -9% 0;
  z-index: -3;
  will-change: transform
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(94deg, rgba(12, 13, 15, .95) 0%, rgba(12, 13, 15, .9) 38%, rgba(12, 13, 15, .42) 70%, rgba(12, 13, 15, .5) 100%)
}

.hero-full > .wrap,
.hero-mid > .wrap,
.hero-flat > .wrap { width: 100% }

/* =============================================================================
   THE HERO COPY BLOCK, AND THE TWO THINGS UNDER IT
   Added 2026-09-10. Every value here is measured off the homepage hero, which is
   where they were designed. Before this, the second page rebuilt the same block by
   eye and landed 1.4px smaller on the eyebrow, 4px short on three margins, and with
   the sub capped 118px narrower. Nobody sees any one of those. Everybody sees a
   hero that does not match the front door.

   THE ORDER IS FIXED, and it is the homepage's:

       .signal      the eyebrow
       h1           the headline
       .hero-sub    the sub
       .acts        the buttons
       .hero-cue    the scroll cue
       .hero-foot   the strip across the foot of the band

   A hero carrying a foot strip adds `.hero-stack`, which turns the band into a
   column: the copy takes the space that is left and centres in it, then the cue and
   the strip sit under it in normal flow. No magic offset, and the strip cannot
   collide with the copy at any height.
   ========================================================================== */

/* the copy block is a flex column, so the eyebrow pill has to hug its own text
   instead of stretching to the work area */
.hero-full .signal,
.hero-mid .signal {
  align-self: flex-start
}

.hero-full h1,
.hero-mid h1 {
  margin-top: var(--sp-eyebrow-title)
}

.hero-full .hero-sub,
.hero-mid .hero-sub {
  margin-top: 28px;
  /* no measure: text spans its container (Gui, 2026-09-14, "do not cap the text") */
  font-size: clamp(1.06rem, 1.4vw, 1.3rem);
  line-height: 1.58
}

.dark .hero-sub { color: rgba(255, 255, 255, .86) }
.dark .hero-sub b { color: #ffffff; font-weight: 600 }

.hero-full .acts,
.hero-mid .acts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: var(--sp-text-action)
}

/* A hero with a foot strip stacks instead of centring the whole band. */
.hero-stack {
  flex-direction: column;
  align-items: stretch;
  padding-bottom: 0
}

.hero-stack > .wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center
}

/* THE SCROLL CUE. The homepage's, verbatim. It says the page continues, which is
   the one thing a full-height hero has to say and cannot show. */
.hero-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 22px;
  font-family: var(--display);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .66)
}

.hero-cue .mouse {
  position: relative;
  width: 22px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 12px
}

.hero-cue .mouse::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: var(--red-500);
  animation: hero-wheel 1.6s ease-in-out infinite
}

@keyframes hero-wheel {
  0% { opacity: 0; top: 6px }
  40% { opacity: 1 }
  80% { opacity: 0; top: 18px }
  100% { opacity: 0 }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cue .mouse::after { animation: none; opacity: 1 }
}

/* THE FOOT STRIP. The homepage carries customer logos here; a platform page carries
   the hierarchy it owes the reader. Same band, same treatment. */
.hero-foot {
  border-top: 1px solid rgba(255, 255, 255, .18);
  background: rgba(12, 13, 15, .76);
  backdrop-filter: blur(8px);
  padding-block: 18px
}

.hero-foot > .wrap { width: 100% }

/* THE HEADLINE, IN TWO COLOURS. Each line of a hero headline is its own `.hl` span so
   the break is authored rather than left to the wrap, and the emphasised line is an
   `<em>` that renders in the accent at NORMAL style. The emphasis is a colour, never
   an italic: there is no italic anywhere in the brand.

   Moved out of site/pulse/index.html on 2026-09-10, unchanged, so every page inherits the
   same headline treatment instead of each one restating it. */
.hero-full h1 .hl,
.hero-mid h1 .hl {
  display: block
}

.dark.hero-full h1 em,
.dark.hero-mid h1 em,
.band-ink h1 em {
  font-style: normal;
  color: var(--accent)
}

/* THE FOOT STRIP'S CELLS. Three or four short facts across the foot of the hero,
   divided by a rule rather than boxed. Also moved out of site/pulse/index.html. */
.dark.hero-full .hier {
  margin: 0
}

.dark.hero-full .hier div {
  padding: 0 clamp(16px, 2vw, 30px) 0 0;
  border-right: 1px solid rgba(255, 255, 255, .16)
}

.dark.hero-full .hier div:last-child {
  border-right: 0
}

.dark.hero-full .hier b {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: .68rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 9px
}

.dark.hero-full .hier span {
  color: rgba(255, 255, 255, .86);
  font-size: .95rem;
  line-height: 1.5
}

@media (max-width: 860px) {
  .dark.hero-full .hier div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    padding-right: 0
  }

  .dark.hero-full .hier div:last-child {
    border-bottom: 0
  }
}

/* DISPLAY TYPE IN A SECTION.
   base.css sizes `.block>h2` and nothing else, so a heading outside a `.block` fell all
   the way through to the browser default. Measured 2026-09-09: a hero h1 rendered at
   33.6px, which is 2em of body text. That is where "weird font sizes" came from.
   Both values are the Signal System's own, --fs-hero and --fs-h2. */
main h1 {
  font-size: var(--fs-hero);
  font-weight: 800;
  letter-spacing: -.042em;
  line-height: .98
}

/* a section landing and a deep page are not the front door, so their headline takes the
   section size rather than the hero size */
.hero-mid h1,
.hero-flat h1 {
  font-size: var(--fs-h2);
  letter-spacing: -.035em;
  line-height: 1.03
}

main h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05
}


/* ===========================================================================
   6 · MEDIA
   Every picture and every clip declares its shape before it loads, so the page
   does not jump and so two media blocks in one row are the same height.
   Five ratios, and no sixth.
   =========================================================================== */

.fig {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--s-100);
  aspect-ratio: 16 / 9
}

.fig-43 { aspect-ratio: 4 / 3 }
.fig-32 { aspect-ratio: 3 / 2 }
.fig-11 { aspect-ratio: 1 / 1 }
.fig-219 { aspect-ratio: 21 / 9 }

.fig > img,
.fig > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

/* the caption is small print and takes the 5-column measure */
.fig + figcaption,
.fig-cap {
  margin-top: 12px;
  font-size: .91rem;
  color: var(--c-mid);
  max-width: 455px
}

.dark .fig-cap,
.band-ink .fig-cap { color: rgba(255, 255, 255, .72) }
