/* cowerx.dev homepage, D3-1 "Assay" layout (design-pack ticket 35) in the Cowerx brand kit (cowerx 312; media-studio brand/cowerx/RULES.md). Phone first, 390 px. */
@font-face { font-family: "Cowerx Sans"; src: url("/assets/assay/figtree-var-cowerx.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Cowerx Mono"; src: url("/assets/assay/jetbrains-mono-var-cowerx.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
:root {
  --ink-0: #15141a; --ink-1: #1e1c24; --ink-2: #292631; --line: #4b454f;
  --text: #f3e8d2; --muted: #c1b7c8; --molten: #36c7de; --molten-hi: #7dddea; --on-molten: #15141a; --parchment: #e6d7b6;
  --sans: "Cowerx Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Cowerx Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: 20px; --max: 1280px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink-0); color: var(--text); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--molten); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--text); color: var(--ink-0); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

/* Header */
.masthead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { width: 84px; height: auto; }
/* Phone: the four sections get their own row under the brand, spread edge to edge, never wrapping. */
.masthead nav { display: flex; justify-content: space-between; margin: -6px -7px 6px; width: calc(100% + 14px); }
.masthead nav a { font: 500 15px/1 var(--sans); color: var(--muted); text-decoration: none;
  padding: 16px 7px; white-space: nowrap; }
.masthead nav a:hover { color: var(--text); }

/* Eyebrows: sentence case, a small square in front (the film's cursor block), quiet so the one accent stays the button */
.eyebrow { margin: 0 0 12px; font: 500 15px/1.3 var(--sans); color: var(--muted);
  display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--line); flex: none; }

/* Hero: the film first on the phone, then the copy and the one action */
.hero { display: grid; gap: 22px; padding-top: 4px; padding-bottom: 56px; position: relative; }
.film { margin: 0; margin-inline: calc(-1 * var(--gutter) + 8px); }
.film-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--ink-1);
  box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(0, 0, 0, .35); }
.film-poster, .film-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-frame video[hidden] { display: none; }
.film-controls { display: flex; gap: 8px; margin-top: 8px; }
.film-controls[hidden] { display: none; }
.film-controls button { min-height: 44px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--ink-1); color: var(--muted);
  font: 500 13px/1 var(--sans); cursor: pointer; transition: color 160ms ease-out, border-color 160ms ease-out; }
.film-controls button:hover { color: var(--text); border-color: var(--muted); }
.film-controls button[aria-pressed="true"] { color: var(--text); border-color: var(--text); }
.hero-copy { display: grid; justify-items: start; }
h1 { margin: 0 0 14px; font: 600 44px/1.05 var(--sans); letter-spacing: -.025em; text-wrap: balance; }
h1 em { font-style: normal; color: var(--parchment); white-space: nowrap; }
.standfirst { margin: 0 0 22px; max-width: 34ch; color: var(--muted); font-size: 17px; line-height: 1.5; }
.button { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 22px; border-radius: 6px; background: var(--molten);
  color: var(--on-molten); font: 600 17px/1 var(--sans); text-decoration: none; transition: background-color 160ms ease-out; }
.button::after { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg); }
.button:hover { background: var(--molten-hi); }

/* Sections */
.section { padding-top: 48px; padding-bottom: 48px; border-top: 1px solid var(--line); }
h2 { margin: 0; font: 600 32px/1.12 var(--sans); letter-spacing: -.02em; }
.desk { display: grid; gap: 22px; }
.plate { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.plate img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; filter: brightness(.82) contrast(1.06); }

/* The four lines as one rail: a node per card on a thin rule (the film's rail) */
.grid { display: grid; gap: 12px; position: relative; padding-left: 22px; }
.grid::before { content: ""; position: absolute; left: 5px; top: 22px; bottom: 22px; width: 1px; background: var(--line); }
.card { position: relative; background: var(--ink-1); border: 1px solid var(--line); border-radius: 10px; padding: 18px 18px 16px;
  display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: baseline; }
.card::before { content: ""; position: absolute; left: -22px; top: 24px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink-0);
  border: 1px solid var(--muted); box-shadow: 0 0 0 4px var(--ink-0); }
.card .value { margin: 0; grid-row: span 2; font: 500 44px/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; width: 3ch; }
.card .label { margin: 0; font: 500 13px/1.3 var(--sans); color: var(--muted); }
.card-body { margin: 4px 0 0; font-size: 16px; line-height: 1.4; color: var(--text); }
.card-meta { margin: 12px 0 0; grid-column: 1 / -1; }
.card-meta a { display: inline-flex; align-items: center; min-height: 44px; font: 500 15px/1 var(--sans); color: var(--text);
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.card-meta a:hover { color: var(--molten); }

/* Explore: a command index */
.row-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row-list li { border-bottom: 1px solid var(--line); }
.row-list a { display: flex; align-items: center; gap: 12px; min-height: 52px; text-decoration: none; font: 500 17px/1.3 var(--sans); }
.row-list a::before { content: "›"; font: 500 17px/1 var(--mono); color: var(--muted); }
.row-list a:hover { color: var(--molten); }

/* Footer */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line);
  color: var(--muted); font: 400 15px/1.4 var(--sans); }
.foot-mark { width: 24px; height: 24px; }
.foot nav { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.foot nav a { color: var(--muted); display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; }
.foot nav a:hover { color: var(--text); }

@media (min-width: 760px) {
  :root { --gutter: 40px; }
  .masthead { min-height: 84px; }
  .brand img { width: 100px; }
  .masthead { flex-wrap: nowrap; }
  .masthead nav { gap: 8px; width: auto; margin: 0 -10px 0 0; justify-content: flex-end; }
  .masthead nav a { font-size: 15px; padding: 16px 10px; }
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 56px; padding-top: 32px; padding-bottom: 96px; }
  .hero-copy { grid-column: 1; grid-row: 1; }
  .film { grid-column: 2; grid-row: 1; margin-inline: 0; }
  h1 { font-size: clamp(52px, 5.4vw, 76px); margin-bottom: 22px; }
  .standfirst { font-size: 19px; margin-bottom: 30px; }
  .section { padding-top: 80px; padding-bottom: 80px; }
  h2 { font-size: 44px; }
  .desk { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px 56px; align-items: start; }
  .grid { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-left: 0; padding-top: 30px; }
  .grid::before { left: 24px; right: 24px; top: 5px; bottom: auto; width: auto; height: 1px; background: var(--line); }
  .card { display: flex; flex-direction: column; padding: 22px 22px 18px; }
  .card::before { left: 18px; top: -31px; }
  .card .value { grid-row: auto; font-size: 56px; margin-bottom: 14px; width: auto; }
  .card-meta { margin-top: auto; padding-top: 14px; }
  .row-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; border-top: 0; }
  .row-list li:nth-child(-n+2) { border-top: 1px solid var(--line); }
  .explore .eyebrow { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .film-controls button { transition: none; }
}
.foot-sites a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration-color: var(--line); text-underline-offset: 3px; }
.foot-sites a:hover { color: var(--molten); }
