/* ==========================================================================
   Klinger Warba Gasket Manufacturing Co. — Design System
   style.css — tokens, reset, base typography, layout primitives
   ========================================================================== */

:root {
    color-scheme: light;

    /* --- Colour -----------------------------------------------------------
       The palette is brand blue and machined greys only. Literal colour is
       reserved for identification data (see .code-chip in components.css),
       mirroring the way a gasket is colour-coded on the shop floor.        */
    --primary-color:   #004B80;   /* sampled from the KWGM logo mark */
    --primary-dark:    #003A63;
    --primary-light:   #1379C4;
    --primary-wash:    #EAF1F7;

    --dark-color:      #0A1520;   /* deep steel navy — hero + footer ground */
    --dark-color-2:    #132430;

    --light-color:     #F4F6F8;   /* cool paper, never warm cream */
    --surface:         #FFFFFF;
    --surface-sunken:  #EEF2F5;

    --text-color:      #16232E;
    --text-muted:      #5A6874;
    --text-faint:      #607079;   /* micro-labels; darkened to clear AA on
                                     white and on both sunken greys        */
    --text-invert:     #FFFFFF;

    --border-color:    #DCE3E9;
    --border-strong:   #C3CED7;
    --border-invert:   rgba(255, 255, 255, .16);

    --accent-color:    var(--primary-light);
    --secondary-color: var(--dark-color);
    --focus-ring:      #1379C4;

    /* --- Type ------------------------------------------------------------ */
    --font-display: "Archivo", "Arial Narrow", Helvetica, Arial, sans-serif;
    --font-body:    "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono:    "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

    --step--2: 0.75rem;
    --step--1: 0.8125rem;
    --step-0:  1rem;
    --step-1:  1.125rem;
    --step-2:  clamp(1.25rem, 0.6vw + 1.1rem, 1.4375rem);
    --step-3:  clamp(1.5rem, 1vw + 1.25rem, 1.875rem);
    --step-4:  clamp(1.875rem, 1.8vw + 1.4rem, 2.625rem);
    --step-5:  clamp(2.25rem, 3.4vw + 1.4rem, 4rem);

    /* --- Space ----------------------------------------------------------- */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;
    --sp-8: 64px;
    --sp-9: 96px;
    --sp-10: 128px;

    --container: 1240px;
    --container-narrow: 900px;
    --gutter: 24px;

    --radius-sm: 2px;
    --radius:    4px;
    --radius-lg: 8px;

    --shadow-sm: 0 1px 2px rgba(10, 21, 32, .06);
    --shadow:    0 2px 8px rgba(10, 21, 32, .07), 0 1px 2px rgba(10, 21, 32, .05);
    --shadow-lg: 0 12px 32px rgba(10, 21, 32, .10), 0 2px 6px rgba(10, 21, 32, .06);

    --header-h: 76px;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --dur: .28s;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* --- Headings ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    font-stretch: 112%;          /* Archivo variable width — nameplate feel */
    line-height: 1.15;
    letter-spacing: -0.012em;
    color: var(--text-color);
    margin: 0 0 var(--sp-4);
    text-wrap: balance;
}

h1 { font-size: var(--step-5); letter-spacing: -0.024em; }
h2 { font-size: var(--step-4); letter-spacing: -0.018em; }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); }
h5 { font-size: var(--step-1); }
h6 { font-size: var(--step-0); }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a {
    color: var(--primary-color);
    text-decoration-color: rgba(0, 75, 128, .32);
    text-underline-offset: 3px;
    transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
a:hover { color: var(--primary-light); text-decoration-color: currentColor; }

strong, b { font-weight: 600; }
small { font-size: var(--step--1); }

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.35em; }
li { margin-bottom: var(--sp-2); }
li:last-child { margin-bottom: 0; }
ul ul, ol ol, ul ol, ol ul { margin-top: var(--sp-2); margin-bottom: 0; }

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: var(--sp-7) 0;
}

/* --- Focus ------------------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
.on-dark :focus-visible { outline-color: #7FC4F5; }

.skip-link {
    position: absolute;
    left: var(--sp-4);
    top: -100px;
    z-index: 200;
    background: var(--primary-color);
    color: #fff;
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-4); color: #fff; }

.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;
}

/* --- Layout ------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--sp-9); }
.section--tight { padding-block: var(--sp-8); }
.section--flush-top { padding-top: 0; }
.section--sunken { background: var(--light-color); }
.section--dark {
    background: var(--dark-color);
    color: rgba(255, 255, 255, .82);
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section + .section--sunken,
.section--sunken + .section { border-top: 1px solid var(--border-color); }

.stack > * + * { margin-top: var(--sp-4); }

/* --- Eyebrow / section head -------------------------------------------- */
.eyebrow {
    font-family: var(--font-mono);
    font-size: var(--step--2);
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin: 0 0 var(--sp-3);
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: currentColor;
    flex: none;
}
/* On any dark ground the brand blue is far too dark to read — the eyebrow
   switches to the light tint of the same hue.                             */
.section--dark .eyebrow,
.on-dark .eyebrow { color: #7FC4F5; }

.section-head { max-width: 68ch; margin-bottom: var(--sp-7); }
.section-head p { color: var(--text-muted); font-size: var(--step-1); margin-bottom: 0; }
.section--dark .section-head p { color: rgba(255, 255, 255, .72); }

.lede {
    font-size: var(--step-1);
    line-height: 1.7;
    color: var(--text-muted);
}

/* --- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .site-header, .site-footer, .utility-bar, .page-nav, .cta-band, .to-top { display: none !important; }
    body { color: #000; }
}
