/* Design tokens: the PorchOS token contract (DECISIONS #77), set to the Porch Creative Solutions brand (MIG-WO-11,
   refresh about 3). Brand source: the live Total child theme PorchCreative (theme mods, page WPBakery CSS, intake
   fonts-colors.md): teal ground #417989, accent #76adbe (header pill, menu hover), light grey band #e0e0e0, brown band
   #917159, black work band, off grey contact band #f0f0f0, ink #1b1b1b, yellow #ffdd6f, button hover #231f20. Fonts:
   Newgate (display), Inter (text). Audit: refs/porchcreativesolutions/pre-build-audit.md sections 3 and 5.
   Contrast: white on the accent is 2.47:1, so text on the accent pill is ink (6.96:1). White body text on the live
   brown is 4.46:1, so the band uses one step deeper (#8a6c55, 4.82:1; open question 2).
   - palette (--c-*): the only color literals in the theme;
   - roles (--color-*): jobs, each pointing at a palette color;
   - fonts (--font-*): the only place a font is named.
   Check: PorchOS tools/check-tokens.py <theme dir> (zero findings). */

/* Newgate (FactoryType; the font names a commercial licence, no trial): the client's own files in the media library
   (uploads/2024/01), unchanged, not copied into the theme or git. */
@font-face {
  font-family: "Newgate";
  src: url("../../../uploads/2024/01/newgate-bold-webfont.woff2") format("woff2"), url("../../../uploads/2024/01/newgate-bold-webfont.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newgate";
  src: url("../../../uploads/2024/01/newgate-webfont.woff2") format("woff2"), url("../../../uploads/2024/01/newgate-webfont.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Inter (OFL), self-hosted: google/fonts source, optical size 14, weights 400 to 800, Latin subset (fonttools). The
   live site loaded Inter 400 and 800 from Google Fonts. */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-400-800.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallbacks while the web fonts load, so text does not reflow when they arrive (checklist I3). */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22.4%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Newgate Fallback";
  src: local("Georgia Bold"), local("Georgia-Bold"), local("Georgia");
  font-weight: 700;
  size-adjust: 104%;
  ascent-override: 88%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  /* ---- Palette ---------------------------------------------------------- */
  --c-paper: #ffffff;
  --c-ink: #1b1b1b;        /* headings, dark buttons (live) */
  --c-ink-hover: #231f20;  /* live button hover */
  --c-teal: #417989;       /* hero and page ground (live t_background_color) */
  --c-teal-deep: #345f6c;  /* footer bar, header rule */
  --c-accent: #76adbe;     /* header pill, menu hover, "view website" (live accent_color) */
  --c-accent-hover: #8fbecc;
  --c-grey: #e0e0e0;       /* Welcome band (live) */
  --c-brown: #8a6c55;      /* services band: live #917159, one step deeper for white text 4.8:1 */
  --c-black: #000000;      /* Latest Work band (live) */
  --c-mist: #f0f0f0;       /* contact band (live) */
  --c-yellow: #ffdd6f;     /* "Statistics you need to know" (live) */
  --c-yellow-hover: #ffe68f;
  --c-stone: #5c5c5c;      /* small grey text on the light bands, 6.2:1 on #f0f0f0 */
  --c-red: #a8261b;        /* form errors, 6.4:1 on #f0f0f0 */

  /* ---- Roles ------------------------------------------------------------ */
  --color-surface-1: var(--c-teal);
  --color-surface-2: var(--c-mist);
  --color-surface-3: var(--c-black);
  --color-text-1: var(--c-ink);
  --color-text-2: var(--c-ink);
  --color-text-3: var(--c-stone);
  --color-on-teal: var(--c-paper);
  --color-accent: var(--c-ink);
  --color-on-accent: var(--c-mist);
  --color-accent-hover: var(--c-ink-hover);
  --color-accent-active: var(--c-black);
  --color-pill: var(--c-accent);
  --color-on-pill: var(--c-ink);
  --color-pill-hover: var(--c-accent-hover);
  --color-brand: var(--c-teal);
  --color-link: var(--c-ink);
  --color-link-hover: var(--c-teal-deep);
  --color-link-on-dark: var(--c-accent);
  --color-border: color-mix(in srgb, var(--c-ink) 18%, transparent);
  --color-border-strong: color-mix(in srgb, var(--c-ink) 45%, var(--c-paper));
  --color-rule: color-mix(in srgb, var(--c-ink) 14%, transparent);
  --color-focus: var(--c-ink);
  --color-focus-on-dark: var(--c-paper);
  --color-error: var(--c-red);
  --color-success: var(--c-teal-deep);
  --color-band: var(--c-black);
  --color-on-band: var(--c-paper);
  --color-on-band-2: color-mix(in srgb, var(--c-paper) 88%, var(--c-black));
  --color-header: var(--c-teal);
  --color-on-header: var(--c-paper);
  --color-band-grey: var(--c-grey);
  --color-band-brown: var(--c-brown);
  --color-band-mist: var(--c-mist);
  --color-statistics: var(--c-yellow);
  --color-statistics-hover: var(--c-yellow-hover);
  --color-footer: var(--c-teal-deep);
  --shadow-header: 0 2px 14px rgb(0 0 0 / 0.18);
  --shadow-menu: 0 12px 24px rgb(0 0 0 / 0.22);
  --shadow-shot: 0 10px 30px rgb(0 0 0 / 0.35);

  /* ---- Type (audit section 5; phone value at 390 px, desktop value from 1200 px up) */
  --fs-display: clamp(2.125rem, 1.5833rem + 2.2222vw, 3.25rem);       /* hero H1 34 -> 52 px (PM review: 34 px is the fewest lines, 3, at a hero size on phones) */
  --lh-display: 1.08;
  --fs-display-2: clamp(2.125rem, 1.5833rem + 2.2222vw, 3.25rem);     /* inner H1 (Discovery) 34 -> 52 px */
  --fs-h2: clamp(1.75rem, 1.2685rem + 1.9753vw, 2.75rem);             /* 28 -> 44 px (PM review: every H2 at most 2 lines at 390) */
  --lh-h2: 1.1;
  --fs-h3: clamp(1.1875rem, 1.1076rem + 0.3277vw, 1.375rem);          /* 19 -> 22 px */
  --lh-h3: 1.3;
  --fs-statement: clamp(1.25rem, 1.1435rem + 0.4370vw, 1.5rem);       /* 20 -> 24 px */
  --fs-h4: clamp(1.375rem, 1.3218rem + 0.2185vw, 1.5rem);             /* 22 -> 24 px, Newgate line */
  --fs-lead: clamp(1.125rem, 1.0718rem + 0.2185vw, 1.25rem);          /* 18 -> 20 px */
  --lh-lead: 1.5;
  --fs-body: clamp(1rem, 0.9734rem + 0.1092vw, 1.0625rem);            /* 16 -> 17 px */
  --lh-body: 1.6;
  --fs-small: 0.875rem;  /* 14 px */
  --lh-small: 1.5;
  --fs-ui: 0.9375rem;    /* buttons 15 px */
  --lh-ui: 1.25rem;
  --fs-nav: 1rem;        /* 16 px */
  --lh-heading: 1.1;
  --measure: 68ch;
  --measure-lead: 46rem;
  --color-type-display: var(--color-text-1);
  --color-type-h2: var(--color-text-1);
  --color-type-h3: var(--color-text-1);
  --color-type-body: var(--color-text-2);
  --color-type-small: var(--color-text-3);

  /* ---- Buttons, headings, links ---------------------------------------- */
  --btn-height: 2.875rem; /* 46 px */
  --btn-radius: 2.5rem;   /* live pill, 40 px (brand cue; audit open question 1) */
  --btn-pad-y: 0.625rem;
  --btn-pad-x: 1.75rem;
  --heading-weight: 700;
  --heading-transform: none;
  --heading-tracking: 0em;
  --ui-transform: none;
  --ui-tracking: 0em;
  --link-decoration: none; /* WO site rule: no underlines; links change colour and weight */

  /* ---- Fonts ------------------------------------------------------------ */
  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: "Newgate", "Newgate Fallback", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* ---- Scales (8, 16, 24, 32, 48, 64, 96) ------------------------------- */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --section-pad: clamp(3.5rem, 2.5417rem + 3.9330vw, 6rem);   /* 56 -> 96 px */
  --section-pad-md: clamp(2.5rem, 1.9250rem + 2.3598vw, 4rem); /* 40 -> 64 px */
  /* Live container (intake check 7): 1080 px (theme mod main_container_width). Kept (refresh). */
  --page-width-mode: boxed;
  --content-width: 67.5rem; /* 1080 px */
  --text-width: 46rem;      /* reading measure, 736 px */
  --gutter: 1.25rem;        /* 20 px on phones */
  --header-edge: content;
  --header-gutter: 1.25rem;
  --porch-page-width: min(100% - 2 * var(--gutter), var(--content-width));
  --porch-header-inset: var(--gutter);
  --radius: 0.5rem;          /* fields and image frames: 8 px (live field radius) */
  --radius-card: 0.5rem;     /* work screenshots (live "rounded") */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-height: 6rem;     /* 96 px desktop; 72 px phone (site.css) */
  --topband-height: 0rem;

  /* ---- Form controls: one shared set (PORCH_RULES "Form controls match") */
  --porch-control-height: 3rem;
  --porch-control-pad-x: 0.875rem;
  --porch-control-border: 1px solid var(--color-border-strong);
  --porch-control-radius: var(--radius);
  --porch-control-bg: var(--c-paper);
  --porch-control-font: 400 1rem/1.4 var(--font-body);
  --porch-control-color: var(--color-text-1);
  --porch-control-placeholder: var(--color-text-3);
  --field-padding-x: var(--porch-control-pad-x);
  --select-chevron-size: 0.4rem;
  --select-chevron-gap: 0.5rem;
}
