/* Red Standard — redstandard.co
   Brand kit release 1.0.0 · font software 1.202. Fonts are OFL; licences in /fonts. */

@font-face { font-family: 'Red Standard Monument'; src: url('fonts/RedStandardMonument-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Red Standard Tall'; src: url('fonts/RedStandardTall-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Red Standard Tall'; src: url('fonts/RedStandardTall-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/Barlow-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/Barlow-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  /* Brand tokens (brand-system/tokens) */
  --rs-red: #C03328;
  --rs-paper: #F4F0E8;
  --rs-charcoal: #201E1C;
  --rs-vermilion: #E8554A;
  --rs-muted: #645E58;

  /* Roles */
  --ink: var(--rs-charcoal);
  --ink-2: var(--rs-muted);
  --ground: var(--rs-paper);
  --paper-2: #CFC8BD;          /* secondary text on charcoal: 10.5:1 */
  --focus: var(--rs-red);

  /* Condensed fallbacks keep the display voice if webfonts fail */
  --f-monument: 'Red Standard Monument', 'Arial Narrow', 'Helvetica Neue Condensed', Impact, sans-serif;
  --f-tall: 'Red Standard Tall', 'Arial Narrow', 'Helvetica Neue Condensed', Impact, sans-serif;
  --f-body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* Type: big / medium / small */
  --t-small: 0.875rem;
  --t-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --t-lede: clamp(1.375rem, 1.1rem + 1.2vw, 2.125rem);
  --t-clause: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --t-statement: clamp(5.5rem, 1rem + 22vw, 20rem);
  --t-numeral: clamp(5.5rem, 3rem + 9vw, 11rem);

  /* Space: 8px unit */
  --s-1: 0.5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2rem;
  --s-5: 3rem; --s-6: 4.5rem; --s-7: clamp(4.5rem, 3rem + 6vw, 9rem);
  --gutter: clamp(1rem, 0.5rem + 3vw, 3.5rem);
  --max: 82rem;

  --reveal: 500ms;
}
@media (prefers-reduced-motion: reduce) { :root { --reveal: 0ms; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 var(--f-body);
  font-kerning: normal;
}
img, svg { display: block; max-width: 100%; height: auto; }
::selection { background: var(--rs-red); color: var(--rs-paper); }

a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--rs-vermilion); }
.on-red :focus-visible { outline-color: var(--rs-paper); }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  background: var(--ink); color: var(--rs-paper);
  padding: var(--s-1) var(--s-2); font-weight: 600; text-decoration: none;
}
.skip:focus { top: var(--s-2); }

/* ---------- Header ---------- */
.site-head { padding-block: var(--s-3); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.home { display: inline-flex; min-height: 44px; align-items: center; }
.home img { width: 10.5rem; margin-inline-start: -0.33rem; } /* glyphs start 3.1% into the SVG */
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s-1) var(--s-3); flex-wrap: wrap; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 400 var(--t-small)/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- Hero: the signature, set big ---------- */
.hero { padding-block: var(--s-4) var(--s-7); overflow: hidden; }
.hero h1 { margin: 0; }
.hero .signature {
  /* The mark is set as large as the screen allows. The SVG's glyphs start
     4.25% in from its edge (measured from the R path); pull back by that much so RED shares the page edge. */
  --sig-w: min(100%, 40rem);
  width: var(--sig-w);
  margin-inline-start: calc(var(--sig-w) * -0.0425);
  animation: rise var(--reveal) cubic-bezier(.2,.7,.2,1) both;
}
.hero-copy { display: grid; gap: var(--s-3); margin-top: var(--s-5); }
.lede { margin: 0; font-size: var(--t-lede); line-height: 1.2; font-weight: 600; max-width: 22ch; text-wrap: balance; }
.hero-copy p:not(.lede) { margin: 0; max-width: 42ch; color: var(--ink-2); text-wrap: pretty; }
.category { font: 400 var(--t-small)/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
@media (min-width: 52rem) {
  /* Whole signature fits the first screen (800×955 viewBox), copy alongside it */
  .hero .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-6); align-items: end; }
  .hero .signature { --sig-w: min(50vw, calc((100svh - 10rem) * 0.8377)); }
  .hero-copy { margin-top: 0; padding-bottom: 0.4rem; }
}
@keyframes rise { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }

/* ---------- The standard: numbered clauses on charcoal ---------- */
.standard { background: var(--rs-charcoal); color: var(--rs-paper); padding-block: var(--s-7); }
.statement {
  margin: 0;
  font: 900 var(--t-statement)/0.86 var(--f-monument);
  text-transform: uppercase; letter-spacing: -0.01em;
  text-wrap: balance;
}
.standard-intro { margin: var(--s-4) 0 0; max-width: 40ch; font-size: var(--t-lede); line-height: 1.25; color: var(--paper-2); text-wrap: pretty; }

.clauses { list-style: none; margin: var(--s-7) 0 0; padding: 0; counter-reset: clause; }
.clause {
  counter-increment: clause;
  display: grid; grid-template-columns: 1fr; gap: var(--s-1);
  padding-block: var(--s-4);
}
.clause + .clause { border-top: 1px solid #3A3633; }
.clause::before {
  content: counter(clause);
  font: 900 var(--t-numeral)/0.8 var(--f-tall);
  color: var(--rs-vermilion);
  font-variant-numeric: tabular-nums;
}
.clause h3 { margin: var(--s-2) 0 0; font: 600 var(--t-clause)/1.15 var(--f-body); text-wrap: balance; }
.clause p { margin: var(--s-1) 0 0; max-width: 52ch; color: var(--paper-2); text-wrap: pretty; }
@media (min-width: 52rem) {
  .clause { grid-template-columns: 9rem minmax(0, 1fr); column-gap: var(--s-5); align-items: start; padding-block: var(--s-5); }
  .clause::before { grid-row: 1 / span 2; }
  .clause h3 { margin-top: 0.4rem; }
}
@media (min-width: 72rem) {
  .clause { grid-template-columns: 12rem minmax(0, 30rem) minmax(0, 1fr); }
  .clause::before { grid-row: auto; }
  .clause h3 { margin-top: 0.5rem; }
  .clause p { margin-top: 0.85rem; }
}

/* ---------- In the open: ArkCare + the bench ---------- */
.open { padding-block: var(--s-7); }
.section-label { margin: 0 0 var(--s-5); font: 400 var(--t-small)/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.open-grid { display: grid; gap: var(--s-6); }
@media (min-width: 52rem) { .open-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: var(--s-6); } }

/* ArkCare's own mark, per its guide: one colour, cutouts transparent,
   clear space of at least one eye diameter (~8% of the mark's width). */
.product-head { display: flex; align-items: center; gap: clamp(1.25rem, 0.8rem + 1.5vw, 2rem); }
.product-mark { flex: none; width: clamp(5.5rem, 3.8rem + 5vw, 9rem); }
.product h2 { margin: 0; font: 900 clamp(3.25rem, 2rem + 6vw, 7rem)/0.9 var(--f-tall); letter-spacing: -0.005em; }
.product .by { margin: var(--s-1) 0 0; font: 400 var(--t-small)/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.product .what { margin: var(--s-4) 0 0; max-width: 44ch; font-size: var(--t-lede); line-height: 1.3; text-wrap: pretty; }
.product .status { margin: var(--s-3) 0 0; max-width: 46ch; color: var(--ink-2); }
.button {
  display: inline-flex; align-items: center; gap: 0.6em; min-height: 48px;
  margin-top: var(--s-4); padding: 0.75rem 1.25rem;
  background: var(--ink); color: var(--rs-paper);
  font-weight: 600; text-decoration: none; border-radius: 3px;
  transition: background-color 160ms ease-out;
}
.button:hover { background: var(--rs-red); text-decoration: none; }
.button:active { transform: translateY(1px); }
.button .arrow { font-family: var(--f-mono); }

.bench { border-top: 6px solid var(--rs-red); padding-top: var(--s-3); align-self: start; }
.bench h2 { margin: 0; font: 900 clamp(2rem, 1.4rem + 2.4vw, 3.25rem)/0.95 var(--f-tall); text-transform: uppercase; }
.bench p { margin: var(--s-2) 0 0; max-width: 34ch; color: var(--ink-2); text-wrap: pretty; }

/* ---------- Contact on red ---------- */
.contact { background: var(--rs-red); color: var(--rs-paper); padding-block: var(--s-7) var(--s-6); }
.contact h2 { margin: 0; font: 400 var(--t-small)/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.mail {
  display: inline-block; margin-top: var(--s-3);
  font: 900 clamp(2.25rem, 0.6rem + 7.4vw, 8.5rem)/0.95 var(--f-tall);
  text-decoration: none; overflow-wrap: anywhere;
  border-bottom: 0.06em solid currentColor; padding-bottom: 0.04em;
}
.mail:hover { border-bottom-width: 0.1em; }
.contact .note { margin: var(--s-4) 0 0; max-width: 44ch; font-size: var(--t-lede); line-height: 1.3; }

/* ---------- Footer ---------- */
.site-foot { background: var(--rs-charcoal); color: var(--paper-2); padding-block: var(--s-5); font-size: var(--t-small); }
.site-foot .wrap { display: grid; gap: var(--s-3); }
.site-foot img { width: 9rem; margin-inline-start: -0.28rem; }
.site-foot p { margin: 0; }
.site-foot .fine { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
@media (min-width: 52rem) {
  .site-foot .wrap { grid-template-columns: auto 1fr; align-items: end; }
  .site-foot .fine { justify-content: flex-end; }
}

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.lost main { display: grid; align-content: center; padding-block: var(--s-6); }
.lost .code { margin: 0; font: 900 clamp(8rem, 4rem + 22vw, 22rem)/0.8 var(--f-monument); color: var(--rs-red); }
.lost h1 { margin: var(--s-4) 0 0; font: 600 var(--t-lede)/1.2 var(--f-body); max-width: 24ch; }
.lost main p:not(.code) { margin: var(--s-2) 0 0; color: var(--ink-2); }

@media print {
  .site-nav, .skip { display: none; }
  .standard, .contact, .site-foot { background: none; color: #000; }
  .clause p, .standard-intro, .site-foot { color: #000; }
}

/* ---------- Legal pages ---------- */
.legal { padding-block: var(--s-5) var(--s-7); }
.legal .wrap { max-width: 46rem; margin-inline: max(var(--gutter), calc((100% - var(--max)) / 2)); }
.legal h1 { margin: 0; font: 900 clamp(3rem, 1.6rem + 6vw, 6.5rem)/0.9 var(--f-tall); text-transform: uppercase; }
.legal .updated { margin: var(--s-2) 0 var(--s-5); font: 400 var(--t-small)/1.4 var(--f-mono); color: var(--ink-2); }
.legal h2 { margin: var(--s-5) 0 var(--s-2); font: 600 var(--t-clause)/1.2 var(--f-body); }
.legal h3 { margin: var(--s-3) 0 var(--s-1); font: 600 var(--t-body)/1.4 var(--f-body); }
.legal p, .legal li { max-width: 65ch; text-wrap: pretty; }
.legal p { margin: 0 0 var(--s-2); }
.legal ul { margin: 0 0 var(--s-2); padding-left: 1.2em; }
.legal li + li { margin-top: var(--s-1); }
.legal li::marker { color: var(--rs-red); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.site-foot a { color: var(--rs-paper); }
