/* ============================================================================
   Home family — the shared visual identity for everything reachable from the
   crossroads: /, /it, /custom, /smart-home (and future entries). One palette, one
   type system, one header and one footer, so the entries read as a single site with
   several sub-pages. The reference is the crossroads. Differences between pages come
   from layout and content, never from palette.

   /cv and /lair are NOT part of this family — they keep their own aesthetics and do
   not load these classes.

   This file is global (linked in index.html): it carries the shared `--home-*` tokens
   and the shared chrome classes (.home-bar / .home-foot) used by the shared
   HomeHeader / HomeFooter components. Page bodies stay in each variant's scoped CSS
   but read the same `--home-*` values. Fonts come from design-tokens.css.
   ========================================================================== */
:root {
    --home-paper: #f4f1ec;        /* page ground */
    --home-paper-2: #eae6dd;      /* subtle alternate band for section rhythm */
    --home-ink: #16151a;          /* headings, strong text, the dark bar */
    --home-body: #3b3833;         /* body text (~10:1 on paper) */
    --home-muted: #6d675e;        /* labels, meta (~5.4:1 on paper) */
    --home-line: #16151a26;       /* hairlines */
    --home-line-strong: #16151a4a;
    --home-red: #c01515;          /* the single accent on light: numerals, eyebrows, links, rules */
    --home-red-hover: #9d1111;
    --home-on-red: #fffaf8;       /* text on red fills */
    --home-bar: #16151a;          /* dark top bar */
    --home-bar-ink: #f4f1ec;      /* text on the bar */
    --home-bar-muted: #b8b2a8;    /* menu links at rest on the bar */
    --home-pad-x: clamp(22px, 5vw, 72px);
}

/* ---------- Shared header (dark bar) ----------
   Desktop: a 3-column grid (wordmark | menu | language) with equal 1fr side columns,
   so the menu sits at the true centre of the bar and uses the middle width, never
   squeezed to one side. Mobile: it collapses to flex-wrap and the menu drops to its
   own row. Identical on every family page. */
.home-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: clamp(16px, 2vw, 32px); padding: clamp(18px, 2vw, 26px) var(--home-pad-x); background: var(--home-bar); color: var(--home-bar-ink); }
.home-brand { justify-self: start; font-family: var(--ed-font-display); font-weight: 700; font-size: clamp(24px, 2vw, 30px); letter-spacing: 0.02em; color: var(--home-bar-ink); text-decoration: none; }
.home-brand__dot { color: var(--home-red); }
.home-menu { justify-self: center; display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2.4vw, 40px); flex-wrap: wrap; }
.home-menu__link { font-family: var(--ed-font-body); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; color: var(--home-bar-muted); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.home-menu__link:hover { color: var(--home-bar-ink); }
.home-menu__link--current { color: var(--home-bar-ink); border-bottom-color: var(--home-red); cursor: default; }
.home-right { justify-self: end; display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.home-lang { display: flex; gap: 8px; font-weight: 600; font-size: 12px; letter-spacing: 0.14em; }
.home-lang__btn { appearance: none; border: none; font: inherit; letter-spacing: inherit; background: none; color: #9b958c; cursor: pointer; padding: 8px 12px; text-transform: uppercase; }
.home-lang__btn:hover { color: var(--home-bar-ink); }
.home-lang__btn--active { background: var(--home-bar-ink); color: var(--home-bar); cursor: default; }
@media (max-width: 760px) {
    .home-bar { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(16px, 2vw, 24px); }
    .home-brand { justify-self: auto; }
    .home-right { justify-self: auto; margin-left: auto; }
    .home-menu { justify-self: auto; order: 3; flex-basis: 100%; justify-content: flex-start; gap: 18px; }
}
@media (max-width: 600px) { .home-lang__btn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; } }

/* ---------- Shared footer (light) — practically identical on every family page,
   differing only in the short description. Name + description, contact, copyright. ---------- */
.home-foot { border-top: 1px solid var(--home-line); background: var(--home-paper); padding: clamp(28px, 3vw, 40px) var(--home-pad-x); display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: baseline; justify-content: space-between; }
.home-foot__id { display: flex; flex-direction: column; gap: 6px; max-width: 46ch; }
.home-foot__name { font-family: var(--ed-font-display); font-weight: 700; font-size: clamp(20px, 2vw, 26px); letter-spacing: 0.01em; color: var(--home-ink); }
.home-foot__note { margin: 0; color: var(--home-body); font-size: 15px; line-height: 1.5; }
.home-foot__contact { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.home-foot__contact a { color: var(--home-red); text-decoration: none; font-size: 15px; font-weight: 600; }
.home-foot__contact a:hover { color: var(--home-red-hover); }
.home-foot__copy { color: var(--home-muted); font-size: 14px; flex-basis: 100%; }

/* ---------- Family-wide details ---------- */
.home ::selection { background: var(--home-red); color: var(--home-on-red); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.home-brand, .home-menu__link, .home-lang__btn, .home-call, .home-foot__contact a { transition: color .18s cubic-bezier(.2,.7,.2,1), background .18s cubic-bezier(.2,.7,.2,1), border-color .18s cubic-bezier(.2,.7,.2,1); }
.home-brand:hover { color: #fff; }
.home-lang__btn:active, .home-call:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .home-brand, .home-menu__link, .home-lang__btn, .home-call, .home-foot__contact a { transition: none; } }
