/* ═══════════════════════════════════════════════════════════════════════════
   Emploi — the /legal index page.

   A fork, not a refactor. `style.css` is shared with terms.html, privacy.html
   and deletion.html, which are byte-pinned; restyling it would change how
   those three render without failing the byte-identity test. This file is
   loaded by legal.html alone, so the index — the page the landing footer
   actually links to — can join the landing page's design system while the
   three documents stay exactly as they are.

   Tokens are duplicated from landing.css rather than @import-ed: one HTTP
   request instead of two on a page that is three screens long, and the two
   files are free to diverge if the documents ever need something the landing
   page does not have. If a brand value changes, change it in both.
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 400 900;
    font-stretch: 90% 115%;
    font-display: swap;
    src: url('/assets/fonts/archivo-emploi-var.woff2') format('woff2');
}

:root {
    --signal: #F95B04;
    --signal-hot: #F7931E;
    --cyan: #2AD9EC;

    --ink: #0E0906;
    --ink-2: #17100B;
    --ink-3: #241811;
    --ink-4: #3A281D;

    --bone: #F5EFEA;
    --bone-dim: #C0B3A8;
    --on-signal: #180C05;

    --rule: rgba(245, 239, 234, 0.14);
    --rule-strong: rgba(245, 239, 234, 0.28);

    --t-h1: clamp(2.5rem, 6vw, 3.5rem);
    --t-h2: clamp(1.5rem, 3vw, 2rem);
    --t-h3: clamp(1.25rem, 2.1vw, 1.5rem);
    --t-lede: clamp(1.0625rem, 1.7vw, 1.3125rem);
    --t-body: clamp(1rem, 1.05vw, 1.0625rem);
    --t-small: 0.9375rem;
    --t-micro: 0.8125rem;

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

    --r-xs: 4px;
    --r-sm: 6px;
    --r-pill: 999px;

    --shell: 940px;
    --gutter: clamp(1.25rem, 4vw, 3rem);

    --e-soft: cubic-bezier(0.33, 1, 0.68, 1);

    color-scheme: dark;
}

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

html {
    /* No px root — see landing.css. It would pin every rem and discard the
       reader's own default-size preference. */
    -webkit-text-size-adjust: 100%;
    background: var(--ink);
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--bone);
    font-family: 'Archivo', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: var(--t-body);
    line-height: 1.6;
    font-synthesis-weight: none;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 800;
    font-stretch: 108%;
    letter-spacing: -0.028em;
    line-height: 1.05;
    text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--signal); color: var(--on-signal); }

:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 3px;
    border-radius: var(--r-xs);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--ink);
    color: var(--bone);
    padding: var(--s-3) var(--s-5);
    font-weight: 700;
}

.skip-link:focus { left: var(--s-3); top: var(--s-3); }

/* ── Masthead — the landing page's, exactly ─────────────────────────────── */

.site-header {
    background: var(--ink);
    border-bottom: 1px solid var(--ink-3);
}

.site-header .inner {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    min-height: 68px;
    padding-block: var(--s-3);
}

/* The drawn wordmark, not the name set in the body face — the same call the
   landing masthead makes. */
.site-header .logo {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}

.site-header .logo img {
    width: clamp(76px, 8vw, 92px);
    height: auto;
    flex: none;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: clamp(var(--s-3), 2.2vw, var(--s-5));
}

.site-header nav a {
    text-decoration: none;
    font-size: var(--t-micro);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--bone-dim);
    padding-block: var(--s-1);
    border-bottom: 2px solid transparent;
    transition: color 0.2s var(--e-soft), border-color 0.2s var(--e-soft);
}

.site-header nav a:hover {
    color: var(--bone);
    border-bottom-color: var(--signal);
}

/* ── Page ───────────────────────────────────────────────────────────────── */

main {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
    padding-block: clamp(var(--s-7), 7vw, 5.5rem) clamp(var(--s-7), 6vw, var(--s-8));
}

main h1 {
    font-size: var(--t-h1);
    font-weight: 900;
    font-stretch: 112%;
    letter-spacing: -0.035em;
}

main > .tagline {
    margin-top: var(--s-4);
    font-size: var(--t-lede);
    line-height: 1.5;
    color: var(--bone-dim);
    max-width: 56ch;
}

main > .tagline a {
    color: var(--bone);
    text-decoration: underline;
    text-underline-offset: 3px;
}

main h2 {
    margin-top: clamp(var(--s-7), 6vw, var(--s-8));
    font-size: var(--t-h2);
    font-weight: 900;
}

/* ── The three documents ────────────────────────────────────────────────
   Ruled rows, not a card grid. Three same-sized bordered boxes with a
   heading and a line of text is the identical-card-grid pattern; these are
   three links in a list, and a list is what they are. */

.doc-list {
    margin-top: clamp(var(--s-6), 5vw, var(--s-7));
    border-top: 1px solid var(--rule-strong);
}

.doc-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: var(--s-2) var(--s-5);
    padding-block: clamp(var(--s-5), 3vw, var(--s-6));
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    transition: border-color 0.2s var(--e-soft);
}

.doc-list a:hover { border-bottom-color: var(--signal); }

.doc-list h3 {
    font-size: var(--t-h3);
    transition: color 0.2s var(--e-soft);
}

.doc-list a:hover h3 { color: var(--signal-hot); }

.doc-list p {
    grid-column: 1;
    margin-top: var(--s-1);
    font-size: var(--t-small);
    line-height: 1.6;
    color: var(--bone-dim);
    max-width: 62ch;
}

.doc-list .go {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: var(--t-micro);
    font-weight: 800;
    color: var(--signal);
    white-space: nowrap;
}

/* ── Version note ───────────────────────────────────────────────────────
   A bordered note, not a left-stripe callout. A 4px coloured bar down one
   side of a box is decoration standing in for hierarchy. */

.callout {
    margin-top: clamp(var(--s-6), 4vw, var(--s-7));
    padding: var(--s-5);
    background: var(--ink-2);
    border: 1px solid var(--ink-3);
    border-radius: var(--r-sm);
    font-size: var(--t-small);
    line-height: 1.6;
    color: var(--bone-dim);
}

.callout strong { color: var(--bone); font-weight: 800; }

/* ── Contact table ──────────────────────────────────────────────────────── */

table {
    width: 100%;
    margin-top: var(--s-5);
    border-collapse: collapse;
    font-size: var(--t-small);
}

th, td {
    text-align: left;
    padding: var(--s-3) var(--s-4) var(--s-3) 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: baseline;
}

th {
    font-size: var(--t-micro);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--bone-dim);
    border-bottom-color: var(--rule-strong);
}

td { color: var(--bone-dim); }

td a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

td a:hover { color: var(--bone); }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--ink-3);
    background: var(--ink);
}

.site-footer > * {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.site-footer {
    padding-block: clamp(var(--s-6), 4vw, var(--s-7));
    font-size: var(--t-micro);
    color: var(--bone-dim);
}

.site-footer p { margin-block: var(--s-2); }

.site-footer a {
    color: var(--bone-dim);
    text-decoration: none;
    padding-block: var(--s-2);
}

.site-footer p:first-child a {
    display: inline-block;
    min-height: 24px;
}

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

.site-footer p:last-child a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 560px) {
    .doc-list a { grid-template-columns: minmax(0, 1fr); }

    /* Source order puts the affordance before the description so it can sit in
       the second column on wide screens. Stacked, that reads heading → Read →
       description, which interrupts the sentence; `order` moves it last
       without changing the markup. */
    .doc-list .go {
        grid-column: 1;
        grid-row: auto;
        order: 1;
        margin-top: var(--s-2);
    }

    table, thead, tbody, tr, th, td { display: block; }
    thead { display: none; }
    tr { padding-block: var(--s-3); border-bottom: 1px solid var(--rule); }
    th, td { border: 0; padding: 0; }
    td:first-child {
        font-size: var(--t-micro);
        font-weight: 800;
        color: var(--bone);
        margin-bottom: var(--s-1);
    }
}

/* ── Print ──────────────────────────────────────────────────────────────── */

@media print {
    .site-header, .site-footer { display: none; }
    body { background: #fff; color: #000; }
    main { max-width: 100%; }
    a { color: #000; }
}
