/* Mohamed Arredamenti — style.css */

:root {
  --bg: #EFEDEA;
  --surface: #FFFFFF;
  --ink: #141312;
  --ink-2: #615D58;
  --accent: #7A2B25;
  --night: #11100F;
  --night-ink: #EDEBE7;
  --night-ink-2: #9D978F;
  --line: rgba(20, 19, 18, .1);

  --sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;

  --pad: clamp(20px, 5.5vw, 88px);
  --radius: 24px;
  --shadow: 0 1px 0 rgba(20, 19, 18, .04), 0 24px 48px -28px rgba(20, 19, 18, .28);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::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; }
.lenis.lenis-stopped { overflow: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  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; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px;
}
.skip:focus { top: 16px; }

/* ---------- Tipografia ---------- */
.eyebrow {
  display: block;
  font-size: 13px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2);
}
.display {
  display: block;
  font-size: clamp(44px, 6.4vw, 96px);
  font-weight: 500; line-height: .98; letter-spacing: -.04em;
}
.display--md { font-size: clamp(40px, 5.2vw, 78px); }
.title {
  font-size: clamp(36px, 4.6vw, 68px);
  font-weight: 500; line-height: 1.02; letter-spacing: -.035em;
}
.title--center { text-align: center; }
.lead { font-size: clamp(17px, 1.35vw, 20px); color: var(--ink-2); max-width: 36ch; }

/* ---------- Pillole ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: -.005em; white-space: nowrap;
  transition: transform .35s var(--ease), background-color .35s, color .35s, box-shadow .35s;
}
.pill:hover { transform: translateY(-2px); }
.pill--dark { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -12px rgba(20, 19, 18, .6); }
.pill--light { background: var(--night-ink); color: var(--ink); }
.pill--white { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.pill--ghost { color: var(--night-ink); box-shadow: inset 0 0 0 1px rgba(237, 235, 231, .35); }
.pill--ghost:hover { box-shadow: inset 0 0 0 1px rgba(237, 235, 231, .8); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.actions--center { justify-content: center; }

/* ---------- Loader ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: var(--bg);
}
.loader__inner { width: min(320px, 70vw); display: grid; gap: 14px; }
.loader__label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.loader__count { font-size: 64px; font-weight: 500; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.loader__bar { 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; }
.reduced .loader { display: none; }

/* ---------- Navigazione ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--pad);
  transition: background-color .5s, color .5s, backdrop-filter .5s, padding .5s var(--ease);
}
.nav__logo img { height: 46px; width: auto; border-radius: 6px; }
.nav__links {
  display: flex; gap: 30px; font-size: 15px; font-weight: 500;
  padding: 12px 24px; border-radius: 999px;
  background: rgba(239, 237, 234, .62);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background-color .5s;
}
.nav--solid .nav__links { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav--night .nav__links { background: rgba(17, 16, 15, .42); }
.nav__links a { position: relative; opacity: .82; transition: opacity .3s; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav--solid { background: rgba(239, 237, 234, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: 12px; padding-bottom: 12px; }
.nav--night { color: var(--night-ink); }
.nav--night .nav__cta { background: var(--night-ink); color: var(--ink); box-shadow: none; }

/* ---------- 1. Hero ---------- */
.hero { position: relative; height: 440vh; }
.hero__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: #E9E8E6;
}
.hero__media { position: absolute; inset: 0; }
.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__scrim { position: absolute; inset: 0; pointer-events: none; }
.hero__scrim::before, .hero__scrim::after { content: ""; position: absolute; inset: 0; transition: none; }
.hero__scrim::before {
  background: linear-gradient(90deg, rgba(239, 237, 234, .94) 0%, rgba(239, 237, 234, .72) 32%, rgba(239, 237, 234, 0) 62%);
  opacity: var(--scrim-light, 1);
}
.hero__scrim::after {
  background: linear-gradient(90deg, rgba(17, 16, 15, .86) 0%, rgba(17, 16, 15, .55) 34%, rgba(17, 16, 15, 0) 66%);
  opacity: var(--scrim-dark, 0);
}
.grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__copy {
  position: absolute; inset: 0;
  display: grid; align-items: center;
  padding: 120px var(--pad) 80px;
  pointer-events: none;
}
.chapter { grid-area: 1 / 1; max-width: 640px; pointer-events: auto; }
.chapter h1 { font-weight: inherit; }
.chapter .eyebrow { margin-bottom: 26px; }
.chapter .lead { margin-top: 26px; }
.chapter--3 { color: var(--night-ink); }
.chapter--3 .lead { color: var(--night-ink-2); }
.js .chapter--2, .js .chapter--3 { opacity: 0; visibility: hidden; }

.scroll-cue { display: flex; align-items: center; gap: 14px; margin-top: 44px; font-size: 14px; color: var(--ink-2); }
.scroll-cue span { position: relative; width: 1px; height: 44px; background: var(--line); overflow: hidden; }
.scroll-cue span::after {
  content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 45%;
  background: var(--ink); animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { 0% { transform: translateY(-100%); } 100% { transform: translateY(230%); } }

.hero__progress { position: absolute; left: var(--pad); right: var(--pad); bottom: 28px; height: 1px; background: rgba(20, 19, 18, .12); }
.hero__progress span { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.is-night .hero__progress { background: rgba(237, 235, 231, .18); }
.is-night .hero__progress span { background: var(--night-ink); }

/* ---------- 2. Chi siamo ---------- */
.intro { padding: clamp(110px, 18vh, 200px) var(--pad) clamp(80px, 12vh, 140px); }
.intro__head {
  display: grid; grid-template-columns: 7fr 5fr; gap: 40px 64px; align-items: start;
  margin-bottom: clamp(56px, 9vh, 96px);
}
.intro__text { color: var(--ink-2); font-size: clamp(16px, 1.2vw, 18px); max-width: 46ch; padding-top: 10px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact {
  position: relative; overflow: hidden;
  min-height: 320px; padding: 26px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.fact:hover { transform: translateY(-6px); box-shadow: 0 1px 0 rgba(20, 19, 18, .04), 0 40px 60px -32px rgba(20, 19, 18, .35); }
.fact__value { font-size: clamp(30px, 2.6vw, 40px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
.fact__label, .fact__more { font-size: 14px; line-height: 1.45; color: var(--ink-2); margin-top: 8px; max-width: 26ch; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.fact__more { position: absolute; left: 26px; right: 26px; bottom: 26px; opacity: 0; transform: translateY(10px); color: var(--ink); }
@media (hover: hover) {
  .fact:hover .fact__label { opacity: 0; transform: translateY(-8px); }
  .fact:hover .fact__more { opacity: 1; transform: none; }
}
.fact__status {
  position: absolute; top: 24px; left: 26px; right: 26px;
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.fact__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #B9B4AE; flex: none; }
.fact__status[data-open="true"]::before { background: #2F8F5B; box-shadow: 0 0 0 4px rgba(47, 143, 91, .16); }
.fact__status[data-open="false"]::before { background: var(--accent); }
.fact--photo { color: #fff; background: #2a2725; }
.fact--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.fact--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 16, 15, .08) 0%, rgba(17, 16, 15, .35) 40%, rgba(17, 16, 15, .84) 100%); }
.fact--photo:hover img { transform: scale(1.05); }
.fact--photo > :not(img) { position: relative; z-index: 1; }
.fact--photo .fact__label { color: rgba(255, 255, 255, .78); }
.fact--photo .fact__more { color: #fff; position: absolute; }
.fact--dark { background: var(--night); color: var(--night-ink); }
.fact--dark .fact__label { color: var(--night-ink-2); }
.fact--dark .fact__more { color: var(--night-ink); }

/* ---------- 3. Collezioni ---------- */
.collections {
  display: grid; grid-template-columns: minmax(280px, 4fr) 8fr; gap: 48px;
  padding: clamp(60px, 10vh, 120px) 0 clamp(80px, 14vh, 160px) var(--pad);
}
.collections__side { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding-top: 8px; }
.collections__text { color: var(--ink-2); max-width: 36ch; font-size: clamp(16px, 1.15vw, 18px); }
.collections__arrows { display: flex; gap: 10px; margin-top: auto; padding-top: 32px; }
.arrow {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  transition: transform .35s var(--ease), opacity .3s;
}
.arrow:hover { transform: translateY(-2px); }
.arrow[disabled] { opacity: .25; cursor: default; transform: none; }
.arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.track {
  display: flex; gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: 0;
  padding: 8px var(--pad) 24px 0;
  scrollbar-width: none; cursor: grab;
}
.track::-webkit-scrollbar { display: none; }
.track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.track.is-dragging .card { pointer-events: none; }
.card { flex: 0 0 clamp(270px, 30vw, 460px); scroll-snap-align: start; }
.card__img {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.card__img img { width: 100%; height: 100%; transition: transform 1.2s var(--ease); user-select: none; -webkit-user-drag: none; }
.card__img--cover img { object-fit: cover; }
.card__img--product img { object-fit: contain; padding: 12%; }
.card:hover .card__img img { transform: scale(1.04); }
.card__cat { margin-top: 20px; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.card__title { margin-top: 6px; font-size: clamp(21px, 1.7vw, 26px); font-weight: 500; letter-spacing: -.025em; line-height: 1.15; }
.card__text { margin-top: 8px; font-size: 15px; color: var(--ink-2); max-width: 38ch; }

/* ---------- 4. Come lavoriamo ---------- */
.method { padding: 0 var(--pad) clamp(90px, 14vh, 160px); }
.quote {
  background: var(--surface); border-radius: calc(var(--radius) + 8px); box-shadow: var(--shadow);
  padding: clamp(48px, 9vw, 140px) clamp(28px, 8vw, 130px);
}
.quote__text { font-size: clamp(30px, 4.3vw, 66px); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; max-width: 20ch; }
.quote .eyebrow { margin-top: 40px; }
.method__body { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; margin-top: clamp(80px, 12vh, 140px); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { border-top: 1px solid var(--line); padding-top: 22px; }
.step__n { font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--accent); line-height: 1; }
.step h3 { margin-top: 26px; font-size: 21px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.step p { margin-top: 10px; font-size: 15px; color: var(--ink-2); }

/* ---------- 5. Visita ---------- */
.visit { padding: 0 var(--pad) clamp(70px, 10vh, 120px); }
.visit__panel {
  position: relative; overflow: hidden;
  min-height: max(640px, 92vh);
  display: grid; place-items: center;
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(180deg, #E6E4E0 0%, #DCD9D4 100%);
}
.visit__copy { position: relative; z-index: 2; max-width: 600px; padding: 40px 24px; text-align: center; }
.visit__copy p { margin: 22px auto 0; color: var(--ink-2); max-width: 44ch; }
.tiles { position: absolute; inset: 0; z-index: 1; }
.tile {
  position: absolute; display: grid; place-items: center;
  width: clamp(104px, 12vw, 190px); aspect-ratio: 1;
  background: var(--surface); border-radius: 28px;
  box-shadow: 0 2px 0 rgba(20, 19, 18, .03), 0 30px 50px -26px rgba(20, 19, 18, .35);
  will-change: transform;
}
.tile img { width: 100%; height: 100%; object-fit: contain; padding: 14%; }
.tile--1 { left: 7%;  top: 12%; rotate: -9deg; }
.tile--2 { left: 30%; top: 4%;  rotate: 7deg; width: clamp(90px, 10vw, 160px); }
.tile--3 { right: 8%; top: 10%; rotate: 10deg; }
.tile--4 { left: 4%;  bottom: 14%; rotate: 8deg; width: clamp(80px, 8vw, 130px); }
.tile--3 img, .tile--4 img { object-fit: cover; padding: 0; border-radius: inherit; }
.tile--3 { overflow: hidden; }
.tile--3 img { transform: scale(1.6); }
.tile--5 { right: 26%; bottom: 5%; rotate: -6deg; }
.tile--6 { right: 5%; bottom: 20%; rotate: -12deg; width: clamp(90px, 10vw, 160px); }

/* ---------- 6. Footer ---------- */
.footer { background: var(--night); color: var(--night-ink); padding: clamp(70px, 12vh, 130px) var(--pad) 32px; }
.footer__top { display: grid; grid-template-columns: 2.2fr repeat(4, 1fr); gap: 40px; }
.footer__brand img { height: 56px; width: auto; border-radius: 6px; }
.footer__brand p { margin-top: 22px; color: var(--night-ink-2); max-width: 30ch; font-size: 15px; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 15px; }
.footer__col h2 { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--night-ink-2); margin-bottom: 8px; }
.footer__col address { font-style: normal; }
.footer__col a { border-bottom: 1px solid rgba(237, 235, 231, .25); transition: border-color .3s; }
.footer__col a:hover { border-color: var(--night-ink); }
.footer .muted { color: var(--night-ink-2); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: clamp(60px, 10vh, 110px); padding-top: 24px;
  border-top: 1px solid rgba(237, 235, 231, .12);
  font-size: 13px; color: var(--night-ink-2);
}

/* ---------- Animazioni di ingresso ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w > span { display: inline-block; }
.qw { opacity: .14; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: repeat(2, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
  .method__body { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  body { font-size: 16px; }
  .nav { padding: 12px 16px; }
  .nav__links { display: none; }
  .nav__logo img { height: 38px; }
  .nav .pill { min-height: 42px; padding: 0 18px; font-size: 14px; }

  .hero { height: 400vh; }
  .hero__media {
    top: auto; bottom: 0; height: min(125vw, 60svh);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%);
    mask-image: linear-gradient(180deg, transparent 0, #000 22%);
  }
  .hero__scrim { display: none; }
  .hero__copy { align-items: start; padding: 96px 16px 0; }
  .chapter .eyebrow { margin-bottom: 16px; font-size: 11px; }
  .display { font-size: clamp(38px, 11vw, 46px); }
  .display--md { font-size: clamp(34px, 9.6vw, 42px); }
  .chapter .lead { margin-top: 16px; font-size: 16px; }
  .scroll-cue { margin-top: 22px; }
  .actions { margin-top: 22px; }
  .hero__progress { left: 16px; right: 16px; bottom: 16px; }

  .intro { padding: 96px 16px 72px; }
  .intro__head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
  .facts { grid-template-columns: 1fr; gap: 12px; }
  .fact { min-height: 210px; padding: 22px; }
  .fact__more { position: static; opacity: 1; transform: none; color: var(--ink); font-weight: 500; }
  .fact--photo .fact__more, .fact--dark .fact__more { position: static; color: inherit; }
  .fact__status { top: 20px; left: 22px; }

  .collections { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 80px 16px; }
  .collections__side { padding-right: 16px; }
  .collections__arrows { display: none; }
  .track { padding-right: 16px; }
  .card { flex-basis: 80vw; }

  .method { padding: 0 16px 80px; }
  .quote { padding: 48px 24px; border-radius: 24px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step h3 { margin-top: 14px; }

  .visit { padding: 0 16px 56px; }
  .visit__panel { min-height: 680px; border-radius: 24px; }
  .tile { width: 92px; border-radius: 20px; }
  .tile--1 { left: -4%; top: 6%; }
  .tile--2 { left: 38%; top: 2%; width: 80px; }
  .tile--3 { right: -3%; top: 9%; }
  .tile--4 { left: 4%; bottom: 6%; width: 74px; }
  .tile--5 { right: 30%; bottom: 2%; }
  .tile--6 { right: -2%; bottom: 10%; width: 84px; }

  .footer { padding: 72px 16px 28px; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .footer__bottom { flex-direction: column; }
}

/* ---------- Movimento ridotto / senza canvas ---------- */
.reduced .hero { height: auto; }
.reduced .hero__stage { position: relative; height: 100vh; height: 100svh; background: var(--night); }
.reduced .hero__canvas { display: none; }
.reduced .hero__poster { opacity: 1; }
.reduced .hero__scrim { --scrim-light: 0; --scrim-dark: 1; }
.reduced .chapter--1, .reduced .chapter--1 .eyebrow { color: var(--night-ink); }
.reduced .chapter--1 { align-self: center; }
.reduced .chapter--3 .display, .reduced .chapter--3 .lead { display: none; }
.reduced .chapter--3 { opacity: 1; visibility: visible; align-self: end; margin-bottom: 40px; }
.reduced .scroll-cue, .reduced .hero__progress, .reduced .chapter--2 { display: none; }
.reduced .reveal { opacity: 1; transform: none; }
.reduced .qw { opacity: 1; }
.reduced .grain { display: none; }
@media (max-width: 767px) {
  .reduced .hero__media { height: 100%; -webkit-mask-image: none; mask-image: none; }
  .reduced .hero__scrim { display: block; }
  .reduced .hero__scrim::after { background: linear-gradient(180deg, rgba(17, 16, 15, .55) 0%, rgba(17, 16, 15, .78) 100%); }
  .reduced .hero__copy { padding-top: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
