/* Caratteri locali */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-700-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;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-700-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: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-800-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;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-800-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(font/ibm-plex-mono-400-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;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(font/ibm-plex-mono-400-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(font/ibm-plex-mono-500-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;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(font/ibm-plex-mono-500-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: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/instrument-sans-400-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;
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/instrument-sans-400-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: 'Instrument Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/instrument-sans-500-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;
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/instrument-sans-500-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;
}

:root {
  /* fondali */
  --bianco:            #FFFFFF;
  --bianco-freddo:     #F6F6F6;
  --grigio-chiaro:     #EDEDED;
  --bordo:             #E2E2E2;

  /* testo */
  --grafite:           #1C1C1C;
  --grigio-testo:      #5A5A5A;
  --grigio-logo:       #7F7F7F;

  /* accento */
  --bordeaux:          #951D1F;
  --bordeaux-scuro:    #7A1719;
  --altezza-barra:     72px;   /* la barra in alto e' fissa: chi ci sta sotto deve saperlo */

  /* Quanti pixel sale il marchio dell'apertura mentre si scorre (parallasse).
     La legge apertura.js; sul telefono si abbassa, vedi apertura.css. */
  --parallasse-marchio: 46px;

  --bordeaux-velo:     #F7EBEB;

  --ombra: 0 2px 40px rgba(28, 28, 28, .06);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Solo `clip`, MAI `overflow-x: hidden` qui: `hidden` rende html un contenitore di
     scorrimento e manda in pezzi `position: sticky`, cioe' l'apertura con il marchio.
     Se un browser vecchio non conosce `clip` non taglia niente, e va bene: meglio una
     barra orizzontale di troppo che l'apertura rotta. Il controllo visivo verifica
     comunque che non ci sia niente che sborda. */
  overflow-x: clip;
}

body {
  font-family: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--grafite);
  background: var(--bianco);
  line-height: 1.5;
  overflow-x: clip;
}

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

/* Il <picture> non deve creare una scatola in mezzo: senza questo i contenitori
   flessibili vedrebbero il picture invece dell'immagine e il ripiego cambierebbe
   il disegno della pagina. */
picture { display: contents; }

a {
  color: inherit;
}

/* Tipografia */
.occhiello {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bordeaux);
  margin: 0 0 0.8rem;
}

.titolo-grande {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.titolo-sezione {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

p {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--grigio-testo);
  max-width: 62ch;
  margin: 0 0 1.2rem;
}

/* Pulsanti */
.bottone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding-inline: 24px;
  border: 0;
  border-radius: 10px;
  background: var(--bordeaux);
  color: var(--bianco);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 220ms ease, transform 220ms ease;
}

.bottone--vuoto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding-inline: 24px;
  border: 1px solid var(--bordo);
  border-radius: 10px;
  background: transparent;
  color: var(--grafite);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 220ms ease, color 220ms ease, transform 220ms ease;
}

/* Sui telefoni non esiste il passaggio del mouse: il browser applica :hover al tocco
   e ce lo lascia finche' non tocchi altrove, cosi' il bottone resta acceso. Con
   (hover: hover) l'effetto e' riservato a chi ha davvero un mouse. Il ritorno al
   tocco lo da' gia' Motion, col gesto premuto attaccato in telaio.js. */
@media (hover: hover) {
  .bottone:hover {
    background: var(--bordeaux-scuro);
    transform: translateY(-2px);
  }

  /* Il background va ridichiarato qui, e non basta quello di .bottone--vuoto.
     .bottone:hover pesa 0,2,0 e batte .bottone--vuoto che pesa 0,1,0: senza questa
     riga il bottone vuoto si riempie di bordeaux scuro mentre la scritta diventa
     bordeaux, cioe' rosso su rosso. Misurato il 2026-09-13 su nove bottoni. */
  .bottone--vuoto:hover {
    background: transparent;
    border-color: var(--bordeaux);
    color: var(--bordeaux);
    transform: translateY(-2px);
  }
}

/* Ritmo delle fasce */
.fascia {
  padding-block: clamp(72px, 9vw, 130px);
}

.fascia--grigia {
  background: var(--bianco-freddo);
}

.contenuto {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* Pennellata */
.fascia-foto {
  position: relative;
  overflow: hidden;
}

/* L'altezza della fascia si lega alla LARGHEZZA, non all'altezza dello schermo:
   con vh una finestra molto alta la fa esplodere. */
.fascia-foto--media { height: clamp(300px, 42vw, 560px); }
.fascia-foto--alta  { height: clamp(360px, 54vw, 680px); }

/* Testo solo per chi legge con la sintesi vocale */
.solo-lettori {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.fascia-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pennellate-sorgente {
  position: absolute;
}

.pennellata {
  position: absolute;
  left: 0;
  width: 100%;
  height: clamp(38px, 5vw, 78px);
  display: block;
  fill: var(--bianco);
  pointer-events: none;
  z-index: 1;
  transition: transform 900ms cubic-bezier(.16, 1, .3, 1);
}

.pennellata--alto {
  top: 0;
  transform: translateY(0);
}

.pennellata--basso {
  bottom: 0;
  transform: translateY(0) scaleY(-1);
}

.fascia-foto.visibile .pennellata--alto {
  transform: translateY(-14px);
}

.fascia-foto.visibile .pennellata--basso {
  transform: translateY(14px) scaleY(-1);
}

/* Riduzione movimento */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pennellata,
  .fascia-foto.visibile .pennellata,
  .bottone,
  .bottone--vuoto {
    transition: none;
  }

  .pennellata--alto,
  .fascia-foto.visibile .pennellata--alto {
    transform: translateY(-14px);
  }

  .pennellata--basso,
  .fascia-foto.visibile .pennellata--basso {
    transform: translateY(14px) scaleY(-1);
  }
}
