/* Stormwatch Horizon: calm national service, Public Sans, forest and sage actions.
   Map colors label recorded weather evidence; interface green is not a weather severity scale. */

/* Bodoni Moda and Public Sans: SIL Open Font License 1.1 (web/fonts/OFL-*.txt). Latin subset, self-hosted. */
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/static/fonts/bodoni-moda-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("/static/fonts/bodoni-moda-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/public-sans-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* Inks and paper */
  --paper: #F8FAFA;                     /* record paper, never cream */
  --ink: #182531;                       /* iron-gall ink: text, rules, primary buttons */
  --slate: #526675;                     /* plat-line slate: secondary text, linework, control borders (5.4:1 on paper) */
  --rule: rgba(91, 102, 112, .38);      /* hairline between rows */
  --plat-line: rgba(91, 102, 112, .30); /* faint parcel lines drawn behind the home search */
  --wash: rgba(29, 28, 26, .045);       /* the faintest ink wash: hover on a row or a quiet control */
  --selection-bg: var(--ink);
  --selection-ink: var(--paper);

  /* Hail size ramp: the only colour on the site, always labelled with inches and an object */
  --hail-penny: #F2D27A;                /* straw */
  --hail-quarter: #E3A33A;              /* amber */
  --hail-pingpong: #D2691E;             /* burnt orange */
  --hail-golfball: #A3202F;             /* crimson */
  --hail-egg: #8E1F3D;                  /* plum */

  /* Live official warnings only (the live storm page). Nothing else is ever this red. */
  --warning: #D0021B;

  /* Type */
  --font-display: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-text: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --text-label: 0.6875rem;              /* 11px: small capitals labels, the floor for any functional text */
  --text-xs: 0.75rem;                   /* 12px */
  --text-sm: 0.8125rem;                 /* 13px: interface text */
  --text-md: 0.9375rem;                 /* 15px */
  --text-base: 1rem;                    /* 16px: reading text */
  --text-read: clamp(1rem, 0.94rem + 0.24vw, 1.0625rem);    /* 16 to 17px: long reading (guides, trust pages) */
  --text-lg: 1.1875rem;                 /* 19px: lead lines */
  --wordmark: 1.6875rem;                /* 27px */
  --display-sm: 1.5rem;                 /* 24px */
  --display-md: clamp(1.75rem, 1.35rem + 1.6vw, 2.375rem);   /* 28 to 38px */
  --display-lg: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);      /* 36 to 56px */

  --leading-display: 1.06;
  --leading-snug: 1.25;
  --leading-ui: 1.35;
  --leading-body: 1.6;
  --tracking-caps: 0.14em;
  --tracking-display: -0.012em;
  --measure: 66ch;

  /* Space (4px steps) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --gutter: clamp(16px, 3.4vw, 40px);
  --page-max: 1440px;
  /* side padding that keeps a full-width band's content inside the 1440px page: the gutter, or more on wide screens.
     The 100% is the band's own width, worked out where the property is used */
  --page-inset: max(var(--gutter), calc((100% - var(--page-max)) / 2 + var(--gutter)));

  /* Lines, corners, controls */
  --hairline: 1px solid var(--rule);
  --line: 1px solid var(--slate);
  --line-ink: 1px solid var(--ink);
  --double-rule: 3px double var(--ink);
  --radius: 12px;
  --control-h: 44px;                    /* phones and touch screens: 44px targets */
  --control-text: 1rem;                 /* 16px in fields on touch screens, so phones don't zoom in */
  --row-h: 44px;                        /* a tappable row in a list or menu */
  --masthead-h: 58px;
  --phone-bar-h: 64px;
  --focus-ring: 2px solid var(--ink);
  --focus-offset: 2px;

  /* Motion: one quiet ease, held still when the visitor asks for less motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: 120ms;
  --dur: 220ms;
}

@media (min-width: 64rem) and (pointer: fine) {
  :root { --control-h: 36px; --control-text: 0.8125rem; --row-h: 30px; }
}

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