/* Arte Nuova mobili — vedi DIREZIONE.md */
:root {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #e4e4e1;
  --rust: #8a3b2f;
  --footer: #0e0e0e;
  --logo-grey: #707070;
  --logo-accent: #8a3b2f;

  --gutter: 40px;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 14px 36px rgba(17, 17, 17, .07);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Logo (SVG ricostruito) ---------- */
.logo-serif { font-family: "Libre Bodoni", Didot, "Bodoni 72", serif; font-weight: 400; font-size: 100px; fill: var(--logo-grey); }
.logo-sans  { font-family: "Jost", Futura, "Avenir Next", sans-serif; font-weight: 600; font-size: 54px; fill: var(--logo-accent); }
.logo-rule  { fill: var(--logo-accent); }

/* ---------- Tipografia ---------- */
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.eyebrow--light { color: rgba(255, 255, 255, .72); }
.h2 { margin: 0; font-weight: 500; font-size: clamp(34px, 4.1vw, 58px); line-height: 1.02; letter-spacing: -.035em; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.split .wi { display: inline-block; will-change: transform; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 9px;
  font-size: 14px; font-weight: 500; letter-spacing: -.005em; white-space: nowrap;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.btn--dark { background: var(--ink); color: #fff; box-shadow: 0 8px 20px rgba(17, 17, 17, .22); }
.btn--dark:hover { box-shadow: 0 14px 28px rgba(17, 17, 17, .26); }
.btn--light, .btn--white { background: #fff; color: var(--ink); box-shadow: 0 8px 22px rgba(17, 17, 17, .12); }
.btn--white { border: 1px solid var(--line); }
.link { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; }
.link span { transition: transform .4s var(--ease); }
.link:hover span { transform: translateX(4px); }
.link--light { color: #fff; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: var(--bg);
}
.loader__logo { width: 230px; height: 146px; }
.loader__bar { width: 180px; height: 1px; background: var(--line); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .3s linear; }
.loader__pct { font-size: 12px; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.is-loaded .loader { pointer-events: none; }

/* ---------- Navigazione ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 78px; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: rgba(244, 244, 242, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(17, 17, 17, .05);
}
.nav__logo svg { width: 82px; height: 52px; display: block; }
.nav__links { display: flex; gap: 34px; font-size: 14px; }
.nav__links a { position: relative; padding: 4px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { justify-self: end; padding: 11px 20px; }
.nav__menu { display: none; justify-self: end; width: 42px; height: 42px; border-radius: 9px; background: var(--ink); position: relative; }
.nav__menu span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: #fff; transition: transform .4s var(--ease); }
.nav__menu span:first-child { top: 17px; }
.nav__menu span:last-child { top: 24px; }
.nav__menu[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__menu[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--bg);
  display: flex; flex-direction: column; gap: 6px; padding: 120px 24px 40px;
}
.menu[hidden] { display: none; }
.menu a:not(.btn) { font-size: 34px; font-weight: 500; letter-spacing: -.03em; padding: 6px 0; border-bottom: 1px solid var(--line); }
.menu .btn { margin-top: 28px; align-self: flex-start; }

/* ---------- 01 Hero ---------- */
.hero { position: relative; height: 420vh; }
.hero__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero__stage { position: absolute; inset: 0; overflow: hidden; background: #ececec; transform-origin: 50% 40%; will-change: transform; }
.hero__canvas, .hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__poster { object-fit: cover; opacity: 0; }
.no-canvas .hero__poster { opacity: 1; }
.hero__shade {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0) 35%, rgba(10, 10, 10, .62) 100%), linear-gradient(90deg, rgba(10, 10, 10, .45) 0%, rgba(10, 10, 10, 0) 55%);
}

.hero__intro { position: absolute; left: var(--gutter); top: max(120px, 19vh); max-width: 1100px; }
.hero__title { margin: 0; font-weight: 500; font-size: clamp(44px, 6.2vw, 96px); line-height: .98; letter-spacing: -.045em; }
.hero__hint { display: flex; align-items: center; gap: 12px; margin-top: 30px; font-size: 13px; color: var(--muted); }
.hero__hint-line { width: 44px; height: 1px; background: currentColor; transform-origin: left; animation: hint 2.4s var(--ease) infinite; }
@keyframes hint { 0% { transform: scaleX(0); } 55% { transform: scaleX(1); transform-origin: left; } 56% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }

.hero__steps {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 30px;
  display: flex; gap: 28px; align-items: center; margin: 0; padding: 0; list-style: none;
  font-size: 12px; letter-spacing: .02em; color: rgba(17, 17, 17, .38); transition: color .6s;
}
.hero__steps li { display: flex; gap: 8px; transition: color .4s; }
.hero__steps li span { font-variant-numeric: tabular-nums; opacity: .7; }
.hero__steps li.is-active { color: var(--ink); }
.hero__steps.is-dark { color: rgba(255, 255, 255, .42); }
.hero__steps.is-dark li.is-active { color: #fff; }
.hero__progress { flex: 1; height: 1px; background: currentColor; opacity: .5; position: relative; overflow: hidden; max-width: 320px; margin-left: auto; }
.hero__progress i { position: absolute; inset: 0; background: currentColor; transform: scaleX(0); transform-origin: left; }

.hero__outro { position: absolute; left: var(--gutter); bottom: 96px; max-width: 720px; color: #fff; opacity: 0; visibility: hidden; }
.hero__outro-title { font-weight: 500; font-size: clamp(34px, 4.4vw, 66px); line-height: 1.02; letter-spacing: -.04em; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 30px; }

/* Movimento ridotto: hero statica sull'ultimo fotogramma */
.reduced .hero { height: 100vh; height: 100svh; }
.reduced .hero__intro, .reduced .hero__steps { display: none; }
.reduced .hero__shade, .reduced .hero__outro { opacity: 1; visibility: visible; }

/* ---------- 02 Numeri ---------- */
.intro { padding: 150px 0 70px; }
.intro__head { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.intro__lead { max-width: 440px; justify-self: end; color: var(--muted); font-size: 15px; padding-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 76px; }
.stat { height: 270px; perspective: 1400px; outline: none; cursor: default; }
.stat__inner { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .9s var(--ease); }
.stat:hover .stat__inner, .stat:focus-visible .stat__inner, .stat.is-flipped .stat__inner { transform: rotateY(180deg); }
.stat__face, .stat__back {
  position: absolute; inset: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  padding: 28px; display: flex; flex-direction: column;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.stat__back { transform: rotateY(180deg); justify-content: flex-end; }
.stat__back p { font-size: 15px; line-height: 1.5; color: var(--ink); }
.stat__icon { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.stat__num { margin-top: auto; font-size: 46px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.stat__label { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- 03/04 Vetrine con carosello ---------- */
.showcase {
  display: grid; grid-template-columns: minmax(300px, .78fr) 1.5fr; gap: 56px;
  max-width: 1440px; margin: 0 auto; padding: 110px var(--gutter);
}
.showcase--reverse { grid-template-columns: 1.5fr minmax(300px, .78fr); }
.showcase__text { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 0 4px; }
.showcase--reverse .showcase__text { align-items: flex-end; text-align: right; }
.showcase__lead { margin-top: 24px; max-width: 400px; color: var(--muted); font-size: 15px; }
.showcase__text .btn { margin-top: auto; }

.carousel { position: relative; min-width: 0; }
.carousel__track {
  display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 0 24px; cursor: grab;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.carousel__track.is-dragging img { pointer-events: none; }
.slide {
  position: relative; flex: 0 0 auto; margin: 0;
  height: clamp(320px, 33vw, 500px); aspect-ratio: 4 / 3.4;
  border-radius: var(--radius); overflow: hidden; scroll-snap-align: start;
  background: #e6e6e3;
}
.slide:nth-child(even) { height: clamp(260px, 26vw, 400px); align-self: flex-end; aspect-ratio: 4 / 4.2; }
.showcase--reverse .slide:nth-child(even) { align-self: flex-start; }
.slide img, .slide picture { width: 100%; height: 100%; }
.slide img { object-fit: cover; transform: scale(1.04); transition: transform 1.4s var(--ease); user-select: none; -webkit-user-drag: none; }
.slide:hover img { transform: scale(1.0); }
.slide figcaption {
  position: absolute; left: 14px; bottom: 14px; padding: 7px 12px; border-radius: 8px;
  background: rgba(255, 255, 255, .92); font-size: 12px; font-weight: 500;
  opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .5s var(--ease);
}
.slide:hover figcaption { opacity: 1; transform: none; }
.carousel__nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.showcase--reverse .carousel__nav { justify-content: flex-start; }
.arrow { width: 38px; height: 38px; border-radius: 9px; background: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 14px rgba(17, 17, 17, .2); transition: opacity .3s, transform .4s var(--ease); }
.arrow:hover { transform: translateY(-2px); }
.arrow:disabled { opacity: .28; cursor: default; transform: none; }
.arrow svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 05 La bottega ---------- */
.studio { padding-top: 70px; padding-bottom: 90px; }
.studio__card {
  position: relative; overflow: hidden; min-height: 600px;
  border-radius: 26px; background: var(--surface); box-shadow: var(--shadow);
  display: flex; align-items: center;
}
.studio__text { position: relative; z-index: 1; padding: 72px; max-width: 590px; }
.studio__text p { margin-top: 24px; max-width: 470px; color: var(--muted); font-size: 15px; }
.studio__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 34px; }
.studio__media { position: absolute; top: 0; right: 0; bottom: 0; width: 60%; }
.studio__media picture, .studio__media img { width: 100%; height: 100%; }
.studio__media img {
  object-fit: cover; object-position: 60% 50%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
}

/* ---------- 06 Contatto ---------- */
.cta { padding-bottom: 120px; }
.cta__box {
  position: relative; overflow: hidden; min-height: 660px; border-radius: 26px;
  background: #e8e8e5; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
  display: grid; place-items: center; padding: 80px 24px;
}
.tiles { position: absolute; inset: 0; }
.tile {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s);
  border-radius: 24%; background: #f7f7f5; padding: 9px;
  box-shadow: 0 22px 40px rgba(17, 17, 17, .12), 0 2px 6px rgba(17, 17, 17, .06), inset 0 1px 0 #fff;
  will-change: transform;
}
.tile img { width: 100%; height: 100%; object-fit: cover; border-radius: 18%; }
.tile--word { display: grid; place-items: center; padding: 10px; font-family: "Libre Bodoni", Didot, serif; font-size: 19px; color: #3a3a3a; letter-spacing: .01em; }
.cta__content { position: relative; z-index: 2; max-width: 520px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta__content p { margin-top: 20px; color: var(--muted); font-size: 15px; }
.cta__content .btn { margin-top: 30px; }
.cta__content .cta__alt { margin-top: 18px; font-size: 13px; }
.cta__alt a { color: var(--ink); border-bottom: 1px solid currentColor; }

/* ---------- Footer ---------- */
.footer { background: var(--footer); color: #f1f1ef; padding: 96px 0 34px; --logo-grey: #d9d9d6; --logo-accent: #c4624d; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1.1fr; gap: 40px; }
.footer__logo { width: 140px; height: 89px; display: block; }
.footer__brand p { margin-top: 22px; max-width: 280px; color: #9b9b98; font-size: 14px; }
.footer__col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer__col h3 { margin: 0 0 8px; font-size: 14px; font-weight: 500; color: #fff; }
.footer__col a, .footer__col p { color: #a9a9a6; transition: color .3s; line-height: 1.6; }
.footer__col a:hover { color: #fff; }
.footer__col--contact { align-items: flex-end; text-align: right; }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 88px; padding-top: 24px; background: linear-gradient(#262626, #262626) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px; font-size: 12px; color: #777774; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .showcase, .showcase--reverse { grid-template-columns: 1fr; gap: 40px; }
  .showcase--reverse .showcase__text { order: -1; align-items: flex-start; text-align: left; }
  .showcase__text .btn { margin-top: 30px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__col--contact { align-items: flex-start; text-align: left; }
}

@media (max-width: 768px) {
  :root { --gutter: 20px; --radius: 16px; }
  .nav { height: 66px; grid-template-columns: 1fr auto; }
  .nav__logo svg { width: 66px; height: 42px; }
  .nav__links, .nav__cta { display: none; }
  .nav__menu { display: block; }

  .hero { height: 360vh; }
  .hero__intro { top: 96px; }
  .hero__hint { margin-top: 20px; }
  .hero__steps { gap: 14px; bottom: 22px; font-size: 11px; }
  .hero__steps li:not(.is-active) { font-size: 0; gap: 0; }
  .hero__steps li:not(.is-active) span { font-size: 11px; }
  .hero__progress { max-width: none; }
  .hero__outro { bottom: 70px; right: var(--gutter); }

  .intro { padding: 100px 0 90px; }
  .intro__head { grid-template-columns: 1fr; gap: 22px; }
  .intro__lead { justify-self: start; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 44px; }
  .stat { height: 210px; }
  .stat__face, .stat__back { padding: 18px; }
  .stat__num { font-size: 34px; }
  .stat__label { font-size: 12px; }
  .stat__back p { font-size: 13px; }

  .showcase { padding: 70px var(--gutter); }
  .slide, .slide:nth-child(even) { height: 300px; aspect-ratio: 4 / 4.6; }

  .studio { padding-top: 30px; padding-bottom: 60px; }
  .studio__card { flex-direction: column-reverse; align-items: stretch; min-height: 0; }
  .studio__media { position: relative; width: 100%; height: 300px; }
  .studio__media img { -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 38%); mask-image: linear-gradient(0deg, transparent 0%, #000 38%); }
  .studio__text { padding: 8px 24px 36px; }

  .cta { padding-bottom: 80px; }
  .cta__box { min-height: 760px; padding: 200px 20px 210px; }
  .tile { left: var(--mx, var(--x)); top: var(--my, var(--y)); width: calc(var(--s) * .66); height: calc(var(--s) * .66); padding: 6px; }
  .tile--desk { display: none; }
  .tile--word { font-size: 13px; padding: 6px; }

  .footer { padding: 70px 0 30px; }
  .footer__top { grid-template-columns: 1fr; gap: 36px; }
  .footer__bottom { flex-direction: column; margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
