/* =========================================================
   EffettOttico — foglio di stile (minimal luminoso)
   1. Font            6. Chi siamo          11. Contatti e form
   2. Variabili       7. Servizi            12. Footer e pagine interne
   3. Base            8. Prodotti, marchi   13. Effetti di scorrimento (html.fx)
   4. Header e menu   9. Convenzioni
   5. Apertura        10. Galleria
   ========================================================= */

/* ---------- 1. Font (licenza SIL OFL, file in assets/fonts) ---------- */
@font-face {
  font-family: "Italiana";
  src: url("../fonts/italiana-regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

/* ---------- 2. Variabili ---------- */
:root {
  --c-white: #FFFFFF;
  --c-fog: #F2F4F5;        /* nebbia */
  --c-riflesso: #E8F0F3;   /* azzurro chiarissimo, dal blu del logo */
  --c-ink: #14232B;        /* inchiostro */
  --c-graphite: #56666E;
  --c-lente: #189BC6;      /* il blu del logo */
  --c-lente-deep: #2E7490; /* versione leggibile per testi e link */
  --c-rosa: #E97AA4;       /* solo per "di Ilaria Poggio" accanto al logo */

  --surface: var(--c-white);
  --surface-fog: var(--c-fog);
  --surface-riflesso: var(--c-riflesso);
  --on-surface: var(--c-ink);
  --muted: var(--c-graphite);
  --accent: var(--c-lente-deep);
  --rosa: var(--c-rosa);
  --line: rgba(20, 35, 43, .12);
  --line-strong: rgba(20, 35, 43, .3);
  --card: var(--c-white);
  --field: var(--c-white);
  --deep: var(--c-ink);
  --on-deep: #EEF2F3;

  /* sfondi e testi delle sezioni (usati dal cambio colore allo scorrimento) */
  --bg-paper: var(--surface);
  --bg-fog: var(--surface-fog);
  --bg-riflesso: var(--surface-riflesso);
  --bg-deep: var(--deep);
  --fg-paper: var(--on-surface);
  --fg-fog: var(--on-surface);
  --fg-riflesso: var(--on-surface);
  --fg-deep: var(--on-deep);
  --page-bg: var(--bg-paper);
  --page-fg: var(--fg-paper);

  --font-display: "Italiana", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Instrument Sans", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --fs-small: .875rem;
  --fs-body: clamp(1rem, .96rem + .2vw, 1.125rem);
  --fs-lead: clamp(1.125rem, 1.02rem + .45vw, 1.375rem);
  --fs-h3: clamp(1.75rem, 1.35rem + 1.2vw, 2.5rem);
  --fs-h2: clamp(2.75rem, 1.5rem + 4.6vw, 6rem);
  --fs-display: clamp(3rem, 1.2rem + 7.2vw, 9rem);
  --fs-statement: clamp(2rem, 1.1rem + 3.1vw, 4.5rem);
  --fs-product: clamp(3rem, 1.2rem + 6vw, 7.5rem);

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --max: 1280px;
  --radius: 1.25rem;
  --header-h: 4.5rem;
  --section-y: clamp(6rem, 16vh, 11rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #0E181D;
    --surface-fog: #131F25;
    --surface-riflesso: #12242C;
    --on-surface: #E8EEF0;
    --muted: #9BADB5;
    --accent: #7CC0D8;
    --rosa: #F2A0BF;
    --line: rgba(232, 238, 240, .13);
    --line-strong: rgba(232, 238, 240, .32);
    --card: #172530;
    --field: #0E181D;
    --deep: #081014;
    --on-deep: #E8EEF0;
    color-scheme: dark;
  }
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--on-surface);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.005em;
  text-wrap: balance;
}
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.08; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: .25rem; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  background: var(--on-surface); color: var(--surface);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.lead { font-size: var(--fs-lead); line-height: 1.5; max-width: 32em; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .7rem 1.6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .9375rem;
  letter-spacing: .02em;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.btn--solid { border-color: var(--on-surface); background: var(--on-surface); color: var(--surface); }
.btn--solid:hover { background: color-mix(in srgb, var(--on-surface) 86%, var(--surface)); }

.sec { position: relative; }
.sec--paper { background: var(--bg-paper); color: var(--fg-paper); }
.sec--fog { background: var(--bg-fog); color: var(--fg-fog); }
.sec--riflesso { background: var(--bg-riflesso); color: var(--fg-riflesso); }
.sec--deep { background: var(--bg-deep); color: var(--fg-deep); }

/* ---------- 4. Header e menu ---------- */
.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
  padding-inline: max(var(--gutter), (100% - var(--max)) / 2);
  color: var(--on-surface);
}
/* lo sfondo sfocato sta in uno pseudo-elemento, così il menu mobile copre tutto lo schermo */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
/* logo con "di Ilaria Poggio": sotto, allineato a destra, finché non c'è spazio accanto */
.brand { display: flex; flex: none; flex-direction: column; align-items: flex-end; text-decoration: none; }
.brand img { height: clamp(2rem, 9.5vw, 2.5rem); width: auto; }
.brand__tag { margin-top: -.05rem; font-family: var(--font-display); font-size: 1.05rem; font-style: italic; line-height: 1.1; letter-spacing: .02em; color: var(--rosa); white-space: nowrap; }
@media (min-width: 1180px) {
  .brand { flex-direction: row; align-items: flex-end; gap: .6rem; }
  .brand img { height: 2.75rem; }
  .brand__tag { margin: 0 0 .3rem; font-size: 1.4rem; }
}

.nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav a {
  padding: .5rem .75rem;
  font-size: .9375rem;
  letter-spacing: .01em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat .75rem calc(100% - .3rem) / 0 1px;
  transition: background-size .3s ease;
}
.nav a:hover { background-size: calc(100% - 1.5rem) 1px; }
.nav .nav__cta { display: none; }

.lang {
  padding: .5rem .5rem;
  font-size: .875rem;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--muted);
}
.lang:hover { color: var(--on-surface); }
.header-cta { min-height: 2.6rem; padding: .5rem 1.25rem; }
.menu-toggle { display: none; }

@media (max-width: 960px) {
  .header-cta { display: none; }
  .lang { order: 2; margin-left: auto; }
  .menu-toggle { order: 3; display: inline-flex; min-height: 2.6rem; padding: .45rem 1.1rem; }
  .nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: .35rem;
    margin: 0;
    padding: 6rem var(--gutter) 3rem;
    background: var(--surface);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .35s;
  }
  .nav a {
    padding: .1rem 0;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 11vw, 3.75rem);
    line-height: 1.15;
    background: none;
  }
  .nav .nav__cta {
    display: inline-flex;
    margin-top: 2rem;
    padding: .8rem 1.75rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 1rem;
  }
  .nav.is-open { opacity: 1; visibility: visible; transition: opacity .35s ease; }
  .menu-open .site-header::before { border-bottom-color: transparent; }
  .menu-open { overflow: hidden; }
}

/* ---------- 5. Apertura ---------- */
.hero { padding: calc(var(--header-h) + 4rem) var(--gutter) 3rem; }
.hero__stage { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(.75rem, 2vh, 1.5rem);
  font-size: var(--fs-display);
  line-height: .98;
}
.hero__l1, .hero__l2 { display: block; }
.hero__glasses {
  width: min(70vw, 22rem);
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero__foot { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.hero__sub { font-size: var(--fs-lead); line-height: 1.4; color: var(--muted); max-width: 30em; }
.hero__hint { display: none; align-items: center; gap: .6rem; font-size: var(--fs-small); color: var(--muted); letter-spacing: .02em; }
.hero__hint::before { content: ""; width: 1px; height: 1.75rem; background: currentColor; }
.hero__photo {
  position: relative;
  order: 3;
  width: 100%;
  max-width: var(--max);
  aspect-ratio: 16 / 9;
  margin: 2rem 0 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-fog);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 20, 25, .6), rgba(10, 20, 25, 0) 50%);
  pointer-events: none;
}
.hero__caption {
  position: absolute;
  z-index: 1;
  left: clamp(1.25rem, 5vw, 4.5rem);
  right: clamp(1.25rem, 5vw, 4.5rem);
  bottom: clamp(1.5rem, 6vh, 4rem);
  color: #fff;
  text-align: left;
}
.hero__caption p:first-child {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1rem + 4.6vw, 6rem);
  line-height: 1;
}
.hero__caption p + p { margin-top: 1rem; font-size: var(--fs-lead); opacity: .9; }

/* ---------- 6. Chi siamo ---------- */
.about { padding-block: var(--section-y); }
.about__sticky { padding-bottom: var(--section-y); }
.about__statement {
  font-family: var(--font-display);
  font-size: var(--fs-statement);
  line-height: 1.18;
  max-width: 21em;
}
.about__body {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(2.5rem, 8vw, 8rem);
  align-items: center;
}
.about__photo {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px .75rem .75rem;
  background: var(--surface-fog);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__text h2 { margin-bottom: 2rem; }
.about__text p { max-width: 34em; color: var(--muted); }
.about__text p + p { margin-top: 1.1rem; }
/* chi c'è dietro al banco: ritratto a lente, nome e ruolo */
.about__owner { display: flex; align-items: center; gap: 1.25rem; margin: 2.5rem 0 0; }
.about__owner img {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  outline: 1px solid var(--line-strong);
  outline-offset: 4px;
}
.about__owner figcaption { font-size: var(--fs-small); line-height: 1.4; color: var(--muted); }
.about__owner-name { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.15; color: var(--on-surface); }
/* firma: il fondo bianco del video si fonde con la pagina */
.about__sign {
  display: block;
  width: min(100%, 22rem);
  height: auto;
  margin-top: 1.25rem;
  mix-blend-mode: multiply;
}

@media (max-width: 760px) {
  .about__body { grid-template-columns: 1fr; }
  .about__photo { max-width: 22rem; }
}
/* in modalità scura il video si inverte come le illustrazioni dei prodotti: il fondo diventa nero e sparisce */
@media (prefers-color-scheme: dark) {
  .about__sign { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
}

/* ---------- 7. Servizi ---------- */
.services { padding-block: var(--section-y); }
.services__track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.services__intro { grid-column: 1 / -1; padding-bottom: 2rem; }
.services__intro h2 { margin-bottom: 1.5rem; }
.services__progress { display: none; }

.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 24rem;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--on-surface);
}
.card__icon { width: 3.25rem; height: 3.25rem; margin-bottom: auto; color: var(--accent); }
.card__icon svg {
  width: 100%; height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 { margin-top: 3rem; }
.card p { color: var(--muted); }
.card__note { padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--on-surface) !important; }

/* ---------- 8. Prodotti e marchi ---------- */
.slide__card { position: relative; padding-block: var(--section-y); }
.slide--riflesso .slide__card { background: var(--surface-riflesso); color: var(--on-surface); }
.slide--ink .slide__card { background: var(--deep); color: var(--on-deep); }
.slide--fog .slide__card { background: var(--surface-fog); color: var(--on-surface); }
.slide--white .slide__card { background: var(--surface); color: var(--on-surface); }
.slide__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.slide__text h3 { font-size: var(--fs-product); line-height: .98; }
.slide__text p {
  margin-top: 1.75rem;
  max-width: 27em;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: color-mix(in srgb, currentColor 72%, transparent);
}
.slide__text .btn { margin-top: 2.25rem; }
.slide__art {
  display: grid;
  place-items: center;
  width: min(100%, 32rem);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 4%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent);
}
.slide__art img { width: 80%; }

/* in modalità scura le illustrazioni a inchiostro diventano chiare (tranne quella già pensata per il fondo scuro) */
@media (prefers-color-scheme: dark) {
  .slide:not(.slide--ink) .slide__art img { filter: invert(1) hue-rotate(180deg); }
}
@media (max-width: 760px) {
  .slide__inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .slide__art { width: min(70vw, 36svh); order: -1; }
}

.brands { padding-block: var(--section-y); overflow-x: clip; }
.brands__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem; }
.brands__head h2 { font-size: var(--fs-h3); }
.brands__head p { color: var(--muted); }
.brands__band { margin-top: 3rem; padding-block: 2.5rem; border-block: 1px solid var(--line); }
.brands__track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 3rem;
  margin: 0;
  padding: 0 var(--gutter);
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1rem + 4vw, 5rem);
  line-height: 1;
}
.brands__track li { display: flex; align-items: center; gap: 3rem; white-space: nowrap; }
.brands__track li::after {
  content: "";
  width: .3em; height: .3em;
  border-radius: 50%;
  border: 1px solid var(--c-lente);
}
.brands__track li[aria-hidden="true"] { display: none; }

/* ---------- 9. Convenzioni ---------- */
.conv { padding-block: var(--section-y); overflow-x: clip; }
.conv__head { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 4rem; align-items: end; }
.conv__lines {
  margin: clamp(3rem, 8vh, 5rem) 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, .6rem + 6.6vw, 8.5rem);
  line-height: 1.08;
}
.conv__lines li { padding-inline: var(--gutter); white-space: nowrap; }
.conv__lines li + li { margin-top: .1em; }
.conv__lines li:nth-child(even) { text-align: right; }
.conv__lines li span { display: inline; }

@media (max-width: 760px) {
  .conv__head { grid-template-columns: 1fr; }
  .conv__lines li { white-space: normal; }
}

/* ---------- 10. Galleria ---------- */
.gallery { padding-block: var(--section-y); overflow-x: clip; }
.gallery__head { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 3rem; align-items: end; }
.gallery__head h2 { grid-column: 1 / -1; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2.25rem);
  margin-top: clamp(3.5rem, 9vh, 6rem);
  align-items: start;
}
.gallery__col { display: grid; gap: clamp(1rem, 2.5vw, 2.25rem); }
.gallery__col:nth-child(2) { margin-top: clamp(3rem, 10vw, 9rem); }
.gallery figure { margin: 0; overflow: hidden; background: var(--surface-fog); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.shape-arch { aspect-ratio: 3 / 4; border-radius: 999px 999px .75rem .75rem; }
.shape-circle { aspect-ratio: 1; border-radius: 50%; }
.shape-soft { aspect-ratio: 1; border-radius: .75rem; }

@media (max-width: 760px) {
  .gallery__head { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__col:nth-child(3) { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .gallery__col:nth-child(3) .shape-arch { aspect-ratio: 1; border-radius: 50%; }
}

/* ---------- 11. Contatti e form ---------- */
.contact { padding-block: var(--section-y); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(3rem, 7vw, 7rem); align-items: start; }
.contact__info h2 { margin-bottom: 1.5rem; }
.contact__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 2rem; margin: 3rem 0 0; }
.contact__list dt { font-size: var(--fs-small); color: var(--muted); }
.contact__list dd { margin: .25rem 0 0; font-size: var(--fs-lead); line-height: 1.35; }
.contact__info h3 { margin-top: 3rem; font-size: var(--fs-h3); }
.hours { width: 100%; max-width: 30rem; margin-top: 1rem; border-collapse: collapse; }
.hours th, .hours td { padding: .7rem 0; border-bottom: 1px solid var(--line); font-weight: 400; text-align: left; }
.hours th { padding-right: 1rem; color: var(--muted); }
.hours td { text-align: right; }

.map { position: relative; display: block; margin-top: 3rem; overflow: hidden; border-radius: var(--radius); text-decoration: none; }
.map img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s ease; }
.map:hover img { transform: scale(1.03); }
.map .btn { position: absolute; right: 1rem; bottom: 1rem; }

.form { padding: clamp(1.75rem, 4vw, 3.25rem); border-radius: var(--radius); background: var(--card); color: var(--on-surface); }
.form h3 { margin-bottom: .6rem; }
.form__intro { margin-bottom: 2rem; color: var(--muted); }
.field { display: grid; gap: .45rem; margin-bottom: 1.25rem; }
.field label { font-size: var(--fs-small); }
.field .opt { color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: .75rem;
  background: var(--field);
  color: var(--on-surface);
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #C0392B; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.consent { display: flex; gap: .75rem; align-items: flex-start; margin: .5rem 0 1.75rem; font-size: var(--fs-small); color: var(--muted); }
.consent input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; flex: none; accent-color: var(--c-lente-deep); }
.consent a { color: var(--on-surface); }
.form .btn--solid { width: 100%; }
.form__status {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: .75rem;
  background: var(--surface-riflesso);
  font-size: var(--fs-small);
}
.form__status[hidden] { display: none; }

@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .field-row, .contact__list { grid-template-columns: 1fr; } }

.wa {
  position: fixed;
  z-index: 40;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  background: var(--on-surface);
  color: var(--surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 35%, transparent), 0 8px 24px rgba(10, 20, 25, .14);
  transition: transform .35s cubic-bezier(.3, 1.3, .5, 1);
}
.wa svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wa:hover { transform: scale(1.06); }

/* ---------- 12. Footer e pagine interne ---------- */
.site-footer { padding: clamp(4rem, 10vh, 6rem) 0 2.5rem; background: var(--deep); color: var(--on-deep); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer img { width: 12rem; margin-bottom: 1.5rem; }
.site-footer p, .site-footer li { font-size: var(--fs-small); line-height: 1.8; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(238, 242, 243, .14); opacity: .7; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

.page { min-height: 80svh; padding: calc(var(--header-h) + 5rem) 0 6rem; }
.page .wrap { max-width: 44rem; }
.page h1 { font-size: var(--fs-h2); margin-bottom: 2.5rem; }
.page h2 { font-size: var(--fs-h3); margin: 2.75rem 0 .75rem; }
.page p { max-width: 40em; color: var(--muted); }
.page p + p { margin-top: 1rem; }
.page .note { padding: 1rem 1.25rem; border-radius: .75rem; background: var(--surface-riflesso); color: var(--on-surface); }
.page .btn { margin-top: 2.5rem; }

/* =========================================================
   13. Effetti di scorrimento
   Attivi solo con html.fx (aggiunta se il dispositivo non chiede
   di ridurre il movimento). Senza .fx il sito è completo e statico.
   ========================================================= */

.fx body { color: var(--page-fg); transition: background-color .9s ease, color .9s ease; }
/* sfondo e testo cambiano insieme, così il contrasto resta sempre corretto */
.fx .sec[data-bg] { background-color: transparent; color: inherit; }

/* --- Apertura: gli occhiali del logo diventano lenti che si aprono sul negozio --- */
.fx .hero { height: 300svh; padding: 0; }
.fx .hero__stage { position: sticky; top: 0; display: block; height: 100svh; overflow: hidden; }
.fx .hero__title { display: block; font-size: min(var(--fs-display), 15svh); }
.fx .hero__l1, .fx .hero__l2 {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  right: var(--gutter);
  opacity: calc(1 - var(--t, 0) * 2.4);
}
.fx .hero__l1 {
  bottom: calc(100% - var(--lens-top, 36svh) + 3svh);
  transform: translateY(calc(var(--t, 0) * -45svh));
}
.fx .hero__l2 {
  top: calc(var(--lens-bottom, 62svh) + 3svh);
  transform: translateY(calc(var(--t, 0) * 45svh));
}
.fx .hero__glasses {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 240px;
  height: 126px;
  max-width: none;
  opacity: 0;
  transform-origin: 0 0;
}
.fx .hero__foot {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 4svh;
  opacity: calc(1 - var(--t, 0) * 4);
}
.fx .hero__hint { display: inline-flex; }
.fx .hero__hint::before { transform-origin: 50% 0; animation: hint 2.4s ease-in-out infinite; }
@keyframes hint {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(0); transform-origin: 50% 100%; }
}
.fx .hero__photo {
  position: absolute;
  inset: 0;
  max-width: none;
  aspect-ratio: auto;
  margin: 0;
  border-radius: 0;
  -webkit-mask-image:
    radial-gradient(circle var(--lr, 0px) at var(--lx, 40%) var(--ly, 50%), #000 calc(100% - 1px), transparent 100%),
    radial-gradient(circle var(--lr, 0px) at var(--rx, 60%) var(--ly, 50%), #000 calc(100% - 1px), transparent 100%);
  mask-image:
    radial-gradient(circle var(--lr, 0px) at var(--lx, 40%) var(--ly, 50%), #000 calc(100% - 1px), transparent 100%),
    radial-gradient(circle var(--lr, 0px) at var(--rx, 60%) var(--ly, 50%), #000 calc(100% - 1px), transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.fx .hero__photo img { transform: scale(var(--zoom, 1.18)); }
.fx .hero__photo::after { opacity: var(--cap, 0); }
.fx .hero__caption {
  opacity: var(--cap, 0);
  filter: blur(calc((1 - var(--cap, 0)) * 14px));
  transform: translateY(calc((1 - var(--cap, 0)) * 2.5rem));
}
.fx .hero.is-open .hero__photo { -webkit-mask-image: none; mask-image: none; }

/* --- Chi siamo: le parole si mettono a fuoco --- */
.fx .about { padding-top: 0; }
.fx .about__scene { height: 240svh; }
.fx .about__sticky { position: sticky; top: 0; display: flex; align-items: center; height: 100svh; padding-bottom: 0; }
.fx .about__statement .w { opacity: .12; filter: blur(.12em); transition: opacity .6s ease, filter .6s ease; }
.fx .about__statement .w.on { opacity: 1; filter: blur(0); }

/* --- Servizi: lo scorrimento verticale diventa orizzontale --- */
.fx .services { padding: 0; }
.fx .services__sticky { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; height: 100svh; overflow: hidden; }
.fx .services__track {
  display: flex;
  align-items: stretch;
  gap: 1.25rem;
  width: max-content;
  margin: 0;
  padding: calc(var(--header-h) + 1rem) var(--gutter) 0;
  transform: translate3d(var(--x, 0px), 0, 0);
  will-change: transform;
}
.fx .services__intro { flex: none; align-self: center; width: min(32rem, 80vw); padding: 0 3rem 0 0; }
.fx .card { flex: none; width: min(24rem, 76vw); height: min(32rem, 62svh); min-height: 0; }
.fx .services__progress {
  display: block;
  width: min(var(--max), 100% - 2 * var(--gutter));
  height: 1px;
  margin: 2.5rem auto 0;
  background: var(--line-strong);
}
.fx .services__progress::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--on-surface);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* --- Prodotti: slideshow a schede che si sovrappongono --- */
.fx .slide { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.fx .slide__card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-block: calc(var(--header-h) + 1.5rem) 2rem;
  border-radius: calc(var(--cover, 0) * 2.5rem);
  transform: scale(calc(1 - var(--cover, 0) * .07));
  transform-origin: 50% 30%;
}
.fx .slide__card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #081014;
  opacity: calc(var(--cover, 0) * .32);
  pointer-events: none;
}
.fx .slide__text > * { transform: translateY(calc((1 - var(--enter, 1)) * 4rem)); opacity: calc(var(--enter, 1) * 1.8 - .8); }
.fx .slide__text > :nth-child(2) { transform: translateY(calc((1 - var(--enter, 1)) * 7rem)); }
.fx .slide__text > :nth-child(3) { transform: translateY(calc((1 - var(--enter, 1)) * 10rem)); }
.fx .slide__art img { transform: rotate(calc((1 - var(--enter, 1)) * -18deg)) scale(calc(.75 + var(--enter, 1) * .25)); }

/* --- Marchi e convenzioni: righe che scorrono con la pagina --- */
.fx .brands__track { flex-wrap: nowrap; justify-content: flex-start; width: max-content; transform: translate3d(var(--bx, 0px), 0, 0); }
.fx .brands__track li[aria-hidden="true"] { display: flex; }
.fx .conv__lines li { transform: translate3d(calc(var(--shift, 0px) * var(--dir, 1)), 0, 0); }

/* --- Galleria: colonne a velocità diverse --- */
.fx .gallery__col { transform: translate3d(0, calc(var(--g, 0) * var(--speed, 0) * 1px), 0); }

/* --- WhatsApp: compare dopo l'apertura --- */
.fx .wa { transform: scale(0); }
.fx .wa.is-visible { transform: scale(1); }
.fx .wa.is-visible:hover { transform: scale(1.06); }

@media (max-height: 520px) {
  .fx .slide { position: relative; height: auto; }
  .fx .slide__card { position: relative; transform: none; border-radius: 0; }
  .fx .slide__card::after { display: none; }
}
