@charset "UTF-8";
/**
 * base.css
 *
 * Resets, design-token custom properties, base typography, layout
 * utilities (wrappers, flex/wrap helpers), and the background-colour
 * (bg-{key}) classes referenced by page-builder block markup.
 *
 * Token values are intentionally minimal scaffolding. Tune hex values
 * here (not in blocks.css or components.css) once the visual direction is
 * locked. Token *names* must stay stable — they're referenced from every
 * other stylesheet.
 *
 * Token-to-PHP mapping:
 *   --color-{key}  ↔  tif_colour_palette() keys      (inc/theme-constants.php)
 *   --space-{key}  ↔  tif_spacing_scale() keys
 *   --bp-{key}     ↔  tif_breakpoints() values
 *   .wrapper-{key} ↔  tif_wrapper_sizes() values
 */

/* ============================================================
   Design tokens
   ============================================================ */

:root {
    /* Palette — one per tif_colour_palette() key. */
    --color-teal-dark: #082932;
    --color-teal-deep: #144854;
    --color-cream:     #E6EFF1;
    --color-pale:      #EFF5F6;
    --color-white:     #FFFFFF;

    /* Supporting palette — used by component / block CSS for accents,
       borders, dividers and secondary text. Not exposed as
       background-colour choices on blocks. */
    --color-teal-darker: #051C23; /* deepest teal — hero/dark-section gradient floor (mockup --teal-darker) */
    --color-teal-accent: #7AC5CD;
    --color-teal-light:  #A8DBE2;
    --color-teal-pale:   #C4E3E8;
    --color-teal-mid:    #5BA0AB;
    --color-navy-text:   #082832;
    --color-grey-soft:   #C5D5D8;
    /* Muted secondary-text grey. Darkened from #5B6E74 so it clears 4.5:1 on
       every section background it renders on — including teal-pale (#C4E3E8),
       where the old value was 3.95:1 (e.g. .tif-person__role on the Board /
       I&IF committee grids). 4.79:1 on teal-pale, higher on white/cream/pale. */
    --color-grey-mid:    #536067;

    /* Spacing scale — must match tif_spacing_scale(). */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  6rem;
    --space-xxl: 8rem;

    /* Breakpoint values — kept here for reference; media queries below
       are written against the same pixel values. */
    --bp-sm:  480px;
    --bp-md:  768px;
    --bp-lg:  1024px;
    --bp-xl:  1280px;
    --bp-xxl: 1440px;

    /* Wrapper max-widths. .wrapper-{key} classes below apply these. */
    --wrapper-small:  880px;
    --wrapper-medium: 1280px;
    --wrapper-large:  1440px;

    /* Fixed site-header height. The header (components.css) is position:fixed;
       this drives the top offset on the first non-hero block and the
       scroll-padding so in-page anchor links don't land under the header. */
    --tif-header-height: 76px;

    /* Font stacks. Cormorant Garamond + Montserrat are enqueued via
       Google Fonts CDN in inc/enqueue.php (handle: tif-webfonts).
       System fallbacks render acceptably if the CDN is blocked. */
    --font-serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
    --font-sans:  'Montserrat', 'Helvetica Neue', Arial, sans-serif;

    /* Easing — shared by interactive component transitions. */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   Reset
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    /* Keep in-page anchor targets clear of the fixed header. */
    scroll-padding-top: var(--tif-header-height);
}

/* Honour a reduced-motion preference for the smooth in-page scroll (every
   keyframe animation/transition in the theme is already guarded — this is the
   last unguarded motion). */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-navy-text);
    background: var(--color-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Site-wide fractal-noise grain overlay. Fixed, non-interactive, very low
   opacity — sits above content so every section (dark and light) carries the
   same subtle texture. Mirrors the mockup's body::before (lines 43–47).

   Perf (Phase 19): the noise is rendered as a small *tiled* 160px square, not
   stretched across the whole fixed viewport. An feTurbulence filter is one of
   the most expensive paints there is, and with no background-size the browser
   was rasterising it across the entire DPR-scaled viewport on every paint —
   ~3.7s of main-thread work under mobile CPU throttling, single-handedly
   tanking the Lighthouse score. A fixed 160px tile rasterises the filter once
   (160×0.9 = 144 whole noise cycles, so stitchTiles makes the repeat seamless)
   and the compositor tiles the cached bitmap for free. Identical texture at
   0.04 opacity; ~13× less raster area. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 160px 160px;
    background-repeat: repeat;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
}

img, svg, video, canvas {
    max-width: 100%;
    display: block;
    height: auto;
}

/* Iframes are deliberately out of the `height: auto` reset above. Unlike img /
   video they have no intrinsic aspect ratio, so `height: auto` resolves to the
   CSS default of 150px and squashes every embed. Width is still capped; height
   is left to the embed's own aspect-ratio rules. */
iframe {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

a:hover,
a:focus {
    text-decoration: underline;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

/* Keyboard focus indicator. A single teal-accent outline was invisible on the
   site's many light sections (teal-accent on white/cream is ~1.9:1, below the
   3:1 WCAG 2.2 SC 1.4.11 non-text-contrast floor). Use a two-tone ring instead:
   a teal-accent inner band (3:1+ on dark sections) and a teal-deep outer band
   (3:1+ on light sections), so at least one band always meets contrast against
   any surface, and the two bands contrast with each other (5:1). The
   transparent outline keeps a focus ring in Windows High Contrast / forced
   colours, where box-shadows are dropped. */
:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--color-teal-accent), 0 0 0 4px var(--color-teal-deep);
}

/* The skip link sends focus to <main id="main" tabindex="-1">. Suppress the
   focus ring on that structural container — the user's focus context has moved
   into the content; they continue tabbing from here. */
.site-main:focus {
    outline: none;
    box-shadow: none;
}

/* ============================================================
   Base typography
   ============================================================ */

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h4 { font-size: 1.2rem; }
h5, h6 { font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem; }

p + p,
p + ul,
p + ol,
ul + p,
ol + p {
    margin-top: var(--space-sm);
}

/* ============================================================
   Layout utilities
   ============================================================ */

.wrapper-small,
.wrapper-medium,
.wrapper-large {
    width: 92%;
    margin-inline: auto;
}

.wrapper-small  { max-width: var(--wrapper-small); }
.wrapper-medium { max-width: var(--wrapper-medium); }
.wrapper-large  { max-width: var(--wrapper-large); }

.wrapper-full {
    width: 100%;
}

.flex     { display: flex; }
.wrap     { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }

/* .screen-reader-text is the class WordPress core emits on generated
   markup (pagination headings, nav labels); alias it to .sr-only so that
   text is hidden visually but available to assistive tech.
   .wpcf7 .screen-reader-response is CF7's aria-live error/success region —
   CF7's own stylesheet (which clips it) is disabled in inc/forms.php, so it
   must be clipped here or its error summary renders visibly above the form. */
.sr-only,
.screen-reader-text,
.wpcf7 .screen-reader-response {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   Background colour classes — one per tif_colour_palette() key.
   Applied to the outer <section> of every page-builder block as
   bg-{key}. Block-specific overrides (e.g. dark-bg variant of the
   hero) live in blocks.css.
   ============================================================ */

.bg-teal-dark { background: var(--color-teal-dark); color: var(--color-white); }
.bg-teal-deep { background: var(--color-teal-deep); color: var(--color-white); }
.bg-teal-pale { background: var(--color-teal-pale); color: var(--color-navy-text); }
.bg-cream     { background: var(--color-cream);     color: var(--color-navy-text); }
.bg-pale      { background: var(--color-pale);      color: var(--color-navy-text); }
.bg-white     { background: var(--color-white);     color: var(--color-navy-text); }
