/* ============ Font: Manrope self-hosted (variabile 200–800) ============ */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0;
}

/* ============ Variabili e reset ============ */
:root {
  --dark: #0e0e0e;
  --light: #f5f5f5;
  --accent: #fe370f;
  --peach: #ffe2db;
  --off-white: #fffbfa;
  --gray: #c2c2c2;
  --container: 1100px;
  --pad: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--light);
  color: var(--dark);
}

img { max-width: 100%; height: auto; display: block; }

/* ============ Tipografia fluida (360px → 1440px) ============ */
h1 {
  font-size: clamp(44px, 27px + 4.8vw, 96px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(30px, 21px + 2.4vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h3 {
  font-size: clamp(22px, 19px + 0.9vw, 32px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h4 {
  font-size: clamp(18px, 17px + 0.4vw, 22px);
  font-weight: 400;
  line-height: 1.3;
}
p {
  font-size: clamp(16px, 15px + 0.3vw, 19px);
  font-weight: 400;
  line-height: 1.6;
}

/* ============ Accessibilità ============ */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: 0; left: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--dark);
  color: var(--light);
  text-decoration: none;
  transform: translateY(-120%);
}
.skip-link:focus { transform: translateY(0); }

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

/* ============ Layout ============ */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Su desktop il container occupa il 90% della finestra */
@media (min-width: 821px) {
  .container {
    max-width: none;
    width: 90%;
    padding-inline: 0;
  }
}

.section { padding-block: clamp(56px, 9vw, 130px); }

.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--off-white);
  background: var(--dark);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.btn {
  display: inline-block;
  padding: 16px 34px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--off-white);
  font-size: clamp(17px, 16px + 0.3vw, 20px);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.btn:hover { background: var(--dark); }

/* ============ Header fixed: trasparente sulla hero nera, chiaro dopo ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  color: var(--light);
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Stato dopo la hero (classe .scrolled via JS): fondo chiaro, testo scuro */
.site-header.scrolled {
  background: color-mix(in srgb, var(--light) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--dark);
  box-shadow: 0 1px 0 rgb(14 14 14 / 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

/* Logo: firma SVG bianca; sull'header chiaro viene invertita in nero */
.logo { display: inline-flex; }

.logo img {
  display: block;
  width: 150px;
  height: auto;
  transition: filter 0.25s ease;
}

.site-header.scrolled .logo img { filter: invert(1); }

.site-nav { display: flex; gap: 4px; }

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: currentColor;
  font-weight: 600;
  font-size: 15px;
}
.site-nav a:hover { background: rgb(245 245 245 / 0.12); }
.site-header.scrolled .site-nav a:hover { background: var(--peach); }

@media (max-width: 700px) {
  .site-nav { display: none; } /* monopagina: su mobile si scorre e basta */
}

/* ============ Hero (fullscreen nera, ritratto centrale) ============ */
/* Il wrapper è alto 200vh: la hero resta "incollata" (sticky) per il primo
   schermo di scroll, durante il quale il JS fa apparire le scritte.
   Finita l'apparizione, la pagina riprende a scorrere normalmente. */
.hero-wrap { height: 200vh; }

.hero {
  position: sticky;
  top: 0;
  height: 100svh;
  background: var(--dark);
  color: var(--light);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding-block: 90px 70px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(20px, 3vw, 56px);
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

@media (min-width: 821px) {
  .hero-inner {
    max-width: none;
    width: 90%;
    padding-inline: 0;
  }
}

/* Stato iniziale delle scritte: le rende visibili il JS durante lo scroll.
   Senza JS o con "riduci movimento" attivo restano sempre visibili. */
.js-fx .hero-claim,
.js-fx .hero-name {
  opacity: 0;
  transform: translateY(30px);
  will-change: opacity, transform;
}

.hero-photo { margin-inline: auto; }

.hero-photo img {
  height: min(78vh, 760px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.hero-claim,
.hero-name {
  font-size: clamp(22px, 18px + 1.2vw, 36px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.hero-claim { text-align: right; }
.hero-name { text-align: left; }

.hero-name .hero-role {
  display: block;
  margin-top: 10px;
  font-size: clamp(14px, 13px + 0.3vw, 17px);
  font-weight: 500;
  color: var(--gray);
}

/* Indicatore di scroll: linea verticale con punto che scende */
.hero-scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 64px;
  background: rgb(245 245 245 / 0.25);
}

.hero-scroll::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--light);
  transform: translateX(-50%);
  animation: hero-scroll-dot 2.2s ease-in-out infinite;
}

@keyframes hero-scroll-dot {
  0%   { top: 0; opacity: 0; }
  25%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { top: calc(100% - 10px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll::after { animation: none; top: calc(100% - 10px); }
}

@media (max-width: 820px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }
  .hero-claim, .hero-name { text-align: center; }
  .hero-photo img { height: 52vh; }
  /* Su mobile: claim sopra la foto, nome sotto */
  .hero-claim { order: 1; }
  .hero-photo { order: 2; }
  .hero-name { order: 3; }
}

/* ============ Storia ============ */
.storia { background: var(--off-white); }

.storia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  margin-top: clamp(28px, 4vw, 56px);
}

.storia-testo { display: grid; gap: 20px; max-width: 560px; }

.storia-img { border-radius: 20px; overflow: hidden; position: sticky; top: 100px; }

@media (max-width: 820px) {
  .storia-grid { grid-template-columns: 1fr; }
  .storia-img { position: static; }
}

/* ============ Metodo ============ */
.metodo { background: var(--peach); }

.metodo-lista {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
  margin-top: clamp(28px, 4vw, 56px);
  padding: 0;
  list-style: none;
  counter-reset: domanda;
}

.metodo-lista li {
  background: var(--off-white);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 36px);
  counter-increment: domanda;
}

.metodo-lista li::before {
  content: "0" counter(domanda);
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

.metodo-coda { margin-top: clamp(28px, 4vw, 56px); max-width: 640px; }

@media (max-width: 820px) {
  .metodo-lista { grid-template-columns: 1fr; }
}

/* ============ MB Design ============ */
.mbdesign { background: var(--dark); color: var(--light); }

.mbdesign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.mbdesign-testo { display: grid; gap: 20px; }

.mbdesign-img { border-radius: 20px; overflow: hidden; }

.mbdesign .btn { justify-self: start; margin-top: 12px; }

@media (max-width: 820px) {
  .mbdesign-grid { grid-template-columns: 1fr; }
}

/* ============ Contatti ============ */
.contatti-box {
  display: grid;
  gap: 18px;
  max-width: 640px;
}

.contatti-dati {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  font-size: clamp(18px, 16px + 0.7vw, 24px);
  font-weight: 700;
}

.contatti-dati a { color: var(--dark); text-decoration: none; }
.contatti-dati a:hover { color: var(--accent); }

/* ============ Footer ============ */
.site-footer {
  background: var(--dark);
  color: var(--gray);
  padding-block: 32px;
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

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

/* ============ Banner cookie ============ */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 90;
  max-width: 560px;
  margin-inline: auto;
  background: var(--dark);
  color: var(--light);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgb(14 14 14 / 0.4);
  display: grid;
  gap: 14px;
}

#cookie-banner[hidden] { display: none; }

#cookie-banner p { font-size: 15px; line-height: 1.5; }

#cookie-banner a { color: var(--peach); }

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
}

.cookie-btn--ghost {
  background: transparent;
  color: var(--light);
  border: 1px solid rgb(245 245 245 / 0.4);
}

.cookie-btn--ghost:hover { border-color: var(--light); }

/* ============ Pagine legali (privacy / cookie policy) ============ */
.legal-page {
  padding-block: 140px 80px;
}

.legal-page .container { max-width: 800px; }

.legal-page h1 { font-size: clamp(34px, 24px + 2.6vw, 64px); margin-bottom: 24px; }

.legal-body { display: grid; gap: 16px; }

.legal-body h2 {
  font-size: clamp(22px, 19px + 0.9vw, 30px);
  margin-top: 24px;
}

.legal-body h3 {
  font-size: clamp(18px, 17px + 0.4vw, 22px);
  margin-top: 8px;
}

.legal-body ul { padding-left: 22px; display: grid; gap: 6px; }

.legal-body a { color: var(--accent); }

.legal-updated { color: rgb(14 14 14 / 0.55); font-size: 14px; margin-top: 16px; }
