/* monster-stream.se — design language "Kolossen"
 *
 * references/design.md is the source of truth. This file implements it.
 *
 * Two rules in here are load-bearing rather than stylistic, and `npm run audit-a11y`
 * fails the build on either:
 *
 *   1. --varning on --ben is 1,17:1. On a bone surface the accent may be a FILL but
 *      never a `color`. --varning-d exists for that and nothing else.
 *   2. Any rule colouring a descendant `a` must wrap its context in :where() or
 *      exclude buttons with :not(.btn). `.plan a` is (0,1,1) and outranks `.btn` at
 *      (0,1,0), which repaints every button label inside a bone section.
 */

/* ── Tokens ─────────────────────────────────────────────────────────────── */

:root {
  --betong: #33383F;        /* canvas — graphite concrete, mid-value on purpose */
  --betong-2: #3C424A;      /* lifted surface */
  --betong-3: #2A2E34;      /* recessed surface */
  --betong-line: #545C66;   /* hairline */

  --ben: #ECEAE6;           /* bone — reading surfaces */
  --ben-2: #F7F6F3;         /* bone, lighter — table zebra */
  --black: #14161A;         /* ink on bone */
  --grafit-text: #C9CDD3;   /* muted text on graphite */

  --varning: #FFD400;       /* the one accent. NEVER `color` on bone */
  --varning-d: #6B5200;     /* the accent as a letterform on bone */

  --display: Haettenschweiler, 'Franklin Gothic Heavy', Impact,
             'Avenir Next Condensed', 'Arial Narrow', sans-serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'Cascadia Mono', Consolas,
          'Liberation Mono', monospace;

  --wrap: 1120px;
  --pad: 20px;

  /* The hazard stripe. One definition, used by the mark, the rule and the band. */
  --hazard: repeating-linear-gradient(-45deg,
    var(--varning) 0 10px, var(--betong-3) 10px 20px);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--betong);
  color: var(--ben);
  font: 400 17px/1.65 var(--sans);
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

/* Radius 0 everywhere, including buttons. Siblings use 0, 2, 4, 10 and 12;
 * fully squared is the only unambiguous position left and it suits the palette. */
button, input, select, textarea { font: inherit; border-radius: 0; }

/* ── Typography ─────────────────────────────────────────────────────────── */

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; text-wrap: balance; }

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 6.5vw, 64px);
  text-transform: uppercase;
  letter-spacing: -.005em;
}

h2 { font-weight: 800; font-size: clamp(22px, 3.4vw, 30px); letter-spacing: -.01em; }
h3 { font-weight: 700; font-size: 18px; }

p, ul, ol { margin: 0 0 1.1em; }

a { color: var(--varning); text-underline-offset: .18em; }
a:hover { color: #FFE45C; }

strong { font-weight: 700; }

.kicker {
  display: block;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--varning);
  margin-bottom: 6px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }

/* ── Skip link and focus ────────────────────────────────────────────────── */

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--varning); color: var(--black);
  padding: 12px 18px; font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--varning); outline-offset: 2px; }

/* On bone the yellow ring is 1,17:1 against the surface and effectively invisible.
 * Ink is 15,12:1 there and is the only focus colour that works. */
:where(.on-ben, .warn, .faq, .tbl, .plan, .answer) :focus-visible {
  outline-color: var(--black);
}

main:focus { outline: none; }

/* ── The hazard devices ─────────────────────────────────────────────────── */
/* Never rounded, never animated, always -45deg. A rounded hazard stripe is not a
 * hazard stripe. */

.hazard { background: var(--hazard); border: 0; }
.hazard.band { height: 14px; width: 100%; }
.hazard.rule { height: 6px; width: 72px; margin-bottom: 10px; }

/* ── Topbar ─────────────────────────────────────────────────────────────── */

.topbar {
  background: var(--betong-3);
  border-bottom: 1px solid var(--betong-line);
  font-size: 13px;
  color: var(--grafit-text);
}
.topbar .wrap {
  display: flex; flex-wrap: wrap; gap: 6px 26px;
  padding-block: 8px;
}
.topbar b { color: var(--varning); font-weight: 700; }

/* ── Header and nav ─────────────────────────────────────────────────────── */

.site-header { border-bottom: 1px solid var(--betong-line); background: var(--betong); }
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  padding-block: 14px;
}

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--display); font-size: 25px; text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--ben); text-decoration: none; margin-right: auto;
}
.brand .mark { width: 36px; height: 36px; flex: none; }
.brand em { font-style: normal; color: var(--varning); }

.nav-desk ul {
  display: flex; gap: 22px; list-style: none; margin: 0; padding: 0;
  font-size: 15px; font-weight: 600;
}
/* :where() keeps chrome link rules at zero context specificity so a .btn dropped
 * into the nav, the TOC, the breadcrumb or the footer keeps its own colour. */
:where(.nav-desk) a { color: var(--ben); text-decoration: none; }
:where(.nav-desk) a:hover { color: var(--varning); }

.nav-mob { display: none; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
/* Ink on hazard yellow is 12,93:1 — the strongest pair in the system, which is
 * why the order button is the only thing that gets it. */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  background: var(--varning); color: var(--black);
  font-weight: 800; font-size: 16px; text-decoration: none;
  border: 2px solid var(--varning);
}
.btn:hover { background: #FFE45C; border-color: #FFE45C; color: var(--black); }

.btn.ghost {
  background: transparent; color: var(--ben); border-color: var(--betong-line);
}
.btn.ghost:hover { background: transparent; border-color: var(--varning); color: var(--varning); }

/* A ghost button on a bone surface needs ink, not bone. */
:where(.on-ben, .plan) .btn.ghost { color: var(--black); border-color: #B9B5AC; }
:where(.on-ben, .plan) .btn.ghost:hover { color: var(--varning-d); border-color: var(--varning-d); }

.hdr-cta { padding: 10px 18px; font-size: 15px; }

.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1.2em; }

/* ── Sections ───────────────────────────────────────────────────────────── */

.s { padding-block: 64px; }
.s.on-ben { background: var(--ben); color: var(--black); padding-block: 56px; }

.section-head { margin-bottom: 28px; max-width: 62ch; }
.section-head p { color: var(--grafit-text); margin-bottom: 0; }
.on-ben .section-head p { color: #4A4F57; }
.on-ben .kicker { color: var(--varning-d); }

/* ── The hero ───────────────────────────────────────────────────────────── */

.hero { padding-block: 60px 56px; }
.hero .lead {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--grafit-text);
  max-width: 60ch;
}
.hero .lead strong { color: var(--ben); }

/* The hero figure — the site's opening statement, and the largest thing on it. */
.hero-fig {
  font-family: var(--display);
  font-size: clamp(72px, 17vw, 168px);
  line-height: .88;
  letter-spacing: -.015em;
  color: var(--ben);
  margin: 0;
}
.hero-fig-rule { height: 10px; width: min(420px, 82%); margin: 14px 0 10px; }
.hero-unit {
  display: block;
  font-family: var(--display); font-size: clamp(20px, 3.4vw, 30px);
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--varning);
  margin-bottom: 22px;
}

/* ── Figure blocks — signature device 2 ─────────────────────────────────── */

.figures {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  background: var(--betong-line);
  border: 1px solid var(--betong-line);
}

.figblock {
  display: block;
  background: var(--betong-2);
  padding: 26px 22px 24px;
  color: var(--ben);
  text-decoration: none;
}
a.figblock:hover { background: #454C55; }

.figblock .fig {
  display: block;
  font-family: var(--display);
  font-size: clamp(44px, 6vw, 68px);
  line-height: .95;
  letter-spacing: -.01em;
  color: var(--ben);
}
/* The rule under a numeral is never omitted and never another colour. It is what
 * welds the number to the sentence under it. */
.figblock .hazard.rule { width: 56px; height: 6px; margin: 10px 0 12px; }

.figblock .unit {
  display: block;
  font-family: var(--display); font-size: 15px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--varning);
  margin-bottom: 10px;
}
.figblock p { margin: 0; font-size: 15px; color: var(--grafit-text); }

/* ── Cards ──────────────────────────────────────────────────────────────── */

.cards {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--betong-2);
  border: 1px solid var(--betong-line);
  padding: 22px;
}
.card h3 { margin-bottom: .4em; }
.card p { margin-bottom: .6em; font-size: 15.5px; color: var(--grafit-text); }
.card p:last-child { margin-bottom: 0; }

.on-ben .card { background: var(--ben-2); border-color: #D5D1C8; }
.on-ben .card p { color: #4A4F57; }

/* ── Article layout ─────────────────────────────────────────────────────── */

.crumb { padding-block: 16px 0; font-size: 14px; color: var(--grafit-text); }
.crumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.crumb li + li::before { content: '/'; margin-right: 8px; color: var(--betong-line); }
:where(.crumb) a { color: var(--grafit-text); text-decoration: none; }
:where(.crumb) a:hover { color: var(--varning); }

.article { padding-block: 26px 64px; }
.article .cols { display: grid; gap: 36px; }

.toc {
  background: var(--betong-2);
  border: 1px solid var(--betong-line);
  padding: 18px 20px;
  font-size: 15px;
}
.toc h2 {
  font-family: var(--display); font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--varning); font-weight: 400;
  margin-bottom: .7em;
}
.toc ol { margin: 0; padding-left: 1.1em; }
.toc li { margin-bottom: .45em; }
:where(.toc) a { color: var(--ben); text-decoration: none; }
:where(.toc) a:hover { color: var(--varning); }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.7em; }
.prose h3 { margin-top: 1.4em; }
.prose .meta { font-size: 14px; color: var(--grafit-text); margin-bottom: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* Links in running text are underlined. Colour alone must not mark a link. Chrome
 * — nav, footer, cards, TOC, breadcrumbs — is excluded; those are link lists. */
:where(.prose) a { text-decoration: underline; }

/* ── The answer block ───────────────────────────────────────────────────── */
/* The direct answer within the first 60 words. A reader who leaves after two
 * sentences should still have got what they came for. */

.answer {
  background: var(--ben);
  color: var(--black);
  border-left: 8px solid var(--varning);
  padding: 20px 22px;
  margin-bottom: 1.6em;
  font-size: 17.5px;
}
.answer p:last-child { margin-bottom: 0; }

/* ── The honest negative ────────────────────────────────────────────────── */
/* --varning is the marker here and nowhere else. Using it for general emphasis
 * would destroy the only signal the site has for a warning. */

.warn {
  background: var(--ben);
  color: var(--black);
  border: 1px solid #D5D1C8;
  border-left: 8px solid var(--varning);
  padding: 18px 20px;
  margin: 1.6em 0;
}
.warn p { margin: 0; }
.warn strong { display: block; margin-bottom: .25em; color: var(--varning-d); }

/* ── Tables ─────────────────────────────────────────────────────────────── */

.tbl {
  overflow-x: auto;
  background: var(--ben);
  color: var(--black);
  border: 1px solid #D5D1C8;
  margin: 1.6em 0;
}
.tbl table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.tbl th, .tbl td {
  padding: 11px 14px; text-align: left;
  border-bottom: 1px solid #DEDAD1;
}
.tbl thead th {
  background: var(--black); color: var(--ben);
  font-family: var(--display); font-weight: 400;
  text-transform: uppercase; letter-spacing: .08em; font-size: 14px;
  white-space: nowrap;
}
.tbl tbody th { font-weight: 700; }
.tbl tbody tr:nth-child(even) { background: var(--ben-2); }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
/* The data face. A proportional font makes a column of figures unreadable. */
.tbl td { font-family: var(--mono); font-size: 14.5px; font-variant-numeric: tabular-nums; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */

.faq { max-width: 78ch; }
.faq details {
  background: var(--ben-2);
  border: 1px solid #D5D1C8;
  margin-bottom: 10px;
}
.faq summary {
  padding: 15px 18px;
  font-weight: 700; cursor: pointer;
  min-height: 44px;
  display: flex; align-items: center;
}
.faq summary::marker { color: var(--varning-d); }
.faq .a { padding: 0 18px 16px; }
.faq .a p:last-child { margin-bottom: 0; }

/* ── Pricing ────────────────────────────────────────────────────────────── */

.plans {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.plan {
  background: var(--ben);
  color: var(--black);
  border: 1px solid #D5D1C8;
  padding: 22px 20px;
  display: flex; flex-direction: column;
}
.plan.best { border: 2px solid var(--black); }
.plan .tag {
  display: block;
  font-family: var(--display); font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--varning-d);
  margin-bottom: 8px;
}
.plan .amount {
  font-family: var(--display); font-size: 46px; line-height: 1;
  color: var(--black); display: block;
}
.plan .per { font-size: 14px; color: #4A4F57; margin: 6px 0 14px; display: block; }
.plan ul { list-style: none; padding: 0; margin: 0 0 18px; font-size: 15px; }
.plan li { padding: 5px 0 5px 18px; position: relative; }
.plan li::before {
  content: ''; position: absolute; left: 0; top: 12px;
  width: 9px; height: 3px; background: var(--varning-d);
}
.plan .btn { margin-top: auto; }

/* ── Bone-surface link colour ───────────────────────────────────────────── */
/* --varning on --ben is 1,17:1. Every bone context has to override the global
 * a{} colour or a link inside it renders effectively invisible.
 *
 * The :where() is load-bearing, not tidiness. Without it `.plan a` is (0,1,1) and
 * outranks `.btn` at (0,1,0), which repaints every button label inside a bone
 * section. audit-a11y fails the build on a bare `.something a { color: … }`. */

:where(.on-ben, .warn, .faq, .tbl, .plan, .answer) a { color: var(--varning-d); }
:where(.on-ben, .warn, .faq, .tbl, .plan, .answer) a:hover { color: #4A3800; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer { background: var(--betong-3); font-size: 15px; }
footer .cols {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding-block: 40px 32px;
}
footer h2 {
  font-family: var(--display); font-size: 14px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--varning); font-weight: 400;
  margin-bottom: .9em;
}
footer .about p { color: var(--grafit-text); margin: 0; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: .5em; }
:where(footer) a { color: var(--ben); text-decoration: none; }
:where(footer) a:hover { color: var(--varning); }

footer .legal {
  border-top: 1px solid var(--betong-line);
  padding-block: 20px 30px;
  font-size: 13px; color: var(--grafit-text);
}
footer .legal p { margin: 0 0 .5em; }
footer .legal p:last-child { margin-bottom: 0; }

/* ── 404 ────────────────────────────────────────────────────────────────── */

.nf { padding-block: 80px; text-align: center; }
.nf .hero-fig { text-align: center; }
.nf .hero-fig-rule { margin-inline: auto; }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 999px) {
  .nav-desk, .hdr-cta { display: none; }

  /* The mobile menu is a <details>. No JavaScript ships for UI on this site. */
  .nav-mob { display: block; position: relative; }
  .nav-mob summary {
    list-style: none;
    min-height: 44px; display: flex; align-items: center;
    padding: 0 16px;
    border: 2px solid var(--varning);
    color: var(--varning);
    font-family: var(--display); font-size: 17px; text-transform: uppercase;
    letter-spacing: .1em; cursor: pointer;
  }
  .nav-mob summary::-webkit-details-marker { display: none; }
  .nav-mob ul {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 50;
    min-width: 240px;
    list-style: none; margin: 0; padding: 8px;
    background: var(--betong-2);
    border: 1px solid var(--betong-line);
  }
  .nav-mob li { margin: 0; }
  .nav-mob a:not(.btn) {
    display: flex; align-items: center; min-height: 44px;
    padding: 0 12px; color: var(--ben); text-decoration: none; font-weight: 600;
  }
  .nav-mob a:not(.btn):hover { color: var(--varning); }
  .nav-mob .btn { width: 100%; margin-top: 8px; }
}

@media (min-width: 1000px) {
  .article .cols { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
  .toc { position: sticky; top: 24px; align-self: start; }
}

@media (max-width: 560px) {
  .topbar .wrap { gap: 4px 18px; }
  .topbar span:nth-child(3) { display: none; }
}

/* ── Motion ─────────────────────────────────────────────────────────────── */
/* There is almost nothing to reduce, which is the point. The query exists so a
 * future addition cannot skip it. */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Print ──────────────────────────────────────────────────────────────── */

@media print {
  .topbar, .site-header, footer, .toc, .btn { display: none; }
  body { background: #fff; color: #000; }
  .answer, .warn, .tbl { border-color: #000; }
}
