/* Officiata design tokens · proposal 2026-11-16 · see design-system.md
   One system for officiata.com. Fonts stay self-hosted (the existing @font-face blocks in styles.css are kept as they are).
   Contrast ratios for every pair are listed in design-system.md, section 2.4. */

:root{
  color-scheme:light;

  /* ---------- 1. Colour roles ---------- */
  /* Light surfaces */
  --c-white:#FFFFFF;          /* default section background, card background */
  --c-tint:#F2F5F9;           /* "proof" sections only (demo, screenshots, comparison) */
  --c-line:#E1E7EF;           /* card borders, hairlines (decorative) */
  --c-line-strong:#7A879C;    /* borders that identify a control: secondary button, inputs (3:1) */

  /* Text on light */
  --c-ink:#18253D;            /* headings, strong text, focus ring on light */
  --c-text:#3D4A61;           /* body text */
  --c-muted:#5E6B82;          /* captions, labels, "Sample data." */

  /* Navy */
  --c-navy:#0D2240;           /* dark sections, demo stage */
  --c-navy-2:#152E52;         /* hover fill of the secondary button on navy; raised areas inside the demo */
  --c-navy-deep:#0A1B33;      /* end stop of the one navy gradient (never a flat fill) */
  --c-on-navy:#FFFFFF;        /* headings and button text on navy */
  --c-on-navy-text:#C9D4E3;   /* body text on navy; secondary-button border on navy */
  --c-on-navy-muted:#9FB0C8;  /* captions on navy */
  --c-on-navy-line:rgba(255,255,255,.14); /* hairlines on navy (decorative) */

  /* Brand orange: the one action. Nothing else is orange. */
  --c-orange:#C9480B;         /* primary button fill, logo tile */
  --c-orange-hover:#A93C08;   /* primary button hover; text links on light */
  --c-orange-on-navy:#F2A37A; /* text links on navy (peach) */

  /* One success green: confirmed, approved, "nothing goes out without approval" */
  --c-green:#1D7444;          /* text and icons on light */
  --c-green-soft:#E2F3E8;     /* soft fill behind green text */
  --c-green-on-navy:#3FD68A;  /* the same green, lifted for navy (icons, short labels) */

  /* Derived roles (use these in components, not the raw colours) */
  --link:var(--c-orange-hover);
  --link-hover:var(--c-ink);
  --focus:var(--c-ink);
  --focus-on-navy:#FFFFFF;

  /* The one navy gradient. Lightest stop #10284A keeps the orange button at 3.1:1 against it. No coloured glows. */
  --navy-grad:radial-gradient(120% 90% at 85% 0%,#10284A 0%,var(--c-navy) 55%,var(--c-navy-deep) 100%);

  /* ---------- Sport accents: ONLY inside the demo (.hero-demo / .rg-* / .bd-*) ---------- */
  --sport-football-1:#2FD27C; --sport-football-2:#D9E35A; --sport-football-3:#4AA8E8;
  --sport-basketball-1:#FFA62B; --sport-basketball-2:#FFD25C; --sport-basketball-3:#FF6F61;
  --sport-handball-1:#4AA3FF; --sport-handball-2:#9B8CFF; --sport-handball-3:#A6D8FF;
  --demo-glass:rgba(255,255,255,.06);        /* demo game cards and panels */
  --demo-glass-strong:rgba(255,255,255,.14); /* demo hover / active row */
  --demo-warn:#FF8A4C;                       /* soft-rule "!" badge: navy text on it, never white */

  /* ---------- 2. Type ---------- */
  --font-head:"Rubik","Trebuchet MS",Arial,sans-serif;
  --font-text:"Nunito Sans","Segoe UI",Arial,sans-serif;
  --fw-head:600;     /* Rubik: all headings and buttons */
  --fw-regular:400;  /* Nunito Sans: body */
  --fw-bold:700;     /* Nunito Sans: labels, chips, strong */

  /* Six sizes. Fluid from 375 px to 1440 px viewport; phone / desktop values in the comments. */
  --fs-display:clamp(2.25rem,1.81rem + 1.878vw,3.5rem);   /* 36 / 56  H1, one per page */
  --lh-display:1.1;
  --fs-h2:clamp(1.75rem,1.486rem + 1.127vw,2.5rem);       /* 28 / 40  section headings */
  --lh-h2:1.15;
  --fs-h3:clamp(1.25rem,1.206rem + .188vw,1.375rem);      /* 20 / 22  card and point titles */
  --lh-h3:1.3;
  --fs-lead:clamp(1.125rem,1.081rem + .188vw,1.25rem);    /* 18 / 20  hero subhead, one intro line per section */
  --lh-lead:1.5;
  --fs-body:clamp(1.0625rem,1.04rem + .094vw,1.125rem);   /* 17 / 18  body text */
  --lh-body:1.6;
  --fs-small:.9375rem;                                    /* 15 / 15  captions, labels, chips, nav, footer. Nothing smaller. */
  --lh-small:1.5;

  --ls-display:-.02em;
  --ls-h2:-.015em;
  --ls-default:0;    /* no uppercase, no wide tracking anywhere */

  /* ---------- 3. Spacing (4/8 based) ---------- */
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:24px;
  --space-6:32px;
  --space-7:48px;
  --space-8:64px;
  --space-9:96px;

  --section-y:var(--space-8);   /* section padding top and bottom: 64 phone, 96 from 1024 px */
  --block-gap:var(--space-6);   /* between the section heading block and its content: 32 phone, 48 from 720 px */
  --gutter:20px;                /* page side padding: 20 / 32 / 48 (unchanged) */

  /* ---------- 4. Grid and widths ---------- */
  --w-page:1200px;    /* .wrap */
  --w-text:640px;     /* any running text block (~65 characters at 18 px) */
  --w-display:20ch;   /* H1: three lines in the 7/12 hero column at 1440 */
  --w-h2:24ch;        /* H2 */
  --grid-cols:4;
  --grid-gap:var(--space-5);
  --head-h:66px;      /* header height on phones */

  /* ---------- 5. Radii (three) ---------- */
  --r-small:8px;      /* chips, badges, inputs, icon tiles, skip link */
  --r-card:20px;      /* the card, images and screenshots, the demo stage, the closing panel */
  --r-pill:999px;     /* buttons only: a pill always means "you can press this" */

  /* ---------- 6. Shadows (two) ---------- */
  --shadow-float:0 1px 2px rgba(13,34,64,.06),0 12px 28px -12px rgba(13,34,64,.22); /* something laid over an image: the explained-slot card over the screenshot, tooltips, the open phone menu */
  --shadow-device:0 30px 60px -24px rgba(5,13,25,.55);                               /* phone mock and hero visual on navy */

  /* ---------- 7. Icons ---------- */
  --icon-sm:20px;     /* inside buttons and links, inline */
  --icon-md:24px;     /* in icon tiles and lists */
  --icon-tile:40px;   /* square tile, --r-small */
  --icon-stroke:2;

  /* ---------- 8. Motion ---------- */
  --ease-out:cubic-bezier(.2,.8,.2,1);
  --dur-fast:150ms;   /* hover, press, colour changes */
  --dur-base:250ms;   /* menu, disclosures */
  --dur-reveal:450ms; /* the one scroll reveal */
  --reveal-shift:12px;
  --reveal-stagger:80ms; /* at most 3 siblings */
}

@media (min-width:720px){
  :root{
    --gutter:32px;
    --block-gap:var(--space-7);
    --grid-cols:6;
    --head-h:84px;
  }
}
@media (min-width:1024px){
  :root{
    --section-y:var(--space-9);
    --grid-cols:12;
    --grid-gap:var(--space-6);
  }
}
@media (min-width:1200px){
  :root{--gutter:48px}
}

/* Reduced motion: no reveal, no autoplay, no smooth scroll. Components read these tokens, so this one block switches everything. */
@media (prefers-reduced-motion:reduce){
  :root{
    --dur-fast:0ms;
    --dur-base:0ms;
    --dur-reveal:0ms;
    --reveal-shift:0px;
    --reveal-stagger:0ms;
  }
}

/* =====================================================================
   Reference components: how the tokens are meant to be used.
   Not a drop-in replacement for styles.css; names follow the current site where one exists.
   ===================================================================== */

/* Section backgrounds: three, nothing else */
.sec{padding-block:var(--section-y);background:var(--c-white);color:var(--c-text)}
.sec--tint{background:var(--c-tint)}
.sec--navy{background:var(--navy-grad);color:var(--c-on-navy-text)}
.sec--navy :is(h1,h2,h3){color:var(--c-on-navy)}

.wrap{width:min(var(--w-page),100% - 2*var(--gutter));margin-inline:auto}
.grid{display:grid;grid-template-columns:repeat(var(--grid-cols),minmax(0,1fr));gap:var(--grid-gap)}

/* Type */
body{font:var(--fw-regular) var(--fs-body)/var(--lh-body) var(--font-text);color:var(--c-text)}
h1,.t-display{font:var(--fw-head) var(--fs-display)/var(--lh-display) var(--font-head);letter-spacing:var(--ls-display);color:var(--c-ink);max-width:var(--w-display);text-wrap:balance}
h2,.t-h2{font:var(--fw-head) var(--fs-h2)/var(--lh-h2) var(--font-head);letter-spacing:var(--ls-h2);color:var(--c-ink);max-width:var(--w-h2);text-wrap:balance}
h3,.t-h3{font:var(--fw-head) var(--fs-h3)/var(--lh-h3) var(--font-head);color:var(--c-ink)}
.t-lead{font-size:var(--fs-lead);line-height:var(--lh-lead);max-width:var(--w-text)}
.t-small,.cap{font-size:var(--fs-small);line-height:var(--lh-small);color:var(--c-muted)}
.sec--navy .cap{color:var(--c-on-navy-muted)}
.t-label{font:var(--fw-bold) var(--fs-small)/var(--lh-small) var(--font-text);color:var(--c-muted)} /* sentence case, replaces the uppercase eyebrow */
p{max-width:var(--w-text);text-wrap:pretty}

/* The one card */
.card{background:var(--c-white);border:1px solid var(--c-line);border-radius:var(--r-card);padding:var(--space-5)}
@media (min-width:720px){.card{padding:var(--space-6)}}
a.card{text-decoration:none;color:inherit;transition:border-color var(--dur-fast) var(--ease-out)}
a.card:hover{border-color:var(--c-line-strong)}
a.card:hover h3{text-decoration:underline;text-underline-offset:.2em}

/* Buttons: two styles, one size */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);min-height:48px;padding:var(--space-3) var(--space-5);border-radius:var(--r-pill);border:1px solid transparent;font:var(--fw-head) 1rem/1.2 var(--font-head);text-decoration:none;text-align:center;transition:background-color var(--dur-fast) var(--ease-out),border-color var(--dur-fast) var(--ease-out)}
.btn-primary{background:var(--c-orange);color:#fff}
.btn-primary:hover{background:var(--c-orange-hover)}
.btn-secondary{background:transparent;border-color:var(--c-line-strong);color:var(--c-ink)}
.btn-secondary:hover{border-color:var(--c-ink);background:var(--c-tint)}
.sec--tint .btn-secondary:hover{background:var(--c-white)}
.sec--navy .btn-secondary{border-color:var(--c-on-navy-text);color:var(--c-on-navy)}
.sec--navy .btn-secondary:hover{border-color:#fff;background:var(--c-navy-2)}
.btn svg{width:var(--icon-sm);height:var(--icon-sm)}

/* Text link */
.link,p a{color:var(--link);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.2em;transition:color var(--dur-fast) var(--ease-out)}
.link:hover,p a:hover{color:var(--link-hover);text-decoration-thickness:2px}
.sec--navy :is(.link,p a){color:var(--c-orange-on-navy)}
.sec--navy :is(.link,p a):hover{color:#fff}

/* Chip / badge: never a pill, never orange */
.chip{display:inline-flex;align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-3);border-radius:var(--r-small);background:var(--c-tint);color:var(--c-ink);font:var(--fw-bold) var(--fs-small)/1.4 var(--font-text)}
.sec--tint .chip{background:var(--c-white)}
.chip--ok{background:var(--c-green-soft);color:var(--c-green)}

/* Icon tile */
.icon-tile{display:inline-grid;place-items:center;width:var(--icon-tile);height:var(--icon-tile);border-radius:var(--r-small);background:var(--c-tint);color:var(--c-ink)}
.sec--tint .icon-tile{background:var(--c-white)}
.sec--navy .icon-tile{background:var(--demo-glass);color:var(--c-on-navy-text)}
.icon-tile svg{width:var(--icon-md);height:var(--icon-md);stroke:currentColor;stroke-width:var(--icon-stroke);fill:none;stroke-linecap:round;stroke-linejoin:round}

/* Focus: always visible */
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.sec--navy :focus-visible,.top :focus-visible{outline-color:var(--focus-on-navy)}

/* The one reveal. js/reveal.js adds .rise only when JS runs and motion is allowed, so content is never hidden without JS. */
@media (prefers-reduced-motion:no-preference){
  .rise{opacity:0;transform:translateY(var(--reveal-shift));transition:opacity var(--dur-reveal) var(--ease-out) var(--rise-delay,0ms),transform var(--dur-reveal) var(--ease-out) var(--rise-delay,0ms)}
  .rise.shown{opacity:1;transform:none}
  html{scroll-behavior:smooth}
}
