/*
 * snowbec.ca — Snowbec identity (docs/design.md, shared/design/tokens.json): Poudrerie for the
 * office, Nuit de tempête for the field, Gyrophare amber only for actions, Barlow self-hosted.
 * Signature: the reflective chevron band, once, at the bottom edge of the hero.
 * Font URLs are rewritten to hashed files by build.mjs.
 */
@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/assets/fonts/barlow-latin-400-normal.b0a8ad37ac.woff2) format('woff2');
}
@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/assets/fonts/barlow-latin-500-normal.cd759df8ef.woff2) format('woff2');
}
@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(/assets/fonts/barlow-latin-600-normal.4b52ddd483.woff2) format('woff2');
}
@font-face {
    font-family: 'Barlow Semi Condensed';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(/assets/fonts/barlow-semi-condensed-latin-600-normal.f158417e92.woff2) format('woff2');
}
@font-face {
    font-family: 'Barlow Semi Condensed';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/assets/fonts/barlow-semi-condensed-latin-700-normal.fb958c8c20.woff2) format('woff2');
}

:root {
    --night: #0f1c2e;
    --night-raised: #162740;
    --night-line: #24384f;
    --powder: #f3f6f9;
    --powder-raised: #ffffff;
    --powder-line: #dce3ea;
    --ink: #0f1c2e;
    --ink-muted: #4a5a6e;
    --snow: #eaf0f6;
    --snow-muted: #9fb0c3;
    --beacon: #f2a516;
    --beacon-pressed: #d98e07;
    --beacon-ink: #1a1204;
    --ice: #6fb7dd;
    --ice-ink: #1c6894;
    --zone-clear: #38c3f2;
    --zone-deposit: #b98cf5;
    --zone-avoid: #e0483e;
    --font-sans: 'Barlow', ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Barlow Semi Condensed', 'Barlow', ui-sans-serif, system-ui, sans-serif;
    --radius: 10px;
    --gutter: 16px;
    color-scheme: light;
}

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

html {
    /* Under a short page, the space after the footer continues the footer. */
    background: var(--night-raised);
    color: var(--ink);
    font: 400 1.0625rem/1.6 var(--font-sans);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    background: var(--powder);
    overflow-wrap: break-word;
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.005em;
    margin: 0 0 0.5em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.25rem, 1.3rem + 3.6vw, 3.75rem);
    line-height: 1.02;
}

h2 {
    font-size: clamp(1.875rem, 1.35rem + 2.1vw, 2.75rem);
}

h3 {
    font-size: 1.375rem;
    font-weight: 600;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--ice-ink);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--ink);
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 3px solid var(--ice-ink);
    outline-offset: 3px;
    border-radius: 3px;
}

#main:focus {
    outline: none;
}

/* Visually hidden, still read (the « : » between a step's moment and its title). */
.vh {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.wrap {
    width: min(100% - 2 * var(--gutter), 1200px);
    margin-inline: auto;
}

.narrow {
    max-width: 46rem;
}

.muted {
    color: var(--ink-muted);
}

.skip {
    position: absolute;
    left: var(--gutter);
    top: -80px;
    z-index: 10;
    padding: 10px 14px;
    background: var(--beacon);
    color: var(--beacon-ink);
    font-weight: 600;
    border-radius: 6px;
}

.skip:focus {
    top: 10px;
}

/* ------------------------------------------------------------------ header */

.site-header {
    background: var(--night);
    color: var(--snow);
    border-bottom: 1px solid var(--night-line);
}

.skip:focus-visible,
.site-header :focus-visible,
.hero :focus-visible,
.section-night :focus-visible,
.contact :focus-visible,
.site-footer :focus-visible {
    outline-color: var(--ice);
}

.header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 16px;
    min-height: 64px;
}

.wordmark,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--snow);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

.wordmark:hover {
    color: #fff;
}

.mark {
    width: 34px;
    height: 34px;
    flex: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    color: var(--snow);
    text-decoration: none;
    white-space: nowrap;
    font-weight: 500;
    display: inline-block;
    padding: 10px 0;
}

.nav a:hover {
    color: #fff;
    text-decoration: underline;
}

.nav-anchors {
    display: none !important;
}

.nav-lang {
    color: var(--snow-muted) !important;
}

@media (min-width: 1024px) {
    .nav-anchors {
        display: flex !important;
    }
    .nav-actions {
        padding-left: 24px !important;
        border-left: 1px solid var(--night-line);
    }
}

/* ------------------------------------------------------------------ buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 10px 20px;
    /* A transparent border: in forced colours (Windows contrast themes) it outlines the button. */
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1875rem;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--beacon);
    color: var(--beacon-ink);
}

.btn-primary:hover {
    background: var(--beacon-pressed);
    color: var(--beacon-ink);
}

.btn-ghost {
    color: var(--snow);
    border-color: var(--snow-muted);
}

.btn-ghost:hover {
    color: #fff;
    border-color: var(--snow);
}

.btn-ghost-light {
    color: var(--ink);
    border-color: var(--ink-muted);
}

.btn-ghost-light:hover {
    color: var(--ink);
    border-color: var(--ink);
}

/* ------------------------------------------------------------------ hero */

.hero {
    position: relative;
    background: var(--night);
    color: var(--snow);
    padding-top: clamp(40px, 6vw, 88px);
}

.hero-grid {
    display: grid;
    gap: 40px;
    padding-bottom: clamp(40px, 5vw, 64px);
}

.hero h1 {
    color: #fff;
    max-width: 17ch;
}

.lead {
    font-size: 1.1875rem;
    color: var(--snow);
    max-width: 36rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 20px;
}

.pilot {
    color: var(--snow-muted);
    margin: 0;
}

/* Phones: the screenshot comes sooner, the two actions share one width. */
@media (max-width: 599px) {
    .hero {
        padding-top: 28px;
    }
    .actions .btn {
        flex: 1 1 100%;
    }
}

/* The reflective band: amber and night chevrons, as on the back of a tractor. */
.band {
    height: 18px;
    background:
        repeating-linear-gradient(-45deg, var(--beacon) 0 14px, var(--night) 14px 28px) left / 50% 100% no-repeat,
        repeating-linear-gradient(45deg, var(--beacon) 0 14px, var(--night) 14px 28px) right / 50% 100% no-repeat;
}

@media (min-width: 960px) {
    .hero-grid {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        align-items: center;
        gap: 56px;
    }
}

/* ------------------------------------------------------------------ figures */

.figure {
    margin: 0;
    min-width: 0;
}

.figure picture {
    display: block;
}

.shot {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--powder-line);
    background: var(--night);
}

.hero .shot,
.section-night .shot {
    border-color: var(--night-line);
}

.shot-portrait {
    width: auto;
    max-width: min(300px, 78vw);
    margin-inline: auto;
    border-radius: 22px;
    border: 6px solid var(--night);
    box-sizing: content-box;
}

figcaption {
    margin-top: 10px;
    font-size: 0.875rem;
    color: var(--ink-muted);
}

.hero figcaption,
.section-night figcaption {
    color: var(--snow-muted);
}

.step-portrait figcaption {
    text-align: center;
}

/* ------------------------------------------------------------------ sections */

.section {
    padding-block: clamp(56px, 8vw, 104px);
}

.section-raised {
    background: var(--powder-raised);
    border-block: 1px solid var(--powder-line);
}

.section-night {
    background: var(--night);
    color: var(--snow);
}

.section-night h2,
.section-night h3 {
    color: #fff;
}

.section-night a {
    color: var(--ice);
}

.section-lead {
    font-size: 1.1875rem;
    color: var(--ink-muted);
    max-width: 40rem;
    margin-bottom: 40px;
}

.section-night .section-lead {
    color: var(--snow-muted);
}

.small-title {
    font-size: 1.125rem;
    margin-top: 32px;
}

/* Steps: a real sequence, so numbered. */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: clamp(56px, 7vw, 96px);
}

.step {
    display: grid;
    gap: 24px;
}

.step-text {
    max-width: 34rem;
}

.step h3 {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.step-when {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ice-ink);
}

.step-n {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--night);
    color: var(--snow);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.step-what {
    font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.125rem);
    font-weight: 700;
}

@media (min-width: 960px) {
    .step {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: 56px;
        align-items: center;
    }
    .step-portrait {
        grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
        align-items: start;
    }
}

/* Two captures in one step: the phone, then the report. */
.step-figs {
    display: grid;
    gap: 32px;
    min-width: 0;
}

@media (min-width: 600px) {
    .step-figs {
        grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
        align-items: start;
        gap: 24px;
    }
    .step-figs .shot-portrait {
        /* content-box: the 6px frame is outside the width. */
        max-width: calc(100% - 12px);
    }
}

/* Plan du site: on phones the photo comes right after the title, before the legend. */
.plan-grid,
.office-grid {
    display: grid;
    gap: 40px;
}

.plan-grid {
    grid-template-areas: 'head' 'fig' 'body';
    gap: 0;
}

.plan-head {
    grid-area: head;
}

.plan-grid .figure {
    grid-area: fig;
    margin-bottom: 32px;
}

.plan-body {
    grid-area: body;
}

@media (min-width: 960px) {
    .plan-grid,
    .office-grid {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        column-gap: 56px;
        align-items: start;
    }
    .plan-grid {
        grid-template-areas: 'head fig' 'body fig';
        grid-template-rows: auto 1fr;
    }
    .plan-grid .figure {
        margin-bottom: 0;
    }
    .plan-grid .figure,
    .office-grid .figure {
        position: sticky;
        top: 24px;
    }
}

.legend {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    gap: 12px;
}

.legend li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* Swatches drawn like the map: the same colour, texture and night casing. */
.swatch {
    flex: none;
    width: 36px;
    height: 26px;
    border-radius: 4px;
    margin-top: 1px;
    box-shadow: 0 0 0 2px var(--night);
}

.swatch-clear {
    background: color-mix(in srgb, var(--zone-clear) 45%, #fff);
    border: 2px solid var(--zone-clear);
}

.swatch-deposit {
    background:
        radial-gradient(circle, var(--zone-deposit) 1.6px, transparent 2px) 0 0 / 7px 7px,
        color-mix(in srgb, var(--zone-deposit) 18%, #fff);
    border: 2px dashed var(--zone-deposit);
}

@media (forced-colors: active) {
    .swatch {
        forced-color-adjust: none;
    }
}

.swatch-avoid {
    background:
        repeating-linear-gradient(45deg, var(--zone-avoid) 0 2px, transparent 2px 6px),
        color-mix(in srgb, var(--zone-avoid) 14%, #fff);
    border: 2px solid var(--zone-avoid);
}

/* Drivers */
.drivers-grid {
    display: grid;
    gap: 40px;
}

.features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 22px;
}

.features li {
    padding-left: 18px;
    border-left: 3px solid var(--night-line);
}

.features h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.features p {
    margin: 0;
    color: var(--snow);
}

@media (min-width: 960px) {
    .drivers-grid {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        gap: 56px;
        align-items: start;
    }
}

/* Lists with a check */
.checks {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    gap: 14px;
}

.checks li {
    position: relative;
    padding-left: 30px;
}

.checks li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.45em;
    width: 14px;
    height: 8px;
    border-left: 3px solid var(--ice-ink);
    border-bottom: 3px solid var(--ice-ink);
    transform: rotate(-45deg);
}

.two-col {
    display: grid;
    gap: 56px;
}

@media (min-width: 900px) {
    .two-col {
        grid-template-columns: 1fr 1fr;
        gap: 72px;
    }
}

.towns {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.towns li {
    padding: 4px 12px;
    border: 1px solid var(--powder-line);
    border-radius: 999px;
    background: var(--powder);
    font-weight: 500;
}

/* FAQ (details/summary: no JavaScript) */
.qa {
    border-bottom: 1px solid var(--powder-line);
}

.qa:first-of-type {
    border-top: 1px solid var(--powder-line);
}

.qa summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 40px 18px 0;
    position: relative;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.3;
}

.qa summary::-webkit-details-marker {
    display: none;
}

.qa summary::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: translateY(-70%) rotate(45deg);
}

.qa[open] summary::after {
    transform: translateY(-30%) rotate(-135deg);
}

.qa-a {
    padding-bottom: 12px;
    max-width: 40rem;
}

/* Contact */
.contact {
    background: var(--night);
    color: var(--snow);
    padding-block: clamp(48px, 6vw, 80px);
}

.contact h2 {
    color: #fff;
}

.contact-row {
    display: grid;
    gap: 16px;
    align-items: center;
}

.contact-row p:last-child {
    margin: 0;
}

@media (min-width: 900px) {
    .contact-row {
        grid-template-columns: 1fr auto;
        gap: 40px;
    }
}

/* Footer */
.site-footer {
    background: var(--night-raised);
    color: var(--snow-muted);
    padding-block: 40px;
    font-size: 0.9375rem;
}

.site-footer a {
    color: var(--snow);
}

.footer-grid {
    display: grid;
    gap: 24px;
}

.footer-brand {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.footer-grid p {
    margin: 0 0 6px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.footer-links a {
    display: inline-block;
    padding: 4px 0;
}

.credits {
    font-size: 0.8125rem;
}

@media (min-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .credits {
        grid-column: 1 / -1;
        border-top: 1px solid var(--night-line);
        padding-top: 20px;
    }
}

/* Simple pages (privacy, 404) */
.page {
    padding-block: clamp(40px, 6vw, 80px);
}

.page h1 {
    font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
}

.page h2 {
    font-size: 1.5rem;
    margin-top: 1.4em;
}

.privacy-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.standalone a {
    display: inline-block;
    padding-block: 4px;
}

.privacy-list h2 {
    font-size: 1.25rem;
    margin: 1.2em 0 0.3em;
}

.notfound section + section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--powder-line);
}
