/* =====================================================================
   AFM Warsaw — reset, typography, layout primitives
   ===================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    background: var(--fog);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--t-body);
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

/* Interface icons from icon() in includes/functions.php: text-sized and
   sitting on the text line wherever they appear. */
.icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    vertical-align: -0.2em;
}

/* ---- Headings ------------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: var(--lh-tight);
    letter-spacing: var(--track-heading);
    color: var(--ink);
    margin: 0 0 var(--s-2);
    text-wrap: balance;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-sub); font-weight: 500; letter-spacing: 0; }

p { margin: 0 0 var(--s-2); }
p:last-child { margin-bottom: 0; }

.display {
    font-family: var(--font-display);
    font-size: var(--t-display);
    font-weight: 700;
    line-height: 1;
    letter-spacing: var(--track-display);
    margin: 0 0 var(--s-3);
    text-wrap: balance;
}

.lead {
    font-size: var(--t-body-lg);
    color: var(--graphite);
    max-width: 58ch;
}

.muted   { color: var(--graphite-soft); }
.small   { font-size: var(--t-small); }
.caption { font-size: var(--t-caption); color: var(--graphite-soft); }

/* Quiet signposting above a section heading. */
.eyebrow {
    display: block;
    font-family: var(--font-display);
    font-size: var(--t-eyebrow);
    font-weight: var(--w-eyebrow);
    text-transform: uppercase;
    letter-spacing: var(--track-eyebrow);
    color: var(--graphite-soft);
    margin: 0 0 var(--s-2);
}
.eyebrow--gold    { color: var(--gold-deep); }
.eyebrow--crimson { color: var(--crimson); }
.eyebrow--on-dark { color: rgba(255, 255, 255, 0.72); }

/* ---- Links --------------------------------------------------------- */

a {
    color: var(--navy);
    text-decoration-color: color-mix(in srgb, var(--navy) 35%, transparent);
    text-underline-offset: 3px;
    transition: color var(--dur-fast) var(--ease),
                text-decoration-color var(--dur-fast) var(--ease);
}
a:hover { color: var(--navy-deep); text-decoration-color: currentColor; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---- Layout -------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--s-3);
}
.container--text { max-width: var(--container-text); }

.section {
    position: relative;
    padding-block: var(--section-y);
}
/* Alternating fog / paper bands, as in the reference. */
.section--paper { background: var(--paper); }
.section--fog   { background: var(--fog); }
.section--navy  { background: var(--band); color: #fff; }
.section--navy h1,
.section--navy h2,
.section--navy h3 { color: #fff; }
.section--navy .lead { color: rgba(255, 255, 255, 0.78); }

.section__head {
    max-width: 62ch;
    margin-bottom: var(--s-6);
}
.section__head--center {
    margin-inline: auto;
    text-align: center;
}

.stack   { display: flex; flex-direction: column; gap: var(--s-2); }
.stack-3 { display: flex; flex-direction: column; gap: var(--s-3); }
.row     { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }

.grid { display: grid; gap: var(--s-3); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
    .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* Two-column feature split, alternating sides. */
.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-7);
    align-items: center;
}
.split--reverse > :first-child { order: 2; }
@media (max-width: 900px) {
    .split { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
    .split--reverse > :first-child { order: 0; }
}

.divider {
    height: 1px;
    background: var(--mist);
    border: 0;
    margin-block: var(--s-6);
}

/* ---- Accessibility helpers ----------------------------------------- */

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

.skip-link {
    position: absolute;
    left: var(--s-2);
    top: -100px;
    z-index: 200;
    background: var(--band);
    color: #fff;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-button);
    font-family: var(--font-display);
    font-weight: 500;
    text-decoration: none;
    transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s-2); color: #fff; }

/* ---- Papercut blobs ------------------------------------------------
   Purely decorative shapes floating behind content. Never interactive,
   never in the foreground, always below the text layer.
   ------------------------------------------------------------------- */

.blob-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.blob {
    position: absolute;
    opacity: var(--blob-opacity);
    transition: opacity var(--dur-slow) var(--ease);
}
.section > .container { position: relative; z-index: 1; }

/* ---- Print --------------------------------------------------------- */
@media print {
    .site-header, .site-footer, .blob-field, .to-top { display: none !important; }
    body { background: #fff; color: #000; }
}
