/* Elegance Parrucchieri — "Cartella colori"
   Il salone è bianco e nero: il sito anche. L'unico colore è --tinta,
   preso dalla ciocca scelta nella cartella in apertura. */

:root {
  --nero: #000;
  --bianco: #fff;
  --muro: #f2f2f0;        /* pareti del salone */
  --pavimento: #2a2a2c;   /* parquet scuro */
  --specchio: #8d8d92;
  --tinta: #1597a8;       /* petrolio, la ciocca di partenza */
  --tinta-ink: #fff;
  --font: "Urbanist", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.55;
  background: var(--nero);
  color: var(--bianco);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--tinta); outline-offset: 3px; }

h2 {
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  max-width: 16ch;
}

/* ---------- logo (SVG a tratto) ---------- */
.wm { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: square; stroke-linejoin: miter; display: block; }
.wm--small { width: 132px; height: 18px; stroke-width: 7; }
.wm--hero { width: 100%; height: auto; aspect-ratio: 978 / 128; stroke-width: 2.6; }
.wm--foot { width: min(560px, 100%); height: auto; aspect-ratio: 978 / 128; stroke-width: 2.4; color: var(--specchio); }

/* ---------- barra ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(10px);
}
.bar__brand { color: var(--bianco); }
.bar__nav { display: flex; gap: 28px; margin-left: auto; font-size: .95rem; }
.bar__nav a { text-decoration: none; color: #cfcfd2; }
.bar__nav a:hover { color: var(--bianco); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: 500 1rem/1 var(--font);
  text-decoration: none; border-radius: 999px;
  transition: background-color .5s var(--ease), color .5s var(--ease), border-color .3s;
}
.btn--tinta { background: var(--tinta); color: var(--tinta-ink); }
.btn--tinta:hover { filter: brightness(1.08); }
.btn--line { border: 1px solid currentColor; }
.btn--line:hover { border-color: var(--tinta); }
.bar__cta { min-height: 40px; font-size: .92rem; padding: 0 18px; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(32px, 6vh, 72px) var(--gutter) clamp(48px, 8vh, 96px);
  min-height: calc(100svh - 68px);
  align-items: center;
}
.hero__brand { font-weight: 300; }
.hero__sub {
  display: block; margin-top: 1.1em;
  font-size: clamp(.8rem, 1.3vw, 1rem); letter-spacing: .62em; text-indent: .1em;
  color: #cfcfd2; text-transform: uppercase; font-weight: 300;
}
.hero__lead { margin-top: clamp(24px, 4vh, 40px); font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-weight: 300; max-width: 34ch; color: #e6e6e8; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* la cartella colori: ciocche appese a un anello */
.cartella { margin-top: clamp(36px, 6vh, 64px); }
.cartella__title { font-size: .95rem; color: var(--specchio); margin-bottom: 18px; }
.cartella__ring { height: 1px; background: linear-gradient(90deg, #555, #bbb 40%, #555); margin: 0 4px; }
.cartella__strands {
  display: flex; gap: clamp(6px, 1vw, 12px);
  position: relative;
  padding: 0 4px 28px;
  overflow-x: auto; scrollbar-width: none;
}
.cartella__strands::-webkit-scrollbar { display: none; }

.ciocca {
  flex: 1 1 0;
  min-width: 30px;
  max-width: 58px;
  position: relative;
  background: none; border: 0; cursor: pointer; color: inherit;
  padding-top: 14px;
  transform-origin: 50% 0;
}
.ciocca::before { /* anellino */
  content: ""; position: absolute; top: -5px; left: 50%;
  width: 10px; height: 10px; margin-left: -5px;
  border: 1px solid #aaa; border-radius: 50%;
}
.ciocca img {
  width: 100%; aspect-ratio: 1 / 4; object-fit: cover;
  /* la ciocca si stringe in punta, come un campione vero */
  clip-path: polygon(0 0, 100% 0, 100% 78%, 62% 100%, 38% 100%, 0 78%);
  transition: transform .5s var(--ease), filter .4s;
  filter: saturate(.85) brightness(.85);
}
.ciocca:hover img { filter: none; }
.ciocca[aria-checked="true"] img { transform: translateY(18px); filter: none; }
.ciocca__label {
  position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%);
  font-size: .78rem; white-space: nowrap; color: var(--bianco);
  opacity: 0; transition: opacity .3s;
}
.ciocca[aria-checked="true"] .ciocca__label { opacity: 1; }

.look { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.look__frame { position: relative; aspect-ratio: 4 / 5; max-height: 78svh; overflow: hidden; background: var(--pavimento); }
.look__frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity .45s ease; }
.look__frame img.is-out { opacity: 0; }
.look__frame::after { /* filo di tinta sul bordo, come la riga di colore nella cartella */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: var(--tinta); transition: background-color .6s var(--ease);
}
.look__cap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 14px; }
.look__name { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 300; }
.look__ask { font-size: .95rem; text-underline-offset: 5px; text-decoration-color: var(--tinta); text-decoration-thickness: 2px; }

/* ---------- servizi ---------- */
.servizi {
  background: var(--bianco); color: var(--nero);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(72px, 12vh, 140px) var(--gutter);
}
.servizi__head { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: inherit; align-items: end; }
.servizi__head p { max-width: 44ch; color: #3c3c3e; }
.servizi__list { list-style: none; border-top: 1px solid var(--nero); }
.servizi__list li { padding: 22px 0 24px; border-bottom: 1px solid #d6d6d6; display: grid; grid-template-columns: minmax(0, 15ch) minmax(0, 1fr); gap: 24px; }
.servizi__list h3 { font-weight: 500; font-size: 1.2rem; line-height: 1.3; }
.servizi__list p { color: #3c3c3e; max-width: 46ch; }
.servizi__img { width: 100%; height: 100%; max-height: 620px; object-fit: cover; }

/* ---------- lavori ---------- */
.lavori { padding: clamp(72px, 12vh, 140px) var(--gutter); }
.lavori__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: end; margin-bottom: clamp(32px, 5vh, 56px); }
.lavori__head p { color: #cfcfd2; max-width: 44ch; }
.lavori__head a { text-decoration-color: var(--tinta); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lavori__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lavori__grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--pavimento); }

/* ---------- salone ---------- */
.salone {
  background: var(--muro); color: var(--nero);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  padding: clamp(72px, 12vh, 140px) var(--gutter);
}
.salone__text { grid-column: 1 / 6; align-self: end; padding-bottom: 24px; }
.salone__text p { margin-top: 20px; color: #3c3c3e; max-width: 40ch; }
.salone__a { grid-column: 6 / 13; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.salone__b { grid-column: 1 / 5; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.salone__c { grid-column: 5 / 9; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.salone__anni { grid-column: 9 / 13; background: var(--nero); color: var(--bianco); display: flex; flex-direction: column; }
.salone__anni img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.salone__anni figcaption { padding: 18px 20px 22px; font-weight: 300; line-height: 1.4; }
.anni__n { display: block; font-size: 2.4rem; line-height: 1; margin-bottom: 6px; font-weight: 200; }

/* ---------- recensioni ---------- */
.voci { padding: clamp(72px, 12vh, 140px) var(--gutter); }
.voci h2 { max-width: 22ch; }
.voci__score { font-weight: 200; font-size: 1.6em; line-height: .9; display: inline-block; margin-right: .1em; }
.voci__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: clamp(28px, 4vw, 56px); margin-top: clamp(40px, 6vh, 72px); }
.voci blockquote { border-top: 1px solid #444; padding-top: 20px; }
.voci blockquote p { font-weight: 300; font-size: 1.12rem; color: #e6e6e8; }
.voci cite { display: block; margin-top: 14px; font-style: normal; color: var(--specchio); font-size: .95rem; }
.voci__more { display: inline-block; margin-top: 40px; text-decoration-color: var(--tinta); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ---------- orari ---------- */
.orari {
  background: var(--bianco); color: var(--nero);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(72px, 12vh, 140px) var(--gutter);
}
.orari address { font-style: normal; margin-top: 20px; font-size: 1.15rem; }
.orari__table { margin-top: 28px; border-collapse: collapse; width: 100%; max-width: 420px; }
.orari__table th, .orari__table td { text-align: left; padding: 9px 0; border-bottom: 1px solid #e0e0e0; font-weight: 400; }
.orari__table td { text-align: right; font-variant-numeric: tabular-nums; }
.orari__table tr.is-oggi th, .orari__table tr.is-oggi td { font-weight: 600; }
.orari__table tr.is-oggi th::after {
  content: "oggi"; margin-left: 10px; padding: 2px 8px; border-radius: 99px;
  font-size: .75rem; font-weight: 500; background: var(--tinta); color: var(--tinta-ink);
  transition: background-color .5s var(--ease);
}
.orari__note { margin-top: 16px; color: #555; max-width: 42ch; font-size: .95rem; }
.orari__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.orari__social { display: flex; gap: 24px; margin-top: 24px; }
.orari__social a { text-decoration-color: var(--tinta); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.orari__map { min-height: 420px; background: var(--muro); }
.orari__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; filter: grayscale(1) contrast(1.05); }

/* ---------- footer ---------- */
.foot { padding: 56px var(--gutter) 40px; display: grid; gap: 24px; }
.foot p { color: var(--specchio); font-size: .9rem; }

/* ---------- ingresso: il logo si disegna, le ciocche scendono ---------- */
.js .wm--hero path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js.ready .wm--hero path { animation: draw 1.1s var(--ease) forwards; }
.js.ready .wm--hero path:nth-child(2) { animation-delay: .08s; }
.js.ready .wm--hero path:nth-child(3) { animation-delay: .16s; }
.js.ready .wm--hero path:nth-child(4) { animation-delay: .24s; }
.js.ready .wm--hero path:nth-child(5) { animation-delay: .32s; }
.js.ready .wm--hero path:nth-child(6) { animation-delay: .40s; }
.js.ready .wm--hero path:nth-child(7) { animation-delay: .48s; }
.js.ready .wm--hero path:nth-child(8) { animation-delay: .56s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.js .ciocca { opacity: 0; transform: translateY(-24px) rotate(-4deg); }
.js.ready .ciocca { animation: drop .9s var(--ease) forwards; animation-delay: calc(.7s + var(--i) * 60ms); }
@keyframes drop {
  60% { opacity: 1; transform: translateY(0) rotate(2deg); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .wm--hero path, .js.ready .wm--hero path { animation: none; stroke-dashoffset: 0; }
  .js .ciocca, .js.ready .ciocca { animation: none; opacity: 1; transform: none; }
  .ciocca img, .look__frame img, .btn { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .bar__nav { display: none; }
  .bar__cta { margin-left: auto; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 0; }
  /* su telefono: foto e cartella una sotto l'altra, così si vede subito cosa cambia */
  .hero__copy { display: contents; }
  .hero__brand { order: 1; }
  .hero__lead { order: 2; }
  .hero__actions { order: 3; }
  .look { order: 4; margin-top: 36px; }
  .cartella { order: 5; margin-top: 20px; }
  .look__frame { max-height: none; }
  .servizi, .servizi__head, .lavori__head, .orari { grid-template-columns: minmax(0, 1fr); }
  .salone__text, .salone__a { grid-column: 1 / -1; }
  .salone__b, .salone__c { grid-column: span 6; }
  .lavori__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .salone__anni { grid-column: 1 / -1; flex-direction: row; }
  .salone__anni img { width: 50%; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wm--small { width: 104px; height: 14px; }
  .bar { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .bar__cta { padding: 0 14px; font-size: .85rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .ciocca { flex: 0 0 44px; }
  .servizi__list li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .lavori__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .salone__b, .salone__c { grid-column: 1 / -1; }
  .salone__anni { flex-direction: column; }
  .salone__anni img { width: 100%; }
  .orari__map, .orari__map iframe { min-height: 320px; }
}
