/*
 * Global styles for the "website" (Fairwear.org) LWR site — V2.
 * Delivered via a <link> in the site's appPage headMarkup (/resource/<cb>/websiteStylesV2),
 * because the DigitalExperience styles.css media blob does not update through sf metadata deploy.
 * Static resources DO deploy reliably, so this is the Git/CLI-managed home for the V2 design system.
 *
 * Loaded once in the document head -> :root custom properties inherit into every component,
 * and the .fwo-* chrome classes are available site-wide. Keep in sync with the FW Brandbook.
 */
/* Inter is self-hosted (SIL OFL) from the interFontV2 static resource — no Google Fonts
   dependency. Relative URL: this sheet is served from /resource/<cb>/websiteStylesV2, so
   'interFontV2' resolves to the sibling resource. One variable woff2 covers weights 100-900. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('interFontV2') format('woff2');
}

/* Bricolage Grotesque — self-hosted (SIL OFL 1.1) from the bricolageFontV2 static
   resource. Sibling to this sheet (both served from /resource/<cb>/...), so the
   relative url resolves. Variable woff2, weights 200-800 (the range the font
   ships); opsz axis is driven per-heading via font-optical-sizing: auto. */
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('bricolageFontV2') format('woff2');
}

/* --- FW.org V2 design tokens (single source; inherit across shadow boundaries) --- */
:root {
    /* Core: Fair Red ramp */
    --fwo-color-red: #ed003b;
    --fwo-color-red-hover: #c4002f;
    --fwo-color-red-dark: #990025;
    --fwo-color-red-tint: #ffe6ec;
    /* Pillars */
    --fwo-color-teal: #00aba9;
    --fwo-color-teal-dark: #007a78;
    --fwo-color-teal-tint: #e0f5f4;
    --fwo-color-accent-teal: #00aba9; /* alias: resourceViewItemV2 quote block */
    --fwo-color-plum: #6f2a5f;
    --fwo-color-plum-dark: #4e1d43;
    --fwo-color-plum-tint: #f2e9ef;
    --fwo-color-light-blue: #72b5e4;
    --fwo-color-blue-dark: #3f86bc;
    --fwo-color-blue-tint: #eaf4fb;
    --fwo-color-soft-plum: #715169;
    /* Neutrals */
    --fwo-color-ink: #111111;
    --fwo-color-text-primary: #111111;
    --fwo-color-text-secondary: #383838;
    --fwo-color-text-body: #525252;
    --fwo-color-text-muted: #737373;
    --fwo-color-border-subtle: #dedede;
    --fwo-color-border-hover: #c6c6c6;
    --fwo-color-bg-page: #ffffff;
    --fwo-color-bg-subtle: #f6f6f6;
    --fwo-color-bg-field: #ededed;
    --fwo-color-row-tint: #f4f4f4;
    /* Legacy aliases kept for grievancesV2 — do not remove */
    --fwo-color-primary: #ed003b;
    --fwo-color-primary-tint: rgba(237, 0, 59, 0.05);

    /* Resource-type colour coding: marker / label-text pairs */
    --fwo-type-approach: #00aba9;
    --fwo-type-approach-text: #007a78;
    --fwo-type-policy: #ed003b;
    --fwo-type-policy-text: #990025;
    --fwo-type-brand-guidance: #6f2a5f;
    --fwo-type-brand-guidance-text: #4e1d43;
    --fwo-type-procedure: #3f86bc;
    --fwo-type-procedure-text: #3f86bc;
    --fwo-type-tool: #111111;
    --fwo-type-tool-text: #383838;
    --fwo-type-research: #715169;
    --fwo-type-research-text: #715169;

    --fwo-font-family-display: 'Bricolage Grotesque', 'Inter', Helvetica, Arial, sans-serif;
    --fwo-font-family-body: 'Inter', Helvetica, Arial, sans-serif;

    /* Drive the SLDS/dxp components (comboboxes, search, buttons, headings) to Inter too.
       The branding set can only point its fonts at var(--dxp-g-root-font-family) (it rejects
       commas and other vars), so we own the actual stack here — loaded after the dxp
       stylesheets, so this :root override wins. */
    --dxp-g-root-font-family: 'Inter', Helvetica, Arial, sans-serif;
    --dxp-s-html-font-family: 'Inter', Helvetica, Arial, sans-serif;
    --fwo-font-size-h1: 72px;
    --fwo-font-size-h2: 24px;
    --fwo-font-size-h3: 18px;
    --fwo-font-size-body: 16px;
    --fwo-font-size-small: 14px;
    --fwo-font-size-xsmall: 12px;
    --fwo-font-weight-extrabold: 800;
    --fwo-font-weight-bold: 700;
    --fwo-font-weight-medium: 500;
    --fwo-font-weight-regular: 400;
    --fwo-font-weight-light: 300;
    --fwo-line-height-display: 1.05;
    --fwo-line-height-body: 1.5;
    --fwo-tracking-tight: -0.02em;
    --fwo-tracking-caps: 0.08em;

    --fwo-space-1: 4px;
    --fwo-space-2: 8px;
    --fwo-space-3: 12px;
    --fwo-space-4: 16px;
    --fwo-space-5: 24px;
    --fwo-space-6: 32px;
    --fwo-space-7: 48px;
    --fwo-space-8: 64px;
    --fwo-space-9: 96px;

    --fwo-border-width: 1.5px;
    --fwo-radius-pill: 999px;
    --fwo-shadow-sm: 0 2px 6px rgba(22, 19, 16, 0.08);
    --fwo-shadow-md: 0 6px 18px rgba(22, 19, 16, 0.1);
    --fwo-shadow-lg: 0 18px 44px rgba(22, 19, 16, 0.14);
    --fwo-shadow-focus: 0 0 0 3px rgba(237, 0, 59, 0.32);
    --fwo-dur-fast: 120ms;
    --fwo-dur-base: 200ms;
    --fwo-dur-slow: 360ms;
    --fwo-ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    --fwo-slant: -18deg;
    --fwo-skew-angle: -18deg; /* legacy alias */
    --fwo-clip-flag: polygon(0 0, 60% 0, 80% 100%, 0 100%);
    --fwo-clip-hero: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%);

    --fwo-max-content-width: 1200px; /* handoff --container-max */
    --fwo-grid-gap: 24px;
    --fwo-border-radius-button: 4px;
}

/* Full-bleed guard: components paint edge-to-edge bands via negative
   margin-inline (calc(50% - 50vw)); clip the overshoot at the page level so
   it can never introduce a horizontal scrollbar. Component boxes must NOT
   clip overflow-x themselves or the bands truncate at the content column. */
html,
body {
    overflow-x: clip;
}

/* Match the 2026 handoff's text rendering (tokens/base.css): grayscale
   antialiasing reads lighter on macOS than the subpixel default — without it
   the same Inter looks heavier than the design. Inherited properties, so they
   cascade from body into every shadow tree. */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* interFontV2 is InterVariable, whose opsz axis swaps in the tighter
       "Display" cut at heading sizes when optical sizing is auto. The handoff
       used non-optical Inter instances, so pin the standard text cut. */
    font-optical-sizing: none;
}

/* The website site's Experience Builder header region holds only an empty
   decorative Section (the site nav lives elsewhere), so its builder spacing
   adds ~80px of dead space above every page. Collapse it — pages carry their
   own top padding via .fwo-page. */
.header-content {
    display: none;
}

/* --- Shared page chrome (used by resourcesPageV2 + grievancesV2) --- */
.fwo-page {
    max-width: var(--fwo-max-content-width);
    margin: 0 auto;
    /* Trimmed top padding (16px) so the header sits closer to the top; sides 16px,
       bottom keeps 32px of breathing room. */
    padding: var(--fwo-space-4) var(--fwo-space-4) var(--fwo-space-6);
    box-sizing: border-box;
    font-family: var(--fwo-font-family-body);
    color: var(--fwo-color-text-primary);
}

.fwo-page__header {
    margin-bottom: var(--fwo-space-6);
}

.fwo-eyebrow {
    display: flex;
    align-items: center;
    gap: var(--fwo-space-2);
    font-family: var(--fwo-font-family-body);
    font-size: var(--fwo-font-size-small);
    font-weight: var(--fwo-font-weight-regular);
    color: var(--fwo-color-text-primary);
    letter-spacing: 0.04em;
    line-height: 17px;
    text-transform: uppercase;
    margin: 0 0 var(--fwo-space-5) 0;
}

.fwo-eyebrow__icon {
    display: inline-flex;
    color: var(--fwo-color-red);
    line-height: 0;
}

.fwo-page__head-row {
    display: grid;
    grid-template-columns: minmax(0, 526px) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.fwo-page__title {
    font-family: var(--fwo-font-family-display);
    font-optical-sizing: auto; /* Bricolage display cut at heading size (body keeps 'none') */
    font-size: 48px;
    font-weight: var(--fwo-font-weight-medium);
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--fwo-color-text-primary);
    margin: 0;
    flex-shrink: 0;
}

.fwo-page__lead {
    font-family: var(--fwo-font-family-body);
    font-size: 20px;
    font-weight: var(--fwo-font-weight-light);
    line-height: 1.24;
    color: var(--fwo-color-text-primary);
    margin: var(--fwo-space-1) 0 0 0;
    max-width: 634px;
}

@media (max-width: 768px) {
    .fwo-page__head-row {
        grid-template-columns: 1fr;
    }
}
