/* ==========================================================================
   DAVINCI — shared foundation
   Tokens, reset, font faces and a few utilities shared by every page.
   ========================================================================== */

/* --- Font faces ---------------------------------------------------------- */
/* Archivo is subset to Latin and instanced to weight 400–900, width 100–125 % (see README). */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-site.woff2") format("woff2"); font-weight: 400 900; font-stretch: 100% 125%; font-style: normal; font-display: swap; }

/* --- Brand tokens ---------------------------------------------------------
   Sampled from the supplied logo (logo_cropped.png):
     wordmark blue  rgb(48, 88, 155)   #30589B   hue ≈ 217°
     offset shadow  rgb(148, 147, 146) #949392   warm neutral grey
   Every other colour is derived from these two. */
:root {
  --blue: #30589B;          /* logo blue — the brand colour */
  --blue-deep: #24467F;     /* hover / pressed, text on pale */
  --blue-soft: #7C9BD3;     /* blue for small accents on navy (AA on --navy) */
  --blue-pale: #EAF0FA;     /* tinted surface */
  --navy: #12213A;          /* deep navy, same hue as the logo blue */
  --navy-2: #1B2E4E;
  --paper: #F5F4EF;         /* warm off-white */
  --white: #FFFFFF;
  --graphite: #262A30;      /* primary text */
  --grey-tech: #D9DDE3;     /* technical rules on light surfaces */
  --grey-logo: #949392;     /* the logo's shadow grey — lines and marks only */
  --grey-text: #5F6166;     /* secondary text, AA on paper and white */

  --font-system: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono-system: ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

@media (prefers-reduced-motion: no-preference) {
  html:focus-within { scroll-behavior: smooth; }
}

/* --- Utilities ------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute !important; 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: 12px; top: -100px; z-index: 100;
  padding: 10px 14px; background: var(--navy); color: #fff; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* The supplied logo is used as-is (transparent background derived from the
   original white PNG; colours untouched). Only its width is ever set. */
.logo { display: block; width: var(--logo-w, 168px); height: auto; aspect-ratio: 3139 / 642; }

/* Elements that animate in when scrolled into view (see base.js). */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* --- Phase 1 review bar ----------------------------------------------------
   Not part of any design direction: a neutral switcher for comparing samples. */
.review-bar {
  position: fixed; z-index: 90; right: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 2px;
  padding: 4px; background: rgba(20, 22, 26, .92); color: #fff;
  font: 500 12px/1 var(--font-system); letter-spacing: .02em;
  border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.review-bar span { padding: 0 8px 0 6px; opacity: .6; }
.review-bar a { padding: 8px 10px; border-radius: 4px; text-decoration: none; }
.review-bar a:hover { background: rgba(255, 255, 255, .12); }
.review-bar a[aria-current="page"] { background: #fff; color: #14161a; }
@media (max-width: 420px) { .review-bar span { display: none; } }
