/* Design tokens and base layer for the whole site. Sections consume these variables and never declare raw hex.
   Colour is scoped by band: wrap a section in .band--dark or .band--light and every component adapts. */

:root {
    --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    --text-2xs: 0.75rem;
    --text-xs: 0.8125rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-md: 1.125rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-3xl: clamp(2rem, 4vw, 2.5rem);
    --text-4xl: clamp(2.5rem, 6vw, 3.5rem);
    --text-5xl: clamp(3rem, 8vw, 4.5rem);

    --lh-display: 1.08;
    --lh-heading: 1.2;
    --lh-tight: 1.35;
    --lh-body: 1.6;

    --track-display: -0.035em;
    --track-heading: -0.02em;
    --track-body: 0;
    --track-label: 0.12em;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;
    --space-10: 8rem;

    --section-y: clamp(4rem, 9vw, 8rem);
    --header-h: 6.25rem;
    --container: none;
    --container-narrow: 68ch;
    --gutter: 10%;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(18, 17, 14, 0.06);
    --shadow-md: 0 8px 24px rgba(18, 17, 14, 0.08);
    --shadow-lg: 0 20px 48px rgba(18, 17, 14, 0.12);

    --dur-fast: 150ms;
    --dur-base: 220ms;
    --dur-slow: 320ms;
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);

    --z-base: 0;
    --z-raised: 10;
    --z-sticky: 100;
    --z-overlay: 500;
    --z-modal: 1000;

    --tap-min: 44px;
    --glow: 217, 177, 98;
}

:root,
.band--dark {
    --bg: #0b0a08;
    --surface: #141310;
    --sunk: #15140f;
    --line: #1e1c18;
    --line-strong: #6b6659;
    --fg: #f4f1ea;
    --fg-muted: #cfcabf;
    --fg-dim: #9a968c;
    --accent: #d9b162;
    --accent-hover: #e6c684;
    --accent-press: #c39a4e;
    --on-accent: #0b0a08;
    --danger: #e08a6e;
    --success: #8fbf9c;
    --focus: #d9b162;
    --scrim: rgba(11, 10, 8, 0.62);
}

.band--light {
    --bg: #faf8f4;
    --surface: #ffffff;
    --sunk: #edefea;
    --line: #e2ded5;
    --line-strong: #8c8677;
    --fg: #12110e;
    --fg-muted: #4a463e;
    --fg-dim: #6b665c;
    --accent: #8a6a22;
    --accent-hover: #6e5418;
    --accent-press: #573f0f;
    --on-accent: #faf8f4;
    --danger: #a8412a;
    --success: #3f6b4c;
    --focus: #8a6a22;
    --scrim: rgba(18, 17, 14, 0.48);
}

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

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

/* Anchor targets must clear the fixed header when jumped to. */
:target,
.band[id] {
    scroll-margin-top: var(--header-h);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-body);
    letter-spacing: var(--track-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1 {
    font-size: var(--text-5xl);
    line-height: var(--lh-display);
    letter-spacing: var(--track-display);
}

h2 {
    font-size: var(--text-4xl);
    line-height: var(--lh-display);
    letter-spacing: var(--track-display);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-lg);
}

p,
ul,
ol,
dl,
figure {
    margin: 0;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color var(--dur-fast) var(--ease-out);
}

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

img {
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

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

.band {
    background: var(--bg);
    color: var(--fg);
    padding-block: var(--section-y);
}

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

.display-accent {
    font-style: italic;
    color: var(--accent);
}

.eyebrow {
    font-family: var(--font-body);
    font-size: var(--text-2xs);
    font-weight: var(--fw-medium);
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    color: var(--accent);
}

.num {
    font-variant-numeric: tabular-nums;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}


/* Page hero. Shared by the inner pages: full-bleed image, two-layer scrim, bottom-aligned
   breadcrumb, title, lede and a facts rail. */

.page-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: min(78svh, 700px);
    padding-block: calc(var(--header-h) + var(--space-6)) var(--space-8);
    overflow: hidden;
}

.page-hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--bg);
}

.page-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;
    filter: saturate(0.8) brightness(0.72);
}

.page-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to top, rgba(11, 10, 8, 0.94) 0%, rgba(11, 10, 8, 0.45) 44%, rgba(11, 10, 8, 0.1) 80%),
        linear-gradient(100deg, rgba(11, 10, 8, 0.72) 0%, rgba(11, 10, 8, 0.2) 52%, rgba(11, 10, 8, 0) 82%);
}

.page-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
}

.page-hero__title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: var(--fw-light);
    letter-spacing: -0.04em;
    line-height: 1;
}

.page-hero__lede {
    max-width: 52ch;
    font-size: var(--text-md);
    line-height: 1.7;
    color: var(--fg-muted);
}

.page-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5) var(--space-8);
    margin-top: var(--space-4);
    padding-top: var(--space-5);
    border-top: 1px solid rgba(var(--glow), 0.34);
}

.page-hero__facts div {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-1);
}

.page-hero__facts dd {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--accent);
}

.page-hero__facts dt {
    font-size: var(--text-2xs);
    color: var(--fg-muted);
}

@media (max-width: 560px) {
    .page-hero {
        min-height: min(72svh, 560px);
        padding-block: calc(var(--header-h) + var(--space-5)) var(--space-7);
    }
}


/* Breadcrumb trail. Shared by every inner page hero, so it lives in the base layer
   rather than beside whichever section happened to need it first. */

.crumbs {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-2xs);
    color: var(--fg-dim);
}

.crumbs a {
    color: var(--accent);
    text-decoration: none;
}


/* Shared buttons. These appear on pages that do not load the section stylesheet they used to
   live in, so they belong in the base layer rather than beside one section. */

.btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap-min);
    padding: var(--space-3) var(--space-5);
    background: var(--accent);
    border-radius: var(--radius-pill);
    color: var(--on-accent);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--dur-fast) var(--ease-out);
}

.btn-accent:hover {
    background: var(--accent-hover);
}

.btn-accent:active {
    background: var(--accent-press);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap-min);
    padding: var(--space-3) var(--space-5);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    color: var(--fg);
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    text-decoration: none;
    white-space: nowrap;
    transition:
        background var(--dur-fast) var(--ease-out),
        border-color var(--dur-fast) var(--ease-out),
        color var(--dur-fast) var(--ease-out);
}

.btn-outline:hover {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
}

.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    min-height: var(--tap-min);
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5);
    background: var(--fg);
    border-radius: var(--radius-pill);
    color: var(--bg);
    font-size: var(--text-2xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease-out);
}

.btn-pill:hover {
    background: var(--accent);
}

.btn-pill__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    background: var(--bg);
    border-radius: var(--radius-pill);
    color: var(--fg);
    font-size: var(--text-sm);
}

.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap-min);
    flex: 0 0 auto;
    padding: var(--space-3) var(--space-5);
    background: var(--fg);
    border-radius: var(--radius-pill);
    color: var(--bg);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--dur-fast) var(--ease-out);
}

.btn-light:hover {
    background: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(1rem);
    }

    .is-visible .reveal-up {
        opacity: 1;
        transform: translateY(0);
        transition:
            opacity 700ms var(--ease-out),
            transform 700ms var(--ease-out);
        transition-delay: var(--delay, 0ms);
    }
}

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