/* Restyle: Fraunces soft + Figtree, palette dal logo (fucsia con contorno bianco) */
:root {
  --ivory: #fcfaf8;      /* carta, quasi bianca */
  --ink: #1d1a1c;        /* quasi nero */
  --gold: #ea0251;       /* fucsia del logo: contrasto 5.4:1 col bianco */
  --rose: #fde6ec;       /* rosa tenue accordato al fucsia */
  --sky: #d7e6f3;
  --font-display: "Fraunces", Georgia, serif;
}

/* Sfondo: acquerello come la parete del negozio
   (sorgente bg-parete.svg, rasterizzata in WebP: i filtri SVG sono troppo pesanti dal vivo) */
body > div.bg-ivory {
  background-color: var(--ivory);
  background-image: url("/bg-parete.webp");
  background-size: max(1440px, 100%) auto;
  background-position: top center;
  background-repeat: repeat-y;
}
/* Tablet: le farfalle finiscono dietro il testo, quindi un velo color carta le allontana */
@media (max-width: 1023.98px) {
  body > div.bg-ivory {
    background-image:
      linear-gradient(rgb(252 250 248 / 0.35), rgb(252 250 248 / 0.35)),
      url("/bg-parete.webp");
    background-size: auto, 115% auto;
    background-repeat: repeat, repeat-y;
  }
}
/* Telefono: piastrella stretta con le sole fasce laterali (farfalle ai bordi) */
@media (max-width: 767.98px) {
  body > div.bg-ivory {
    background-image:
      linear-gradient(rgb(252 250 248 / 0.55), rgb(252 250 248 / 0.55)),
      url("/bg-parete-mobile.webp");
    background-size: auto, 100% auto;
  }
}
#marchi dt {
  white-space: nowrap;
}
/* Le farfalle a linea originali ora duplicano quelle dello sfondo */
svg[viewBox="0 0 120 100"] {
  display: none;
}

/* Footer: ragione sociale e indirizzo su due righe */
.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-style: normal;
  line-height: 1.5;
  padding: 0 1.5rem;
}

/* Logo */
.brand-logo img {
  display: block;
  height: 54px;
  width: auto;
}
/* Ovale a filo attorno al logo (come la versione su fondo nero, ma solo contorno).
   Sta sul contenitore: border-radius sull'img ritaglierebbe le lettere. */
.logo-oval {
  --oval: var(--gold);
  display: inline-block;
  padding: 10px 26px;
  border: 2px solid var(--oval);
  border-radius: 50%;
}
.footer-oval {
  padding: 14px 34px;
}
.footer-logo {
  display: block;
  height: 72px;
  width: auto;
}
@media (max-width: 767.98px) {
  .brand-logo img {
    height: 44px;
  }
  .logo-oval {
    padding: 8px 22px;
  }
}

/* Tipografia */
.font-sans {
  font-family: "Figtree", system-ui, sans-serif;
}
.font-light {
  font-weight: 400;
}
.font-display {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 380;
  letter-spacing: -0.01em;
}
h1.font-display {
  font-weight: 340;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
h2.font-display {
  font-weight: 360;
  letter-spacing: -0.02em;
}
.italic.font-display {
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

/* Testo corrente: un po' più scuro e con misura leggibile */
.text-lg.leading-relaxed {
  font-size: 1.125rem;
  line-height: 1.7;
  color: color-mix(in oklab, var(--ink) 78%, transparent);
  max-width: 38rem;
}

/* Via maiuscole spaziate: etichette in tondo, piccole, blu */
.uppercase {
  text-transform: none;
}
[class*="tracking-[0."] {
  letter-spacing: 0.005em;
}
p.text-xs.uppercase {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gold);
}
/* Header fisso in alto */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--ivory) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
header > div {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
section[id] {
  scroll-margin-top: 7.5rem;
}

/* Tablet: titolo hero più contenuto nella colonna stretta */
@media (min-width: 768px) and (max-width: 1023.98px) {
  h1.font-display {
    font-size: 3.4rem;
  }
  h2.font-display {
    font-size: 2.5rem;
  }
}

/* Tablet e mobile: logo al centro, menu centrato sotto */
@media (max-width: 1023.98px) {
  header > div {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.6rem;
  }
  /* il menu va a capo da solo; il logo resta della sua larghezza (l'ovale non si stira) */
  header nav {
    flex-basis: 100%;
    justify-content: center;
  }
  section[id] {
    scroll-margin-top: 9rem;
  }
}
@media (max-width: 767.98px) {
  header nav.hidden {
    display: flex;
    gap: 1.4rem;
    font-size: 0.9rem;
    overflow-x: auto;
  }
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

header nav {
  font-size: 0.95rem;
  font-weight: 500;
  gap: 2rem;
}
header nav a {
  color: var(--ink);
}

#storia span.text-xs.uppercase {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gold);
}

/* Marchi: griglia di loghi a filo, tutti in nero per uniformità */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  border-left: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
}
@media (min-width: 768px) {
  .brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .brand-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.brand-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.75rem 1rem 1.4rem;
  text-align: center;
  border-right: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  background: color-mix(in oklab, #fff 55%, transparent);
}
.brand-mark {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.brand-mark img {
  max-height: 100%;
  max-width: min(180px, 85%);
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(0.35);
  mix-blend-mode: multiply;
}
/* Bilanciamento ottico: scritte larghe e sottili più grandi, quelle compatte più piccole */
.brand-mark img[src*="ralph-lauren"],
.brand-mark img[src*="tommy-hilfiger"] {
  max-width: 92%;
}
.brand-mark img[src*="guess"],
.brand-mark img[src*="liu-jo"] {
  max-height: 30px;
}
.brand-mark img[src*="moschino"] {
  max-height: 34px;
}
.brand-mark img[src*="sarabanda"],
.brand-mark img[src*="maximo"] {
  max-height: 30px;
}
.brand-mark img[src*="marlu"] {
  max-height: 34px;
  filter: brightness(0); /* logo originale bianco: portato a nero come gli altri */
}
.brand-mark img[src*="coccode"] {
  max-height: 34px;
}
.brand-mark img[src*="story-loris"] {
  max-height: 40px;
}
/* Loghi compatti (marchio + scritta piccola): tutta l'altezza disponibile */
.brand-mark img[src*="petit-bateau"],
.brand-mark img[src*="ninnaoh"] {
  max-height: 60px;
}
.brand-mark img[src*="canadiens"] {
  max-height: 54px;
}
.brand-mark img[src*="ninnaoh"] {
  filter: grayscale(1) brightness(0.15) contrast(1.4);
}
.brand-name {
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--ink);
}
.brand-note {
  font-size: 0.8rem;
  line-height: 1.35;
  color: color-mix(in oklab, var(--ink) 62%, transparent);
}

/* Marchi: niente maiuscoletto spaziato */
.smallcaps {
  font-variant: normal;
  text-transform: none;
  letter-spacing: -0.005em;
}

/* Bottoni a pillola */
a.inline-flex.border {
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.8rem 1.6rem;
}
a.inline-flex.border-gold {
  background: var(--gold);
  color: #fff;
}
a.inline-flex.border-gold:hover {
  background: var(--ink);
  border-color: var(--ink);
}

/* Foto: angoli morbidi al posto della cornice a filo */
figure.border {
  border: 0;
  padding: 0;
  background: none;
}
/* angoli arrotondati sulla sola foto: sul figure taglierebbero la didascalia */
figure.border > img {
  border-radius: 18px;
}

/* Contatti */
#contatti .border-gold\/60,
#contatti .md\:border-gold\/60 {
  border-color: color-mix(in oklab, var(--gold) 25%, transparent);
}
#contatti .grid.border {
  border-radius: 20px;
  background: #fff;
}
#contatti dt {
  font-weight: 500;
}

/* Barra mobile */
.fixed.bottom-0 {
  font-size: 0.95rem;
  font-weight: 500;
}

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Pulsante WhatsApp fisso in basso a destra */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 6px 18px rgb(29 26 28 / 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-float:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgb(29 26 28 / 0.28);
}
.wa-float:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 50%;
}
.wa-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* Telefono: sopra la barra fissa Chiama / Indicazioni */
@media (max-width: 767.98px) {
  .wa-float {
    right: 14px;
    bottom: 72px;
    width: 54px;
    height: 54px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float {
    transition: none;
  }
}

/* Storia: linea del tempo al posto del solo "1981" (che sembrava la data della foto) */
.timeline {
  position: relative;
  display: grid;
  gap: 1.4rem;
  padding-left: 1.6rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 1px;
  background: color-mix(in oklab, var(--gold) 45%, transparent);
}
.timeline li {
  position: relative;
  display: grid;
  gap: 0.15rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.6rem + 0.5px);
  top: 0.85rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ivory);
  border: 2px solid var(--gold);
}
.timeline li:last-child::before {
  background: var(--gold);
}
.timeline-year {
  font-size: 2.1rem;
  line-height: 1.1;
  color: var(--ink);
}
.timeline-text {
  font-size: 0.98rem;
  line-height: 1.45;
  color: color-mix(in oklab, var(--ink) 72%, transparent);
  max-width: 22rem;
}
.photo-caption {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: color-mix(in oklab, var(--ink) 62%, transparent);
}
