/* =========================================================
   Giulia Rosiello — sito v2 · Velo + Dal figurino al capo
   Colori dalla palette Pantone della collezione VisInvis;
   la carta è il fondo dei suoi figurini.
   ========================================================= */
:root {
  --black: #1E1E1E;      /* Process Black C */
  --paper: #EAE7E0;      /* carta dei figurini */
  --sheet: #F3F0EB;      /* fondo pagina */
  --thread: #86181B;     /* Jester Red: il filo dell'imbastitura */
  --ink: #225067;        /* Ink Blue */
  --muted: #464A53;      /* Cool Gray 11 C */

  --bg: var(--sheet);
  --text: var(--black);
  --text-2: var(--muted);
  --line: rgba(30, 30, 30, .16);

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gut: clamp(1.1rem, 3.6vw, 3rem);

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1E1E1E; --text: #EAE7E0; --text-2: #A9A7A2; --line: rgba(234,231,224,.16);
  }
}
:root[data-theme="dark"] {
  --bg: #1E1E1E; --text: #EAE7E0; --text-2: #A9A7A2; --line: rgba(234,231,224,.16);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-variation-settings: "wdth" 100;
  font-weight: 380; font-size: clamp(1rem, .35vw + .9rem, 1.12rem); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--thread); outline-offset: 3px; }

/* =========================================================
   VELO
   ========================================================= */
.velo {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100svh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  background: var(--black); color: var(--paper);
  touch-action: pan-y;
}
.velo-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.2s ease;
}
.velo.is-ready .velo-canvas { opacity: 1; }

/* colonne sopra la tela: didascalie e cursore */
.velo-cols {
  position: absolute; inset: 0; z-index: 1;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .velo-cols, .velo-cols * { cursor: none; }
}
.velo-col { position: relative; }
.velo-cap {
  position: absolute; left: 1rem; right: 1rem; top: clamp(5.5rem, 14vh, 8rem);
  font-size: .82rem; font-variation-settings: "wdth" 82; font-weight: 460;
  letter-spacing: .01em; color: var(--paper);
  opacity: 0; transform: translateY(.4rem);
  transition: opacity .35s ease, transform .35s ease;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
}
.velo-col:hover .velo-cap { opacity: .95; transform: none; }
@media (hover: none) { .velo-cap { opacity: .8; transform: none; } }

/* leggibilità del testo sopra le immagini */
.velo::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(30,30,30,.82) 0%, rgba(30,30,30,.25) 34%, rgba(30,30,30,0) 55%),
    linear-gradient(to bottom, rgba(30,30,30,.55) 0%, rgba(30,30,30,0) 22%);
}

/* testo e comandi: non bloccano il velo, solo link e pulsanti catturano il puntatore */
.velo-ui {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: clamp(1rem, 2.4vw, 1.6rem) var(--gut) clamp(1.2rem, 3vw, 2.2rem);
}
.velo-ui a, .velo-ui button { pointer-events: auto; }

.velo-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; }
.velo-intro { margin: 0; max-width: 30ch; font-size: .98rem; line-height: 1.45; color: rgba(234,231,224,.9); }
.velo-nav { display: flex; gap: clamp(.9rem, 2.4vw, 2rem); list-style: none; margin: 0; padding: 0; }
.velo-nav a {
  text-decoration: none; font-size: .95rem; padding-bottom: .2rem;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size .35s cubic-bezier(.2,.7,.2,1);
}
.velo-nav a:hover, .velo-nav a:focus-visible { background-size: 100% 1px; }

.velo-name {
  margin: 0 0 clamp(1rem, 2.6vh, 1.8rem); text-wrap: balance;
  font-weight: 200; font-variation-settings: "wdth" 125;
  font-size: clamp(2.9rem, 10.6vw, 11.5rem); line-height: .86; letter-spacing: -.01em;
}
.velo-name .w { display: inline-block; white-space: nowrap; }
.velo-name .ch {
  display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(.08em);
  animation: velo-focus 1.1s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: calc(.35s + var(--i) * 45ms);
}
@keyframes velo-focus { to { opacity: 1; filter: blur(0); transform: none; } }

.velo-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; }
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.4rem;
  border-radius: 999px; font: inherit; font-size: .98rem; text-decoration: none; cursor: pointer;
  border: 1px solid rgba(234,231,224,.6); background: transparent; color: var(--paper);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { border-color: var(--paper); }
.btn-solid { background: var(--paper); color: var(--black); border-color: var(--paper); }
.btn-solid:hover { background: #fff; }
.velo-still {
  margin-left: auto; font: inherit; font-size: .88rem; color: rgba(234,231,224,.75);
  background: none; border: 0; padding: .6rem 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px;
}
.velo-still:hover { color: var(--paper); }

/* cursore-lente */
.velo-cursor {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%;
  border: 1px solid rgba(234,231,224,.85);
  display: grid; place-items: center;
  font-size: .78rem; font-variation-settings: "wdth" 82; font-weight: 460; color: var(--paper);
  transition: opacity .25s ease, width .3s ease, height .3s ease, margin .3s ease;
}
.velo-cursor.is-hidden { opacity: 0; }
@media not ((hover: hover) and (pointer: fine)) { .velo-cursor { display: none; } }
.velo.is-still .velo-cursor { display: none; }
.velo.is-still .velo-cols, .velo.is-still .velo-cols * { cursor: auto; }

@media (max-width: 720px) {
  .velo-nav { display: none; }
  .velo-still { margin-left: 0; width: 100%; text-align: left; }
  .velo-cap { top: auto; bottom: 46%; left: .5rem; right: .5rem; font-size: .72rem; }
}

/* =========================================================
   DAL FIGURINO AL CAPO
   ========================================================= */
.fc { padding: clamp(4.5rem, 11vw, 9rem) var(--gut); }
.fc-inner { max-width: 1180px; margin: 0 auto; }
.fc-head { max-width: 58rem; margin-bottom: clamp(2.2rem, 5vw, 3.8rem); }
.fc-title {
  margin: 0; text-wrap: balance; font-weight: 250; font-variation-settings: "wdth" 118;
  font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: .98; letter-spacing: -.005em;
}
.fc-lede { margin: 1.1rem 0 0; color: var(--text-2); max-width: 44ch; }

.fc-body { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 880px) { .fc-body { grid-template-columns: auto minmax(0, 1fr); } }

/* la tavola */
.fc-frame {
  --p: 50%; --sketch-o: 1; --photo-o: 1;
  position: relative; overflow: hidden; margin: 0 auto;
  height: clamp(28rem, 76svh, 47rem); aspect-ratio: .8; max-width: 100%;
  background: var(--paper); border-radius: 2px;
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  box-shadow: 0 1px 0 rgba(30,30,30,.06), 0 30px 60px -40px rgba(30,30,30,.45);
}
@media (max-width: 879px) { .fc-frame { height: auto; width: 100%; } }

.fc-layer { position: absolute; inset: 0; margin: 0; }
.fc-layer img {
  width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none;
  transition: opacity .22s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.fc-photo { background: #2a2a2a; overflow: hidden; }
.fc-photo .fc-bg {
  position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover;
  filter: blur(26px) saturate(.9) brightness(.52);
}
.fc-photo .fc-main { position: relative; object-fit: contain; padding: 3.5% 0; }
.fc-sketch { background: var(--paper); clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.fc-sketch img {
  object-fit: contain; padding: 3.5% 0;
  filter: drop-shadow(0 22px 22px rgba(30,30,30,.16)) drop-shadow(0 2px 3px rgba(30,30,30,.12));
}
.fc-frame.is-dragging .fc-photo .fc-main { transform: scale(1.025); }
.fc-frame.is-swapping img { opacity: 0; }

.fc-tag {
  position: absolute; top: .9rem; z-index: 2; pointer-events: none;
  font-size: .8rem; font-variation-settings: "wdth" 82; font-weight: 480;
  padding: .28rem .6rem; border-radius: 999px;
}
.fc-tag-sketch { left: .9rem; background: rgba(243,240,235,.92); color: var(--black); opacity: var(--sketch-o); }
.fc-tag-photo { right: .9rem; background: rgba(30,30,30,.72); color: var(--paper); opacity: var(--photo-o); }

/* la cucitura: imbastitura rossa */
.fc-seam {
  position: absolute; top: 0; bottom: 0; left: var(--p); z-index: 3;
  width: 44px; margin-left: -22px; cursor: ew-resize; outline: none;
}
.fc-seam::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  background: repeating-linear-gradient(to bottom, var(--thread) 0 11px, transparent 11px 18px);
  filter: drop-shadow(0 0 1px rgba(243,240,235,.9));
}
.fc-knot {
  position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; background: var(--sheet); color: var(--thread);
  border: 1.5px solid var(--thread);
  display: grid; place-items: center;
  box-shadow: 0 8px 22px -10px rgba(30,30,30,.55);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background-color .2s ease, color .2s ease;
}
.fc-knot svg { width: 22px; height: 22px; }
.fc-frame:hover .fc-knot, .fc-frame.is-dragging .fc-knot { transform: scale(1.08); }
.fc-seam:focus-visible .fc-knot { background: var(--thread); color: var(--sheet); outline: 2px solid var(--thread); outline-offset: 3px; }

/* scheda del capo */
.fc-info { max-width: 30rem; }
.fc-nav { display: flex; align-items: center; gap: .4rem; margin: 0 0 .7rem; }
.fc-count { margin: 0 auto 0 0; color: var(--text-2); font-size: .9rem; font-variant-numeric: tabular-nums; }
.fc-step {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--line);
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.fc-step svg { width: 18px; height: 18px; }
.fc-step:hover { border-color: var(--thread); color: var(--thread); }
.fc-name {
  margin: 0; font-weight: 300; font-variation-settings: "wdth" 112;
  font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.08;
}
.fc-text { margin: .8rem 0 0; color: var(--text-2); min-height: 3.1em; }

.fc-groups { display: flex; flex-wrap: wrap; gap: 1.4rem 1.8rem; margin-top: 2rem; }
.fc-group-name { margin: 0 0 .55rem; font-size: .84rem; font-variation-settings: "wdth" 88; color: var(--text-2); }
.fc-picks { display: flex; gap: .55rem; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.fc-pick {
  position: relative; display: grid; gap: .45rem; justify-items: start;
  padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left;
}
.fc-pick-img {
  width: 3.9rem; aspect-ratio: .42; overflow: hidden; border-radius: 2px; background: var(--paper);
  outline: 1px solid var(--line); outline-offset: 0;
  transition: outline-color .2s ease, transform .3s cubic-bezier(.2,.7,.2,1);
}
.fc-pick-img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.fc-pick-label { font-size: .78rem; font-variation-settings: "wdth" 84; color: var(--text-2); white-space: nowrap; }
.fc-pick:hover .fc-pick-img { transform: translateY(-3px); }
.fc-pick[aria-pressed="true"] .fc-pick-img { outline: 2px solid var(--thread); }
.fc-pick[aria-pressed="true"] .fc-pick-label { color: var(--text); }
.fc-help { margin: 1.6rem 0 0; font-size: .88rem; color: var(--text-2); }

/* =========================================================
   Movimento ridotto
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .velo-name .ch { animation: none; opacity: 1; filter: none; transform: none; }
  .velo-canvas { transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* =========================================================
   FIRMA
   ========================================================= */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.velo-name { width: min(100%, clamp(18rem, 58vw, 60rem)); line-height: 0; }
.firma-anim { display: block; width: 100%; height: auto; color: var(--paper); overflow: visible; }
.firma-pen path {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: firma-draw var(--t) cubic-bezier(.45,.05,.55,.95) calc(var(--d) + .6s) forwards;
}
.firma-fill { opacity: 0; animation: firma-fill .6s ease calc(var(--d) + .6s) forwards; }
@keyframes firma-draw { to { stroke-dashoffset: 0; } }
@keyframes firma-fill { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .firma-pen path { animation: none; stroke-dashoffset: 0; }
  .firma-fill { animation: none; opacity: 1; }
}
@media (max-width: 720px) { .velo-name { width: 100%; } }

/* =========================================================
   CONTATTI
   ========================================================= */
.ft { background: var(--black); color: var(--paper); padding: clamp(4rem, 10vw, 7rem) var(--gut) 2rem; }
.ft-inner { max-width: 1320px; margin: 0 auto; display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.ft-sig { display: block; width: min(100%, 44rem); color: var(--paper); }
.ft-sig svg { display: block; width: 100%; aspect-ratio: 4527 / 1402; }
.ft-sig:hover { color: #fff; }
.ft-cols { display: grid; gap: 1.6rem 3rem; }
@media (min-width: 860px) { .ft-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } }
.ft-lead { margin: 0; max-width: 30ch; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.45; }
.ft-meta { margin: 0; display: grid; gap: .8rem; }
.ft-meta div { border-top: 1px solid rgba(234,231,224,.18); padding-top: .55rem; display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; }
.ft-meta dt { color: #A9A7A2; font-variation-settings: "wdth" 88; }
.ft-meta dd { margin: 0; }
.ft-meta a { text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat; padding-bottom: .1rem; }
.ft-meta a:hover { color: #fff; }
.ft-note { max-width: 1320px; margin: clamp(3rem, 7vw, 5rem) auto 0; font-size: .85rem; color: #A9A7A2; }

