:root{
  --ink:#2A2622;
  --parchment:#F1E9DC;
  --parchment-deep:#F0E8DE;
  --espresso:#26221D;
  --silver:#9A9793;
  --silver-light:#CBC8C2;
  --rose:#AE3763;
}
*{margin:0;padding:0;box-sizing:border-box;}

/* Anti-scatto font: mentre la classe fonts-loading è presente sull'html,
   la pagina resta coperta dal logo, finché i font non sono pronti.
   L'entrata è istantanea (deve coprire subito), l'uscita è una dissolvenza. */
body{transition:opacity 0.5s ease;}
html.fonts-loading body{opacity:0; pointer-events:none;}

html::before{
  content:"";
  position:fixed; inset:0; z-index:9999;
  background:#F1E9DC url('images/logo.png') center/min(360px,70vw) no-repeat;
  opacity:0; pointer-events:none;
  transition:opacity 0.5s ease;
}
html.fonts-loading::before{opacity:1; pointer-events:all;}
@media (max-width:600px){ html::before{background-size:220px;} }
html{scroll-behavior:smooth;}
body{
  background:var(--parchment);
  color:var(--ink);
  font-family:'Work Sans', sans-serif;
  font-weight:400;
  overflow-x:hidden;
}
@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; scroll-behavior:auto !important;}
}
a{color:inherit;text-decoration:none;}
h1,h2,h3{font-family:'Fraunces', serif; font-weight:500; letter-spacing:-0.01em;}
.eyebrow{
  font-family:'IBM Plex Mono', monospace;
  font-size:0.72rem;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--silver);
}
.eyebrow-icon{
  display:inline-block; margin-right:8px;
  font-size:0.95em; filter:grayscale(1) contrast(0.9); opacity:0.75;
  transform:translateY(1px);
}
:focus-visible{outline:2px solid var(--rose); outline-offset:3px;}

/* ---------- Ric-rac: divisore tra le sezioni ---------- */
.ricrac{
  display:flex; align-items:center; gap:14px;
  margin:16px 0; padding:0 48px;
}
.ricrac-spool{
  width:34px; height:48px; flex-shrink:0;
  color:#3A342C;
}
.ricrac-spool-end{transform:scaleX(-1);}
.ricrac-fill{
  flex:1; height:26px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Cpath d='M0,15 C7.5,2 22.5,2 30,15 C37.5,28 52.5,28 60,15' fill='none' stroke='%23B7A382' stroke-width='3.4' stroke-linecap='round'/%3E%3Cpath d='M0,15 C7.5,28 22.5,28 30,15 C37.5,2 52.5,2 60,15' fill='none' stroke='%238A7358' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:repeat-x;
  background-position:center;
  background-size:56px 26px;
}
@media (max-width:820px){ .ricrac{margin:12px 0; gap:8px; padding:0 28px;} .ricrac-spool{width:24px; height:34px;} }

/* ---------- Thread signature (runs down the page) ---------- */
.thread-wrap{
  position:absolute;
  left:38px;
  top:0;
  width:2px;
  height:100%;
  z-index:1;
  pointer-events:none;
}
.thread-wrap svg{position:sticky; top:0; height:100vh;}
#threadPath{
  stroke:var(--silver);
  stroke-width:2;
  fill:none;
  stroke-dasharray:8000;
  stroke-dashoffset:8000;
  transition:stroke-dashoffset 0.1s linear;
}
@media (max-width:820px){ .thread-wrap{display:none;} }

header{
  position:relative;
  display:flex; align-items:center; justify-content:space-between;
  padding:6px 48px;
  background:var(--espresso);
  border-bottom:1px solid rgba(250,246,241,0.1);
}
.logo{display:flex; align-items:center;}
.logo img{height:90px; width:auto; display:block;}
nav{display:flex; justify-content:flex-end;}
nav a{
  margin-left:32px; font-size:1.05rem; letter-spacing:0.03em;
  color:rgba(250,246,241,0.85);
  padding-bottom:3px; border-bottom:1px solid transparent;
  transition:border-color 0.25s ease, color 0.25s ease;
}
nav a:hover{border-color:var(--silver-light); color:var(--silver-light);}
@media (max-width:820px){
  header{padding:6px 20px; flex-wrap:wrap; row-gap:10px;}
  .logo img{height:64px;}
  nav{width:100%; justify-content:center; flex-wrap:wrap;}
  nav a{margin-left:18px; font-size:0.85rem;}
}

/* ---------- Hero ---------- */
.hero{
  min-height:100svh;
  display:flex; flex-direction:column; justify-content:center;
  padding:80px 48px 80px 96px;
  position:relative;
  overflow:hidden;
  isolation:isolate;
}
.hero-bg{
  position:absolute; inset:-10px;
  background-color:var(--parchment);
  background-size:contain;
  background-repeat:no-repeat;
  background-position:right 18%;
  transform:scale(1.04);
  transition:transform 0.25s ease-out;
  z-index:-2;
  will-change:transform;
}
.hero-overlay{
  position:absolute; inset:0;
  background:linear-gradient(160deg, rgba(241,233,220,0.72) 0%, rgba(241,233,220,0.32) 55%, rgba(241,233,220,0) 100%);
  z-index:-1;
}
.hero-content{
  max-width:560px;
  position:relative; z-index:1;
  transition:transform 0.25s ease-out;
  will-change:transform;
}
.hero-mobile-photo{display:none;}
.hero .eyebrow{margin-bottom:22px; color:var(--rose);}
.hero h1{
  font-size:clamp(2.6rem, 6.2vw, 5.4rem);
  line-height:1.03;
  max-width:16ch;
  margin-bottom:28px;
  color:var(--ink);
}
.hero h1 em{font-style:italic; color:var(--rose);}
.visually-hidden{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.stitch-scene{
  display:inline-block; vertical-align:baseline;
  width:0.5em; height:0.26em; margin-left:0.1em;
  overflow:visible;
}
.stitch-svg{width:100%; height:100%; overflow:visible;}

.thread{
  fill:none; stroke:var(--rose); stroke-width:2.2;
  stroke-linecap:round; stroke-linejoin:round;
  opacity:0;
}
.stitch-dot{
  fill:var(--rose);
  opacity:1; transform:scale(1); transform-origin:6px 16px;
}

html.js-ready .stitch-scene .thread{
  opacity:1;
  stroke-dasharray:60; stroke-dashoffset:60;
  animation:
    threadDraw 0.8s ease-in-out 0.6s forwards,
    threadRetract 0.6s ease-in 1.5s forwards;
}
html.js-ready .stitch-scene .stitch-dot{
  opacity:0; transform:scale(0); transform-origin:6px 16px;
  animation:stitchDot 0.4s cubic-bezier(0.34,1.56,0.64,1) 1.95s forwards;
}

@keyframes threadDraw{ from{ stroke-dashoffset:60; } to{ stroke-dashoffset:0; } }
@keyframes threadRetract{ from{ stroke-dashoffset:0; } to{ stroke-dashoffset:60; } }

@keyframes stitchDot{
  0%{ opacity:0; transform:scale(0); }
  60%{ opacity:1; transform:scale(1.3); }
  100%{ opacity:1; transform:scale(1); }
}

@media (prefers-reduced-motion: reduce){
  html.js-ready .stitch-scene .thread{ animation:none; opacity:0; }
  html.js-ready .stitch-scene .stitch-dot{ animation:none; opacity:1; transform:scale(1); }
}
.hero p{
  font-size:1.08rem; line-height:1.65; max-width:46ch; color:#5C5854;
  margin-bottom:38px;
}
.hero .btn{background:var(--espresso); border-color:var(--espresso); color:var(--parchment);}
.hero .btn:hover{background:transparent; color:var(--espresso); border-color:var(--espresso);}

.made-in-italy{
  display:inline-flex; align-items:center; gap:10px;
  margin-top:28px;
  font-family:'IBM Plex Mono', monospace; font-size:0.72rem;
  letter-spacing:0.12em; text-transform:uppercase;
  color:#5C5854;
}
.mii-flag{
  width:24px; height:16px; border-radius:2px; flex-shrink:0;
  background:linear-gradient(90deg, #008C45 0 33%, #F4F5F0 33% 66%, #CD212A 66% 100%);
  box-shadow:0 0 0 1px rgba(42,38,34,0.25);
}
.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:15px 30px;
  font-family:'IBM Plex Mono', monospace;
  font-size:0.8rem; letter-spacing:0.1em; text-transform:uppercase;
  background:var(--espresso); color:var(--parchment);
  border:1px solid var(--espresso);
  transition:background 0.3s ease, color 0.3s ease, transform 0.3s ease;
  width:fit-content;
}
.btn:hover{background:transparent; color:var(--espresso); transform:translateY(-2px);}
.btn.outline{background:transparent; color:var(--espresso);}
.btn.outline:hover{background:var(--espresso); color:var(--parchment);}

@media (max-width:820px){
  .hero{
    min-height:0;
    padding:110px 20px 60px;
  }
  .hero-bg, .hero-overlay{display:none;}
  .hero-content{
    max-width:none;
    background:none;
    padding:0;
    border-radius:0;
  }
  .hero-mobile-photo{
    display:block;
    width:100%;
    aspect-ratio:1440/1920;
    background-size:cover;
    background-position:center;
    border-radius:4px;
    margin:24px 0;
  }
}

section{padding:80px 48px; position:relative;}
@media (max-width:820px){ section{padding:80px 28px;} }
.section-inner{max-width:1180px; margin:0 auto; position:relative; z-index:1;}

/* ---------- Sfilata ---------- */
.sfilata{padding:70px 48px;}
.sfilata-grid{display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:center;}
.sfilata-media{
  width:100%;
  aspect-ratio:1043/787;
  background-size:cover;
  background-position:center;
  border-radius:2px;
  transition:transform 0.25s ease-out;
  will-change:transform;
}
.sfilata-caption{text-align:left;}
.sfilata-caption h2{font-size:clamp(1.9rem,3.4vw,2.6rem); margin:14px 0 18px;}
.sfilata-caption p{color:#5C5854; line-height:1.7; font-size:1.02rem;}
@media (max-width:820px){
  .sfilata{padding:70px 28px;}
  .sfilata-grid{grid-template-columns:1fr; gap:36px;}
  .sfilata-caption{text-align:center;}
}

/* ---------- Il laboratorio & La boutique, affiancate ---------- */
.due-colonne{padding:70px 48px 80px;}
.due-colonne-grid{display:grid; grid-template-columns:1fr 1fr; gap:70px; align-items:start;}
.colonna h2{font-size:clamp(1.6rem,2.6vw,2.2rem); margin:14px 0 18px;}
.colonna p{color:#5C5854; line-height:1.7; font-size:0.98rem; margin-bottom:16px;}

.sartoria-media{
  width:100%; margin-top:8px;
  aspect-ratio:4/5;
  background-size:cover;
  background-position:center 20%;
  border-radius:2px;
  transition:transform 0.25s ease-out;
  will-change:transform;
}

.boutique-photos{display:flex; flex-direction:row; gap:14px; margin-top:8px;}
.boutique-photo{
  position:relative; overflow:hidden; border-radius:2px;
  flex:1; aspect-ratio:4/5;
  transition:transform 0.25s ease-out;
  will-change:transform;
}
.boutique-photo-img{
  position:absolute; inset:0;
  background-size:cover; background-position:center 20%;
  transition:transform 0.5s ease;
}
.boutique-photo:hover .boutique-photo-img{transform:scale(1.09);}
.boutique-photo span{
  position:absolute; left:0; right:0; bottom:0; z-index:2; padding:12px 14px;
  font-family:'IBM Plex Mono', monospace; font-size:0.65rem;
  letter-spacing:0.1em; text-transform:uppercase; color:var(--parchment);
  background:linear-gradient(to top, rgba(38,34,29,0.75), transparent);
}
@media (max-width:820px){
  .due-colonne{padding:70px 28px 80px;}
  .due-colonne-grid{grid-template-columns:1fr; gap:56px;}
}
@media (max-width:480px){
  .boutique-photos{flex-direction:column;}
}

/* ---------- Sezioni con intestazione ---------- */
.section-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:56px; flex-wrap:wrap; gap:20px;}
.section-head h2{font-size:clamp(2.1rem,3.6vw,2.8rem);}
.section-head .eyebrow{font-size:1rem; letter-spacing:0.12em;}

/* ---------- Galleria abiti ---------- */
.gallery{padding:70px 0 70px;}
.gallery .section-inner{margin-bottom:36px;}
.gallery-scroll{
  overflow-x:auto; overflow-y:hidden;
  padding:0 48px 22px;
  scroll-snap-type:x proximity;
  cursor:grab;
  scrollbar-width:thin; scrollbar-color:var(--silver) transparent;
  position:relative; z-index:1;
}
.gallery-scroll.dragging{cursor:grabbing; scroll-snap-type:none;}
.gallery-scroll::-webkit-scrollbar{height:6px;}
.gallery-scroll::-webkit-scrollbar-track{background:transparent;}
.gallery-scroll::-webkit-scrollbar-thumb{background:rgba(42,38,34,0.25); border-radius:4px;}
.gallery-track{display:flex; gap:20px; width:max-content;}
.gallery-item{scroll-snap-align:start; width:240px; flex-shrink:0;}
.gallery-photo{
  aspect-ratio:3/4; border-radius:2px; overflow:hidden;
  background-size:cover; background-position:center;
  transition:transform 0.35s ease;
}
.gallery-item:hover .gallery-photo{transform:scale(1.03);}
.gallery-item p{
  margin-top:14px; text-align:center;
  font-family:'IBM Plex Mono', monospace; font-size:0.72rem;
  letter-spacing:0.08em; text-transform:uppercase; color:#5C5854;
}
.gallery-arrows{display:flex; gap:10px; justify-content:flex-end; padding-top:4px;}
.gallery-arrow{
  width:42px; height:42px; border-radius:50%;
  border:1px solid rgba(42,38,34,0.25); background:transparent;
  display:flex; align-items:center; justify-content:center;
  color:var(--ink); cursor:pointer;
  transition:background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.gallery-arrow:hover{background:var(--espresso); border-color:var(--espresso); color:var(--parchment);}
.gallery-arrow svg{width:16px; height:16px;}
@media (max-width:820px){
  .gallery{padding:70px 0 70px;}
  .gallery-scroll{padding:0 28px 22px;}
  .gallery-arrows{padding:0 28px;}
  .gallery-item{width:190px;}
}

/* ---------- Processo ---------- */
.processo-list{display:flex; flex-direction:column; gap:0;}
.step{
  display:grid; grid-template-columns:90px 1fr; gap:32px;
  padding:38px 0; border-top:1px solid rgba(42,38,34,0.18);
}
.step:last-child{border-bottom:1px solid rgba(42,38,34,0.18);}
.step .num{font-family:'IBM Plex Mono', monospace; font-size:0.85rem; color:var(--silver); padding-top:4px;}
.step h3{font-size:1.3rem; margin-bottom:10px;}
.step p{color:#5C5854; line-height:1.7; max-width:60ch;}
@media (max-width:600px){ .step{grid-template-columns:1fr; gap:10px;} }

/* ---------- Citazione ---------- */
.citazione{background:var(--espresso); color:var(--parchment);}
.citazione blockquote{
  font-family:'Fraunces', serif; font-style:italic; font-weight:400;
  font-size:clamp(1.5rem,3.2vw,2.3rem); line-height:1.5; max-width:26ch; margin-bottom:26px;
}
.citazione cite{font-family:'IBM Plex Mono', monospace; font-style:normal; font-size:0.78rem; letter-spacing:0.08em; color:var(--silver-light);}

.fashion-quotes{
  position:relative; margin-top:48px; padding-top:32px; min-height:130px;
  border-top:1px solid rgba(250,246,241,0.15);
}
.fq-item{
  position:absolute; left:0; right:0; top:32px; margin:0;
  font-family:'Fraunces', serif; font-style:italic; font-weight:400;
  font-size:clamp(1.1rem,2.2vw,1.5rem); line-height:1.5; max-width:32ch;
  opacity:0; transition:opacity 0.9s ease;
}
.fq-item.is-active{opacity:1;}
.fq-item cite{
  display:block; margin-top:12px;
  font-family:'IBM Plex Mono', monospace; font-style:normal; font-size:0.72rem;
  letter-spacing:0.08em; color:var(--silver-light);
}
@media (max-width:820px){ .fashion-quotes{min-height:170px;} }

/* ---------- Dove trovarci ---------- */
.dove-grid{display:grid; grid-template-columns:1.3fr 1fr; gap:48px; align-items:center;}
.dove-map{
  width:100%; aspect-ratio:4/3; border-radius:2px; overflow:hidden;
  border:1px solid rgba(42,38,34,0.15);
}
.dove-map iframe{width:100%; height:100%; border:0; display:block; filter:grayscale(0.15);}
.dove-text p{color:#5C5854; line-height:1.7; margin-bottom:26px; font-size:1.02rem;}
@media (max-width:820px){ .dove-grid{grid-template-columns:1fr;} }

footer{
  position:relative; overflow:hidden;
  padding:64px 48px; background:var(--espresso); color:var(--parchment-deep);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:32px;
  font-size:1.05rem;
}
footer .col{position:relative; z-index:1;}
footer .col h4{font-family:'IBM Plex Mono', monospace; font-size:0.85rem; letter-spacing:0.1em; text-transform:uppercase; color:var(--silver-light); margin-bottom:18px;}
footer .col p, footer .col a{display:block; line-height:2; color:rgba(250,246,241,0.8);}

.phone-row{display:flex; align-items:center; gap:10px;}
.phone-row a{display:block;}
.copy-btn{
  display:flex; align-items:center; justify-content:center;
  width:32px; height:32px; padding:0; border-radius:4px;
  background:transparent; border:1px solid rgba(250,246,241,0.25);
  color:rgba(250,246,241,0.75); cursor:pointer;
  transition:background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.copy-btn svg{width:17px; height:17px;}
.copy-btn:hover{border-color:var(--silver-light); color:var(--silver-light);}
.copy-btn.copied{border-color:var(--silver-light); color:var(--silver-light);}

.social-row{display:flex; gap:22px; margin-top:18px;}
.social-row a{
  display:flex; align-items:center; gap:9px;
  color:rgba(250,246,241,0.75);
  transition:color 0.25s ease;
}
.social-row a:hover{color:var(--silver-light);}
.social-row svg{width:23px; height:23px; flex-shrink:0;}
.social-row span{
  font-family:'IBM Plex Mono', monospace; font-size:0.85rem; letter-spacing:0.04em;
}
@media (max-width:480px){ .social-row span{display:none;} }

/* Le sezioni sono visibili di base (anche senza JavaScript).
   L'animazione di comparsa si attiva solo se lo script inline
   conferma che il JS funziona davvero (classe js-ready). */
.reveal{opacity:1; transform:none;}
html.js-ready .reveal{
  opacity:0; transform:translateY(22px);
  transition:opacity 0.8s ease, transform 0.8s ease;
}
html.js-ready .reveal.visible{opacity:1; transform:translateY(0);}

/* ---------- Copyright ---------- */
/* ---------- Bottone WhatsApp fluttuante ---------- */
.whatsapp-float{
  position:fixed; right:20px; bottom:96px; z-index:110;
  width:56px; height:56px; border-radius:50%;
  background:#25D366;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 24px rgba(0,0,0,0.25);
  transition:transform 0.2s ease;
}
.whatsapp-float:hover{transform:scale(1.08);}
.whatsapp-float svg{width:28px; height:28px;}
@media (max-width:600px){
  .whatsapp-float{right:16px; bottom:86px; width:52px; height:52px;}
}

/* ---------- Torna su ---------- */
.back-to-top{
  position:fixed; left:20px; bottom:24px; z-index:110;
  width:56px; height:56px; border-radius:50%;
  background:var(--espresso); color:var(--parchment);
  border:2px solid var(--silver-light);
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  transition:opacity 0.3s ease, transform 0.2s ease;
  box-shadow:0 8px 28px rgba(0,0,0,0.35);
}
.back-to-top.visible{opacity:1; pointer-events:all;}
.back-to-top:hover{transform:translateY(-3px);}
.back-to-top svg{width:24px; height:24px;}
@media (max-width:600px){ .back-to-top{left:16px; bottom:20px; width:50px; height:50px;} }

/* ---------- Aperto ora / Chiuso ---------- */
.open-status{
  display:inline-flex; align-items:center; gap:7px;
  margin-top:10px;
  font-family:'IBM Plex Mono', monospace; font-size:0.78rem; letter-spacing:0.05em;
}
.open-status::before{
  content:""; width:8px; height:8px; border-radius:50%; background:currentColor;
  flex-shrink:0;
}
.open-status.open{color:#6FBF8B;}
.open-status.closed{color:#C98C82;}

/* ---------- Lightbox galleria ---------- */
.gallery-item{cursor:zoom-in;}
.lightbox{
  position:fixed; inset:0; z-index:150;
  background:rgba(20,18,15,0.92);
  display:none; align-items:center; justify-content:center;
  padding:60px 24px;
}
.lightbox.visible{display:flex;}
.lightbox img{
  max-width:90vw; max-height:85vh; border-radius:2px;
  box-shadow:0 20px 60px rgba(0,0,0,0.4);
}
.lightbox-close{
  position:absolute; top:20px; right:20px;
  width:44px; height:44px; border-radius:50%;
  border:1px solid rgba(250,246,241,0.3); background:transparent;
  color:var(--parchment); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background 0.2s ease;
}
.lightbox-close:hover{background:rgba(250,246,241,0.1);}
.lightbox-close svg{width:20px; height:20px;}

.copyright{
  background:var(--espresso); color:rgba(250,246,241,0.55);
  text-align:center; font-size:0.75rem; padding:16px 20px;
  border-top:1px solid rgba(250,246,241,0.08);
}
.copyright a{text-decoration:underline; color:rgba(250,246,241,0.75);}
.copyright a:hover{color:var(--silver-light);}

/* ---------- Placeholder mappa (caricamento a richiesta) ---------- */
.map-placeholder{
  width:100%; height:100%; padding:32px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px;
  text-align:center; background:var(--parchment);
}
.map-placeholder p{color:#5C5854; font-size:0.95rem; line-height:1.6; max-width:34ch; margin:0;}
