/*
 * Shared design tokens, colors, fonts, easing, fluid margin.
 * Single source of truth: every page links this instead of redefining
 * these vars locally. Page-specific overrides (--sp, --maxw, etc. that
 * intentionally differ per page) stay in that page's own <style> block,
 * declared after this stylesheet so they still win.
 *
 * Webfonts are self-hosted (see /fonts). Going through fonts.googleapis.com
 * cost two extra DNS+TLS handshakes and a render-blocking round trip before
 * the browser even learned which .woff2 files it needed; serving them from
 * our own origin means they start downloading as soon as this file lands.
 * Subsets: latin + latin-ext only, the site ships EN and IT.
 */

/* Archivo Black, headings (Google Fonts, self-hosted) */
@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  /* One heavy weight. Declared across the whole range so a heading set
     to 700 uses it as-is instead of the browser faking an even bolder cut. */
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/ArchivoBlack-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/ArchivoBlack-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* Archivo Expanded, Archivo at its widest (125%) and heaviest (900),
   the free stand-in for MADE Soulmaze on the biggest page titles.
   One static cut, so it is declared across all weights. */
@font-face {
  font-family: "Archivo Expanded";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/ArchivoExpandedBlack-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo Expanded";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/ArchivoExpandedBlack-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* Archivo, variable, wght 300–700 (body text) */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/Archivo-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/Archivo-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* Archivo Medium, a fixed 500 weight of Archivo for the small uppercase
   labels (eyebrows, tabs, dates, buttons). Replaced the old monospaced label font in Oct 2026. */
@font-face {
  font-family: "Archivo Medium";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/ArchivoMedium-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo Medium";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/ArchivoMedium-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  --ombra: #000000;
  --notte: #0b0b0b;
  --grafite: #1c1c1c;
  --cenere: #8a8a8a;
  --nebbia: #c9c9c9;
  --luce: #fafafa;
  --bianco: #ffffff;
  --oro: #c9a962;
  --mx: clamp(16px, 3vw, 56px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --display: "Archivo Black", "Archivo", system-ui, sans-serif;
  --display-xl: "Archivo Expanded", "Archivo Black", system-ui, sans-serif;
  --text: "Archivo", system-ui, sans-serif;
  --mono: "Archivo Medium", "Archivo", system-ui, sans-serif;
}

/*
 * Keyboard focus, site-wide (A1 / WCAG 2.4.7).
 *
 * Focus styling used to live in four places and covered six of fourteen
 * pages. On the rest a keyboard user got the UA default ring, which against
 * a near-black background is frequently invisible. Every page already links
 * this file, so the rule belongs here.
 *
 * :where() keeps specificity at zero, so any page that wants a different
 * focus treatment still wins without needing !important.
 */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 2px;
  border-radius: 2px;
}

/*
 * Skip link, injected as the first child of the header by site-chrome.js and
 * shared-header.js (A2). Off-screen until focused, so the first Tab on any
 * page offers a jump past the navigation.
 *
 * clip-path rather than display:none: the latter would take it out of the
 * accessibility tree and out of the tab order, which is the whole point.
 */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--luce);
  color: var(--ombra);
  font-family: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  transform: translateY(-120%);
  transition: transform 160ms var(--ease);
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: -4px;
}

/*
 * Reduced motion, site-wide (A3). The page fade the three shared scripts
 * inject on every navigation, and the scroll-reveal transitions, had no
 * guard outside the homepage.
 */
@media (prefers-reduced-motion: reduce) {
  body,
  body.page-leaving {
    animation: none !important;
    opacity: 1 !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/*
 * Minimum touch target, site-wide.
 *
 * Keyed on the pointer, not on a width. The per-page mobile blocks all stop at
 * 768px or 900px, which is the right boundary for a layout and the wrong one
 * for a finger: an iPad is 820px in portrait and 1024px or 1366px in landscape,
 * and gets the mouse-sized controls at every one of those. A desktop matches
 * none of this, so nothing here can reach it.
 *
 * .home-pill is declared with height: 40px in four separate page stylesheets
 * (projects, project, product, designer). min-height outranks height when it is
 * the larger of the two, so one rule here lifts all four rather than four
 * copies drifting apart later.
 */
@media (pointer: coarse) {
  .home-pill {
    min-height: 44px;
  }
  .skip-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
