@font-face {
  font-family: "Montserrat";
  src: url("/assets/montserrat-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/montserrat-latin-wght-italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --carta: #f7f2ee;
  --inchiostro: #000;
  --testo: #313c42;
  --rosso: #e1080d;
  --margine: clamp(24px, 6.9vw, 100px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: var(--carta) url("/assets/carta.webp") center top / cover;
  color: var(--inchiostro);
  font-family: "Montserrat", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }

.pagina {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 35vw);
  align-items: center;
  column-gap: clamp(40px, 6vw, 100px);
  padding: clamp(40px, 6vw, 96px) var(--margine);
  max-width: 1600px;
  margin: 0 auto;
}

.logo { width: 212px; height: auto; margin-bottom: 36px; }

h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(40px, 5vw, 76px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.01em;
}
h1 em { color: var(--rosso); font-style: italic; }

.intro {
  margin: 1.6em 0 0;
  max-width: 26em;
  color: var(--testo);
  font-size: clamp(17px, 1.45vw, 21px);
  font-style: italic;
  line-height: 1.35;
}

.social { margin-top: clamp(40px, 5vw, 72px); }
.social p { margin: 0 0 18px; color: var(--testo); font-size: 17px; font-style: italic; }
.social ul { display: flex; gap: 12px; margin: 0; padding: 0; list-style: none; }
.social a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: -4px;
  color: var(--inchiostro);
  border-radius: 8px;
  transition: color .2s, transform .2s;
}
.social a:hover { color: var(--rosso); transform: translateY(-2px); }
.social a:active { transform: translateY(0) scale(.94); }
.social a:focus-visible { outline: 3px solid var(--rosso); outline-offset: 2px; }
.social svg { width: 40px; height: 40px; }

.opera { margin: 0; justify-self: center; width: 100%; max-width: 520px; }
.opera img { width: 100%; }
.opera figcaption {
  margin-top: 14px;
  color: var(--testo);
  font-size: 13px;
  font-style: italic;
  line-height: 1.35;
}
.opera-gaudenzio img { box-shadow: 0 0 0 1px rgba(0, 0, 0, .04); }

/* Variante 3: il velo si scopre col puntatore */
.velo { position: relative; }
.velo .sotto { position: absolute; left: 3%; top: 2.6%; width: 94%; height: auto; }
.velo .sopra, .velo canvas { position: relative; width: 100%; }
.velo canvas { position: absolute; inset: 0; height: 100%; touch-action: none; cursor: crosshair; }
.js-velo .velo .sopra { visibility: hidden; }
.velo.scoperto canvas { opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.opera-velata figcaption { padding: 0 2%; }

/* Entrata */
@media (prefers-reduced-motion: no-preference) {
  .testo > *, .opera { animation: sale .8s cubic-bezier(.2, .7, .2, 1) both; }
  .testo > :nth-child(2) { animation-delay: .07s; }
  .testo > :nth-child(3) { animation-delay: .14s; }
  .testo > :nth-child(4) { animation-delay: .21s; }
  .opera { animation-delay: .18s; }
  @keyframes sale { from { opacity: 0; transform: translateY(24px); } }
}

@media (max-width: 860px) {
  .pagina { grid-template-columns: 1fr; row-gap: 48px; align-content: start; }
  .logo { width: 170px; margin-bottom: 28px; }
  .opera { max-width: 440px; justify-self: start; }
  .social { margin-top: 36px; }
}
