/* Open Fitness Framework – site styles, built from the OFF design system tokens */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-400-600.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --ground: #f2f5f4;
  --surface: #ffffff;
  --surface-sunken: #e6eeea;
  --ink: #13303f;
  --ink-muted: #4a6169;
  --line: #c5d3ce;
  --contour: #b8ccc4;
  --brand: #1d5f94;
  --brand-strong: #164b76;
  --brand-tint: #dce8f2;
  --on-fill: #ffffff;
  --signal: #b14e1c;
  --signal-tint: #f6e3d8;
  --unknown: #5e7176;
  --tag: #d9a93a;
  --on-tag: #13303f;
  --figure-bg: #ffffff;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --radius-s: 4px; --radius-m: 12px; --radius-l: 20px; --radius-pill: 999px;
  --stroke-hair: 1px; --stroke-ui: 1.5px; --stroke-strong: 2px;
  --tilt-tag: -4deg; --tilt-stamp: 6deg; --tilt-stamp-alt: -3deg;
  --content-max: 1200px; --reading-max: 640px;
  --gutter: var(--space-16);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #0f1e26;
    --surface: #172a33;
    --surface-sunken: #1c3440;
    --ink: #e8efec;
    --ink-muted: #a9bcc0;
    --line: #2e4652;
    --contour: #2a4450;
    --brand: #6fa8d6;
    --brand-strong: #8fbde2;
    --brand-tint: #1e3a52;
    --on-fill: #0f1e26;
    --signal: #e08a5a;
    --signal-tint: #3f2a20;
    --unknown: #93a6ab;
    --tag: #d4a53c;
    --figure-bg: #e6eeea;
  }
}

@media (max-width: 720px) {
  :root { --gutter: var(--space-6); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-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 16px/26px var(--font-text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 4px; text-decoration-thickness: var(--stroke-ui); }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: var(--stroke-strong) solid var(--brand); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; color: var(--ink); }
p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--space-4); top: -60px; z-index: 10; background: var(--surface); color: var(--ink); padding: var(--space-2) var(--space-4); border-radius: var(--radius-m); border: var(--stroke-ui) solid var(--line); }
.skip-link:focus { top: var(--space-4); }

.wrap { max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-24) 0 0; }
.section__head { display: flex; flex-direction: column; gap: var(--space-4); max-width: var(--reading-max); margin-bottom: var(--space-12); }
.section__title { font-size: 40px; line-height: 44px; letter-spacing: -0.015em; }
.lead { font-size: 19px; line-height: 30px; color: var(--ink-muted); }
.small { font-size: 13px; line-height: 19px; color: var(--ink-muted); }
@media (max-width: 720px) {
  .section { padding-top: var(--space-16); }
  .section__title { font-size: 32px; line-height: 36px; }
}

/* Header */
.site-header { padding: var(--space-6) 0; }
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.site-header__logo { display: block; width: 150px; }
.site-header__logo img { width: 150px; height: auto; }
.nav { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; font-size: 15px; line-height: 20px; font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; padding: var(--space-3) 0; }
.nav a:hover { color: var(--brand); text-decoration: underline; }
.chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--ink); font-size: 13px; line-height: 19px; font-weight: 500; }
.chip--brand { background: var(--brand-tint); }
.case__body .chip, .try__soon .chip { align-self: flex-start; }
@media (max-width: 720px) { .nav { column-gap: var(--space-4); row-gap: 0; } .role { padding: var(--space-6); } }
@media (max-width: 560px) { .nav__optional { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-6); border-radius: var(--radius-m); border: var(--stroke-ui) solid transparent; font: 600 16px/1.2 var(--font-text); text-decoration: none; text-align: center; }
.btn--primary { background: var(--brand); color: var(--on-fill); }
.btn--primary:hover { background: var(--brand-strong); color: var(--on-fill); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--ink-muted); }
.btn--secondary:hover { color: var(--ink); border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Hero */
.hero { padding: var(--space-12) 0 0; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-12); align-items: center; }
.hero__text { display: flex; flex-direction: column; gap: var(--space-6); }
.hero__title { font-size: 64px; line-height: 64px; letter-spacing: -0.02em; max-width: var(--reading-max); }
.hero__lead { max-width: 560px; }
.hero__note { font-size: 13px; line-height: 19px; color: var(--ink-muted); }
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__title { font-size: 48px; line-height: 50px; }
}
@media (max-width: 480px) { .hero__title { font-size: 38px; line-height: 41px; } }

/* Evidence network (hero illustration) */
.net { margin: 0; }
.net svg { width: 100%; height: auto; max-width: 480px; display: block; }
.net figcaption { margin-top: var(--space-3); font-size: 13px; line-height: 19px; color: var(--ink-muted); max-width: 460px; }
.net__contour { fill: none; stroke: var(--contour); stroke-width: 1; }
.net__line { fill: none; stroke: var(--brand); stroke-width: 1.5; }
.net__line--off { stroke: var(--ink-muted); stroke-dasharray: 5 6; }
.net__pill { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.net__pill--off { fill: var(--ground); stroke: var(--ink-muted); stroke-dasharray: 5 4; }
.net__signed { fill: var(--tag); }
.net__signed--off { fill: var(--line); }
.net__label { fill: var(--ink); font: 500 15px var(--font-text); }
.net__label--off { fill: var(--ink-muted); }
.net__ring { fill: var(--brand-tint); stroke: var(--brand); stroke-width: 2; stroke-dasharray: 7 6; }
.net__ring-title { fill: var(--ink); font: 700 20px var(--font-display); }
.net__ring-note { fill: var(--ink); font: 500 13px var(--font-text); }
.net__stamp { fill: var(--ground); stroke: var(--brand); stroke-width: 3; }
.net__stamp-label { fill: var(--brand); font: 800 30px var(--font-display); }
.net__stamp-purpose { fill: var(--brand); font: 600 12px var(--font-text); }
.net__traveller { fill: var(--tag); }

/* Use cases */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); }
@media (max-width: 1040px) { .cases { grid-template-columns: minmax(0, 1fr); max-width: 560px; } }
.case { display: flex; flex-direction: column; background: var(--surface); border: var(--stroke-ui) solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.case__figure { margin: var(--space-4) var(--space-4) 0; border-radius: var(--radius-m); background: var(--figure-bg); padding: var(--space-3); }
.case__figure img { width: 100%; height: 150px; object-fit: contain; }
.case__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); flex: 1; }
.case__title { font-size: 26px; line-height: 30px; letter-spacing: -0.01em; }
.case__text { color: var(--ink-muted); }
.case__stub { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-4) var(--space-6); border-top: var(--stroke-strong) dashed var(--line); }
.case__stub::before, .case__stub::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--ground); border: var(--stroke-ui) solid var(--line); }
.case__stub::before { left: -11px; }
.case__stub::after { right: -11px; }
.case__for { font-size: 13px; line-height: 19px; color: var(--ink-muted); }
.case__link { font-weight: 600; }
.cases__note { margin-top: var(--space-6); }

/* Outcomes */
.decision { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: var(--radius-s); font: 600 13px/1.2 var(--font-text); letter-spacing: 0.02em; color: var(--on-fill); }
.decision--fit { background: var(--brand); }
.decision--not-fit { background: var(--signal); }
.decision--not-assessable { background: var(--unknown); }
.outcome { display: inline-flex; align-items: center; gap: var(--space-2); font: 600 13px/1.2 var(--font-text); letter-spacing: 0.02em; color: var(--ink); }
.outcome__mark { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.outcome--pass .outcome__mark { background: var(--brand); }
.outcome--fail .outcome__mark { background: var(--signal); }
.outcome--unknown .outcome__mark { border: var(--stroke-strong) solid var(--unknown); }
.outcome--conflict .outcome__mark { background: linear-gradient(90deg, var(--signal) 50%, var(--brand) 50%); }
.signed { width: 12px; height: 15px; background: var(--tag); clip-path: polygon(50% 0, 100% 28%, 100% 100%, 0 100%, 0 28%); flex: none; }
.trajectory { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); }
.trajectory__link { width: 18px; height: var(--stroke-strong); background: var(--ink-muted); }
.trajectory__event { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.3; font-weight: 500; }

/* Iteration band */
.band { margin-top: var(--space-16); background: var(--surface-sunken); border-radius: var(--radius-l); padding: var(--space-12) var(--space-8); position: relative; overflow: hidden; }
.band__contours { position: absolute; right: -40px; top: -30px; width: 520px; height: auto; pointer-events: none; }
.band__contours ellipse { fill: none; stroke: var(--contour); stroke-width: 1; }
.band__inner { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-8); align-items: center; }
.band__title { font-size: 28px; line-height: 32px; letter-spacing: -0.01em; }
.band__text { margin-top: var(--space-3); color: var(--ink-muted); }
.loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); counter-reset: step; }
.loop li { position: relative; background: var(--surface); border: var(--stroke-ui) solid var(--line); border-radius: var(--radius-m); padding: var(--space-4); font-size: 15px; line-height: 21px; counter-increment: step; }
.loop li::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--on-fill); font: 700 14px/1 var(--font-display); margin-bottom: var(--space-2); }
@media (max-width: 960px) {
  .band__inner { grid-template-columns: minmax(0, 1fr); }
  .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .loop { grid-template-columns: minmax(0, 1fr); } .band { padding: var(--space-8) var(--space-6); } }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); }
@media (max-width: 860px) { .roles { grid-template-columns: minmax(0, 1fr); } }
.role { background: var(--surface); border: var(--stroke-ui) solid var(--line); border-radius: var(--radius-l); padding: var(--space-8); }
.role__title { font-size: 26px; line-height: 30px; margin-bottom: var(--space-6); }
.benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.benefits li { padding-left: 22px; position: relative; color: var(--ink-muted); }
.benefits li::before { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 12px; background: var(--tag); clip-path: polygon(50% 0, 100% 28%, 100% 100%, 0 100%, 0 28%); }
.benefits strong { color: var(--ink); font-weight: 600; }
.strip { margin-top: var(--space-8); display: flex; gap: var(--space-4); align-items: baseline; flex-wrap: wrap; padding: var(--space-6) var(--space-8); border: var(--stroke-ui) dashed var(--line); border-radius: var(--radius-l); }
.strip__title { font: 700 20px/24px var(--font-display); }
.strip p { color: var(--ink-muted); flex: 1 1 420px; }

/* How it works */
.how { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-12); align-items: center; }
@media (max-width: 960px) { .how { grid-template-columns: minmax(0, 1fr); } }
.objects { margin: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.objects dt { font: 700 20px/24px var(--font-display); }
.objects dd { margin: var(--space-1) 0 0; color: var(--ink-muted); }
.example { display: flex; flex-direction: column; gap: var(--space-4); }
.example__title { font: 700 20px/24px var(--font-display); }
.example__stage { position: relative; min-height: 440px; }
.tag { position: absolute; left: 8px; top: 12px; width: 280px; padding: 56px var(--space-6) var(--space-6); background: var(--tag); color: var(--on-tag); clip-path: polygon(16% 0, 84% 0, 100% 9%, 100% 100%, 0 100%, 0 9%); transform: rotate(var(--tilt-tag)); display: flex; flex-direction: column; gap: var(--space-3); }
.tag__hole { position: absolute; top: 16px; left: 50%; margin-left: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--ground); border: var(--stroke-strong) solid var(--on-tag); }
.tag__title { font: 700 24px/1 var(--font-display); }
.tag__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding-bottom: var(--space-2); border-bottom: var(--stroke-ui) solid var(--on-tag); font-size: 14px; line-height: 1.35; }
.tag__row:last-child { border-bottom: 0; padding-bottom: 0; }
.tag__value { font-weight: 600; text-align: right; }
.tag__figure { font: 800 36px/1 var(--font-display); }
.tag__id { font: 500 12px/1.3 var(--font-mono); }
.stamp { position: absolute; display: inline-flex; flex-direction: column; gap: 2px; padding: var(--space-2) 14px; border: 3px solid currentColor; border-radius: var(--radius-s); background: var(--ground); transform: rotate(var(--tilt-stamp)); }
.stamp--fit { color: var(--brand); left: 214px; top: 296px; }
.stamp--not-fit { color: var(--signal); left: 36px; top: 360px; transform: rotate(var(--tilt-stamp-alt)); }
.stamp__label { font: 800 30px/1 var(--font-display); }
.stamp__purpose { font: 600 13px/1.3 var(--font-text); }
@media (max-width: 480px) {
  .example__stage { min-height: 470px; }
  .stamp--fit { left: 96px; top: 300px; }
  .stamp--not-fit { left: 8px; top: 384px; }
}

.flow { margin-top: var(--space-12); display: grid; grid-template-columns: minmax(0, 4fr) 40px minmax(0, 3fr) 40px minmax(0, 4fr); align-items: center; }
.flow__inputs { display: flex; flex-direction: column; gap: var(--space-3); }
.flow__box { background: var(--surface); border: var(--stroke-ui) solid var(--line); border-radius: var(--radius-m); padding: var(--space-3) var(--space-4); }
.flow__box strong { display: block; font: 700 16px/20px var(--font-display); }
.flow__box span { font-size: 13px; line-height: 19px; color: var(--ink-muted); }
.flow__arrow { height: var(--stroke-strong); background: var(--brand); position: relative; }
.flow__arrow::after { content: ""; position: absolute; right: -1px; top: -5px; border-left: 9px solid var(--brand); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.flow__evaluator { aspect-ratio: 1; max-width: 180px; width: 100%; justify-self: center; border-radius: 50%; border: var(--stroke-strong) dashed var(--brand); background: var(--brand-tint); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--space-4); }
.flow__evaluator strong { font: 700 20px/1 var(--font-display); }
.flow__evaluator span { font-size: 13px; line-height: 18px; }
.flow__decision { display: flex; flex-direction: column; gap: var(--space-3); }
.flow__decision .decisions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
@media (max-width: 860px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .flow__arrow { width: var(--stroke-strong); height: 32px; justify-self: center; }
  .flow__arrow::after { right: -5px; top: auto; bottom: -1px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid var(--brand); border-bottom: 0; }
}

.outcomes { margin-top: var(--space-12); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); }
@media (max-width: 860px) { .outcomes { grid-template-columns: minmax(0, 1fr); } }
.outcomes__group { display: flex; flex-direction: column; gap: var(--space-3); }
.outcomes__title { font: 700 20px/24px var(--font-display); }
.outcomes__row { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); }

.evidence { margin-top: var(--space-16); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12); }
@media (max-width: 860px) { .evidence { grid-template-columns: minmax(0, 1fr); } }
.evidence__title { font-size: 28px; line-height: 32px; letter-spacing: -0.01em; }
.evidence__text { margin-top: var(--space-3); color: var(--ink-muted); }
.issuers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); align-content: flex-start; }
.issuer { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: var(--space-2) var(--space-4) var(--space-2) 14px; border-radius: var(--radius-pill); background: var(--surface); border: var(--stroke-ui) solid var(--line); font-size: 15px; line-height: 20px; font-weight: 500; }

.standards { margin-top: var(--space-16); }
.standards__title { font-size: 28px; line-height: 32px; letter-spacing: -0.01em; }
.standards__list { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); }
.standards__list li a { display: inline-flex; padding: var(--space-2) var(--space-4); border-radius: var(--radius-m); background: var(--surface); border: var(--stroke-ui) solid var(--line); color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; }
.standards__list li a:hover { border-color: var(--brand); color: var(--brand); }
.standards__text { margin-top: var(--space-6); max-width: var(--reading-max); color: var(--ink-muted); }
.core { margin-top: var(--space-6); max-width: var(--reading-max); color: var(--ink-muted); }

/* Try it */
.try { background: var(--surface); border: var(--stroke-ui) solid var(--line); border-radius: var(--radius-l); padding: var(--space-12); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-8); align-items: center; }
@media (max-width: 860px) { .try { grid-template-columns: minmax(0, 1fr); padding: var(--space-8) var(--space-6); } }
.try__text { display: flex; flex-direction: column; gap: var(--space-4); }
.try__soon { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6); border-radius: var(--radius-m); background: var(--surface-sunken); }
.try__host { font: 500 14px/1.4 var(--font-mono); word-break: break-all; }

/* Footer */
.site-footer { margin-top: var(--space-24); padding: var(--space-16) 0 var(--space-12); background: var(--surface-sunken); }
.footer__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); }
@media (max-width: 960px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: minmax(0, 1fr); } }
.footer__title { font: 700 18px/22px var(--font-display); margin-bottom: var(--space-3); }
.footer__grid p { font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.footer__grid p + p { margin-top: var(--space-3); }
.footer__bottom { margin-top: var(--space-12); padding-top: var(--space-6); border-top: var(--stroke-ui) solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; font-size: 14px; color: var(--ink-muted); }
.footer__bottom img { width: 120px; }
.footer__links { display: flex; gap: var(--space-6); flex-wrap: wrap; }

/* Simple content pages (privacy, 404) */
.doc { max-width: 720px; padding: var(--space-12) 0 0; }
.doc h1 { font-size: 48px; line-height: 52px; letter-spacing: -0.02em; margin-bottom: var(--space-6); }
.doc h2 { font-size: 24px; line-height: 30px; margin: var(--space-12) 0 var(--space-3); }
.doc p, .doc ul { color: var(--ink-muted); }
.doc p + p { margin-top: var(--space-3); }
.doc ul { padding-left: 20px; margin: var(--space-3) 0 0; }
.doc li + li { margin-top: var(--space-2); }
.doc address { font-style: normal; color: var(--ink); margin-top: var(--space-3); }
@media (max-width: 480px) { .doc h1 { font-size: 36px; line-height: 40px; } }

/* Logo swap for dark mode */
.logo--dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo--light { display: none; }
  .logo--dark { display: block; }
}
