/* ═══════════════════════════════════════════════════════
   SA PEDRA COSTRUZIONI — Costa Smeralda
   Palette: sabbia / granito / carbone caldo + terracotta
   Type: Fraunces (display serif) + Outfit (grotesk)
   ═══════════════════════════════════════════════════════ */

:root {
  --sand: #EFE9E1;
  --sand-2: #E4DCD0;
  --stone: #C9BEAE;
  --char: #1B1815;
  --char-2: #262119;
  --ink: #2E2921;
  --muted: #7C7264;
  --terra: #B0603A;
  --terra-soft: #C97F58;
  --line: rgba(27, 24, 21, 0.14);
  --line-light: rgba(239, 233, 225, 0.16);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--terra); color: var(--sand); }

/* ── grain ─────────────────────────────────────────── */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ── intro: dal progetto alla villa ────────────────── */
.intro {
  position: fixed; inset: 0; z-index: 200;
  background: var(--char);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity 0.85s ease;
}
.intro.is-done { opacity: 0; pointer-events: none; }
.intro__grid {
  position: absolute; inset: 0; opacity: 0.35;
  background-image:
    linear-gradient(rgba(239,233,225,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239,233,225,0.055) 1px, transparent 1px);
  background-size: 44px 44px;
}
.intro__svg {
  position: relative; z-index: 2;
  width: min(88vw, 760px); height: auto;
  transition: transform 0.9s var(--ease-out), opacity 0.5s ease;
}
.intro.is-done .intro__svg { transform: scale(1.07); }
.intro__svg .d {
  stroke: var(--sand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 2000; stroke-dashoffset: 2000; /* nascosti prima che parta il JS */
}
.intro__svg .thin, .intro__svg .tick { stroke-width: 1.4; opacity: 0.85; }
.intro__svg .f { stroke-width: 1.2; opacity: 0.5; }
.intro__svg .dim { stroke: var(--stone); stroke-width: 1.1; opacity: 0.75; }
.intro__svg .dim-label {
  fill: var(--stone); font-family: var(--font-body); font-weight: 300;
  font-size: 15px; letter-spacing: 0.16em;
}
.intro__svg .spray {
  fill: #C9503D; font-family: "Caveat", cursive; font-size: 27px;
  transform: rotate(-1.5deg); transform-box: fill-box; transform-origin: center;
}
.intro__svg .spray-line {
  stroke: #C9503D; stroke-width: 2.4; opacity: 0;
  stroke-dasharray: 12 7 !important; stroke-dashoffset: 0 !important;
}
.intro__svg .t { opacity: 0; transition: opacity 0.45s ease; }
.intro__svg .t.on { opacity: 1; }
.intro__svg .spray.t.on { opacity: 0.95; }

/* ── intro, fase 2: la casa si costruisce coi materiali veri ── */
.intro__svg .tex { opacity: 0.96; }
.tex--footing { clip-path: inset(0 100% 0 0); transition: clip-path 0.8s var(--ease-out) 0.05s; }
.tex--wall { clip-path: inset(100% 0 0 0); transition: clip-path 1.35s var(--ease-out) 0.3s; }
.tex--roof { clip-path: inset(0 100% 0 0); transition: clip-path 1s var(--ease-out) 1.25s; }
.tex--chimney { clip-path: inset(100% 0 0 0); transition: clip-path 0.5s var(--ease-out) 1.7s; }
.tex--boulder { opacity: 0; transition: opacity 0.9s ease 1.55s; }
.intro.is-building .tex--footing, .intro.is-building .tex--wall,
.intro.is-building .tex--roof, .intro.is-building .tex--chimney { clip-path: inset(0 0 0 0); }
.intro.is-building .tex--boulder { opacity: 0.96; }

.intro__svg .fill { opacity: 0; transition: opacity 0.7s ease; }
.fill--door { fill: #7A5236; transition-delay: 1.6s; }
.fill--pergola { fill: #6E5138; transition-delay: 1.8s; }
.fill--glass { fill: #232A33; transition-delay: 2s; }
.intro.is-building .fill { opacity: 0.96; }

.intro__svg .glow { fill: #F2C077; opacity: 0; transition: opacity 0.9s ease; }
.intro__svg .glow--halo { transition-delay: 0.15s; }
.intro__svg .glow--door { transition-delay: 0.3s; }
.intro.is-lit .glow { opacity: 0.92; }
.intro.is-lit .glow--halo { opacity: 0.48; }
.intro.is-lit .glow--door { opacity: 0.5; }

.smoke__p { fill: var(--stone); opacity: 0; }
.intro.is-lit .smoke__p { animation: smokeRise 2.8s ease-out infinite; }
.intro.is-lit .smoke__p--2 { animation-delay: 0.95s; }
.intro.is-lit .smoke__p--3 { animation-delay: 1.8s; }
@keyframes smokeRise {
  0% { opacity: 0; transform: translateY(0) scale(0.7); }
  22% { opacity: 0.32; }
  100% { opacity: 0; transform: translateY(-48px) scale(1.55); }
}

/* la gru */
.crane { opacity: 0; transition: opacity 0.7s ease 0.1s; }
.intro.is-building .crane { opacity: 1; }
.intro.is-crane-out .crane { opacity: 0 !important; transition: opacity 0.6s ease; }
.crane .c { stroke: var(--stone); stroke-width: 1.6; opacity: 0.85; }
.crane .thin { stroke-width: 0.9; opacity: 0.5; }
.crane .cw { fill: #322C24; stroke: var(--stone); stroke-width: 1.2; }
.crane__trolley { animation: trolleyMove 5.5s ease-in-out infinite alternate; }
@keyframes trolleyMove { from { transform: translateX(0); } to { transform: translateX(175px); } }
.crane__hoist { transform-box: fill-box; transform-origin: 50% 0; animation: hoistSway 2.4s ease-in-out infinite alternate; }
@keyframes hoistSway { from { transform: rotate(-2.4deg); } to { transform: rotate(2.4deg); } }
.intro__status {
  position: absolute; left: 50%; bottom: clamp(2rem, 7vh, 4rem); transform: translateX(-50%);
  z-index: 2; display: flex; align-items: baseline; gap: 1.1rem; white-space: nowrap;
}
.intro__label {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--stone); transition: color 0.4s ease;
}
.intro__label.is-final {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  text-transform: none; letter-spacing: 0.04em; font-size: 1.5rem; color: var(--sand);
}
.intro__pct {
  font-size: 0.85rem; color: var(--terra-soft); letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums; transition: opacity 0.3s ease;
}
.intro__skip {
  position: absolute; right: clamp(1.2rem, 4vw, 3rem); top: clamp(1.2rem, 4vh, 2.2rem); z-index: 3;
  background: none; border: 1px solid var(--line-light); border-radius: 99px;
  color: var(--stone); font-family: var(--font-body); font-weight: 300;
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 0.5rem 1.15rem; cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.intro__skip:hover { color: var(--sand); border-color: var(--sand); }

/* il titolo hero resta fermo finché l'intro non è finita */
body.intro-hold .hero .reveal-line > span { transform: translateY(110%); transition: none; }

/* ── nav ───────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3.5rem);
  transition: transform 0.5s var(--ease-out), background 0.4s ease, padding 0.4s ease;
}
.nav.is-hidden { transform: translateY(-110%); }
.nav.is-solid {
  background: color-mix(in srgb, var(--sand) 88%, transparent);
  backdrop-filter: blur(14px);
  padding-top: 0.85rem; padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.nav__logo { display: flex; align-items: center; gap: 0.7rem; }
.nav__logo-mark {
  display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem;
  border: 1px solid currentColor; border-radius: 50%;
  font-family: var(--font-display); font-size: 0.82rem; letter-spacing: 0.08em;
}
.nav__logo-text {
  font-family: var(--font-display); font-size: 1.12rem; font-weight: 500;
  line-height: 1.05; display: flex; flex-direction: column;
}
.nav__logo-text em {
  font-family: var(--font-body); font-style: normal; font-weight: 300;
  font-size: 0.62rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--muted);
}
.nav, .nav a { color: var(--ink); }
.nav.on-dark:not(.is-solid), .nav.on-dark:not(.is-solid) a { color: var(--sand); }
.nav__links { display: flex; align-items: center; gap: 2.2rem; }
.nav__links a[data-nav] {
  position: relative; font-size: 0.92rem; font-weight: 400; letter-spacing: 0.04em;
}
.nav__links a[data-nav]::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav__links a[data-nav]:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  padding: 0.62rem 1.5rem;
  border: 1px solid currentColor; border-radius: 99px;
  font-size: 0.88rem; font-weight: 500; letter-spacing: 0.05em;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.nav__cta:hover { background: var(--terra); border-color: var(--terra); color: var(--sand) !important; }
.nav__burger {
  display: none; flex-direction: column; gap: 7px;
  background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav__burger span {
  width: 30px; height: 1.5px; background: currentColor; display: block;
  transition: transform 0.4s var(--ease-out);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(4.2px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-4.2px) rotate(-45deg); }

/* menu mobile */
.menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--char);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(1.5rem, 8vw, 5rem);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease-expo);
}
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu__link {
  display: flex; align-items: baseline; gap: 1.2rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 4.5rem); font-weight: 300;
  color: var(--sand); padding: 0.55rem 0;
  border-bottom: 1px solid var(--line-light);
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
}
.menu.is-open .menu__link { opacity: 1; transform: none; }
.menu.is-open .menu__link:nth-child(1) { transition-delay: 0.20s; }
.menu.is-open .menu__link:nth-child(2) { transition-delay: 0.28s; }
.menu.is-open .menu__link:nth-child(3) { transition-delay: 0.36s; }
.menu.is-open .menu__link:nth-child(4) { transition-delay: 0.44s; }
.menu__link span { font-family: var(--font-body); font-size: 0.85rem; color: var(--terra-soft); letter-spacing: 0.2em; }
.menu__foot { margin-top: 3rem; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* ── shared bits ───────────────────────────────────── */
.eyebrow {
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--terra);
  display: flex; align-items: center; gap: 1rem;
}
.eyebrow::after { content: ""; height: 1px; width: 4.5rem; background: var(--terra); opacity: 0.5; }
.eyebrow--light { color: var(--terra-soft); }

.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 1.05rem 2.2rem; border-radius: 99px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 500; letter-spacing: 0.03em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.3s var(--ease-out), background 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn--wa {
  background: #46B96A; color: #FFFDFA;
  box-shadow: 0 14px 34px -14px rgba(70, 185, 106, 0.55);
}
.btn--wa:hover { background: #3EA65E; box-shadow: 0 18px 40px -14px rgba(70, 185, 106, 0.7); }
.btn--ghost { border-color: var(--line-light); color: var(--sand); }
.btn--ghost:hover { border-color: var(--sand); }

/* ── il sito è un cantiere: foto che si "costruiscono" ── */
.mat { position: relative; }
.mat::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  border: 1px dashed rgba(133, 120, 104, 0.55);
  background-image:
    linear-gradient(to top right, transparent calc(50% - 0.5px), rgba(133, 120, 104, 0.4) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom right, transparent calc(50% - 0.5px), rgba(133, 120, 104, 0.4) 50%, transparent calc(50% + 0.5px));
  transition: opacity 0.5s ease 1s;
}
.mat::after {
  content: attr(data-q); position: absolute; top: 0.35rem; left: 0.7rem; z-index: 0;
  font-family: "Caveat", cursive; font-size: 1.25rem; color: #C9503D;
  transform: rotate(-2deg);
  transition: opacity 0.4s ease 0.9s;
}
figure.mat img {
  position: relative; z-index: 1;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.15s var(--ease-expo) 0.12s, transform 1s var(--ease-out), filter 0.5s ease;
}
figure.mat.in-view img { clip-path: inset(0 0 0 0); }
.mat.in-view::before, .mat.in-view::after { opacity: 0; }

/* note a pennarello rosso */
.spray-note {
  font-family: "Caveat", cursive; font-weight: 500;
  color: #C9503D; font-size: clamp(1.25rem, 2vw, 1.6rem);
  transform: rotate(-2deg); display: inline-block;
  opacity: 0; transition: opacity 0.6s ease 0.35s;
}
.spray-note.in-view { opacity: 1; }

/* timbro */
.stamp {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.1rem;
  padding: 0.9rem 1.6rem;
  border: 3px double #C9503D; border-radius: 6px;
  color: #C9503D; text-transform: uppercase; text-align: center;
  font-family: var(--font-body); font-weight: 600; letter-spacing: clamp(0.06em, 0.5vw, 0.18em);
  font-size: clamp(0.72rem, 2.4vw, 0.95rem); line-height: 1.3;
  max-width: min(88vw, 420px);
  transform: rotate(-7deg) scale(2.2); opacity: 0;
}
.stamp small { font-size: 0.68rem; letter-spacing: 0.3em; font-weight: 400; }
.stamp.in-view {
  animation: stampIn 0.55s cubic-bezier(0.34, 1.3, 0.64, 1) 0.25s both;
}
@keyframes stampIn {
  0% { transform: rotate(-16deg) scale(2.2); opacity: 0; }
  62% { transform: rotate(-7deg) scale(0.96); opacity: 1; }
  80% { transform: rotate(-7.6deg) scale(1.03); opacity: 1; }
  100% { transform: rotate(-7deg) scale(1); opacity: 1; }
}

/* nastro di cantiere */
.tape {
  height: 9px; width: 100%;
  background: repeating-linear-gradient(-45deg, #C9503D 0 16px, transparent 16px 34px);
  opacity: 0.55;
  background-size: 48px 48px;
  animation: tapeSlide 16s linear infinite;
}
@keyframes tapeSlide { to { background-position: 96px 0; } }

/* reveal helpers */
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span {
  display: block; transform: translateY(110%);
  transition: transform 1s var(--ease-expo);
}
.in-view .reveal-line > span, .reveal-line.in-view > span { transform: translateY(0); }

.fade-up { opacity: 0; transform: translateY(34px); transition: opacity 0.8s ease, transform 0.9s var(--ease-out); }
.fade-up.in-view { opacity: 1; transform: none; }

/* ── hero: film scrubbato dallo scroll ─────────────── */
.film { position: relative; height: 480vh; background: var(--char); }
.film--static { height: auto; }
.film__sticky { position: sticky; top: 0; height: 100dvh; }
.hero {
  position: relative; min-height: 100dvh;
  display: flex; align-items: flex-end;
  color: var(--sand); overflow: hidden;
  background: var(--char);
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }
.hero__content { will-change: transform, opacity; }

/* HUD da videocamera */
.film__hud { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.film__corner {
  position: absolute; width: 26px; height: 26px;
  border: 1.5px solid rgba(239, 233, 225, 0.55);
}
.film__corner--tl { top: 5rem; left: 1.4rem; border-right: 0; border-bottom: 0; }
.film__corner--tr { top: 5rem; right: 1.4rem; border-left: 0; border-bottom: 0; }
.film__corner--bl { bottom: 1.4rem; left: 1.4rem; border-right: 0; border-top: 0; }
.film__corner--br { bottom: 1.4rem; right: 1.4rem; border-left: 0; border-top: 0; }
.film__rec {
  position: absolute; top: 5.7rem; left: 2.6rem;
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.22em; color: var(--sand);
  font-variant-numeric: tabular-nums;
}
.film__rec i {
  width: 9px; height: 9px; border-radius: 50%; background: #E0483A;
  animation: recBlink 1.2s steps(1) infinite;
}
@keyframes recBlink { 50% { opacity: 0.15; } }
.film__rec b { font-weight: 400; color: var(--stone); }
.film__meta {
  position: absolute; top: 5.7rem; right: 2.6rem;
  font-size: 0.7rem; letter-spacing: 0.28em; color: rgba(239, 233, 225, 0.6);
  text-transform: uppercase;
}
.film__chapter {
  position: absolute; right: 2.6rem; bottom: 3.4rem;
  text-align: right; display: grid;
}
.film__chapter-item {
  grid-area: 1 / 1;
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--sand);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
}
.film__chapter-item.is-on { opacity: 0.92; transform: none; }
.film__progress {
  position: absolute; left: 2.6rem; right: 2.6rem; bottom: 1.9rem;
  height: 1px; background: rgba(239, 233, 225, 0.2);
}
.film__progress i { display: block; height: 100%; width: 0; background: var(--terra-soft); }
.film .hero__scroll { right: 50%; transform: translateX(50%); bottom: 3rem; transition: opacity 0.4s ease; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(27,24,21,0.42) 0%, rgba(27,24,21,0.05) 38%, rgba(27,24,21,0.78) 100%);
}
.hero__content {
  position: relative; z-index: 2;
  padding: 0 clamp(1.2rem, 4vw, 3.5rem) clamp(5.5rem, 10vh, 8rem);
  max-width: 1400px;
}
.hero__kicker span {
  display: inline-block;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 1.6rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.7rem, 8.2vw, 7rem);
  line-height: 1.02; letter-spacing: -0.015em;
  margin-bottom: 1.8rem;
}
.hero__title em { font-style: italic; color: var(--terra-soft); }
.hero__sub span { display: block; }
.hero__sub {
  font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 300;
  color: rgba(239, 233, 225, 0.82); max-width: 46ch; line-height: 1.7;
}
.hero__scroll {
  position: absolute; right: clamp(1.2rem, 4vw, 3.5rem); bottom: 2.4rem; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
  font-size: 0.72rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--stone);
}
.hero__scroll-line { width: 1px; height: 64px; background: rgba(239,233,225,0.28); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%;
  background: var(--sand);
  animation: scrollDrip 2s var(--ease-out) infinite;
}
@keyframes scrollDrip { 0% { transform: translateY(-110%); } 60%, 100% { transform: translateY(280%); } }

/* ── marquee ───────────────────────────────────────── */
.marquee {
  background: var(--char); color: var(--sand);
  padding: 1.15rem 0; overflow: hidden;
  border-top: 1px solid var(--line-light);
  position: relative; z-index: 3;
}
.marquee__track {
  display: flex; width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display); font-weight: 300; font-style: italic;
  font-size: 1.05rem; letter-spacing: 0.12em; white-space: nowrap;
  color: var(--stone); padding-right: 1rem;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── manifesto ─────────────────────────────────────── */
.manifesto {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  padding: clamp(6rem, 13vh, 10rem) clamp(1.2rem, 4vw, 3.5rem);
  max-width: 1400px; margin: 0 auto;
  align-items: center;
}
.manifesto__statement {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.55rem, 3.1vw, 2.6rem);
  line-height: 1.32; letter-spacing: -0.01em;
  margin-bottom: 2.2rem;
}
.manifesto__statement .w { opacity: 0.14; transition: opacity 0.5s ease; }
.manifesto__statement .w.lit { opacity: 1; }
.manifesto__note { color: var(--muted); max-width: 52ch; font-size: 1.02rem; }
.manifesto__media { position: relative; min-height: 480px; }
.manifesto__img-main {
  width: 82%; margin-left: auto; overflow: hidden; border-radius: 2px;
  will-change: transform;
}
.manifesto__img-main img { aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.manifesto__img-off {
  position: absolute; left: 0; bottom: -12%;
  width: 46%; overflow: hidden; border-radius: 2px;
  box-shadow: 0 30px 60px -30px rgba(27,24,21,0.45);
  will-change: transform;
}
.manifesto__img-off img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* ── servizi ───────────────────────────────────────── */
.services {
  position: relative;
  padding: clamp(4rem, 9vh, 7rem) clamp(1.2rem, 4vw, 3.5rem) clamp(5rem, 11vh, 8rem);
  max-width: 1400px; margin: 0 auto;
}
.services__head { margin-bottom: 3rem; }
.service { border-top: 1px solid var(--line); }
.service:last-child { border-bottom: 1px solid var(--line); }
.service__row {
  display: grid; grid-template-columns: 5rem 1fr 1fr;
  align-items: baseline; gap: 2rem;
  padding: 2.3rem 0.4rem;
  cursor: pointer;
  transition: padding 0.4s var(--ease-out), opacity 0.3s ease;
}
.services__list:hover .service__row { opacity: 0.35; }
.services__list .service:hover .service__row { opacity: 1; padding-left: 1.4rem; }
.service__num {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  color: var(--terra); font-size: 1rem;
}
.service__name {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -0.01em;
  line-height: 1.1;
}
.service__desc { color: var(--muted); font-size: 0.98rem; max-width: 40ch; }
.service__mobile-img { display: none; }
.service__cursor {
  position: fixed; z-index: 60; top: 0; left: 0;
  width: 300px; height: 210px;
  pointer-events: none; overflow: hidden; border-radius: 3px;
  opacity: 0; transform: scale(0.86);
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
  will-change: transform;
}
.service__cursor.is-on { opacity: 1; transform: scale(1); }
.service__cursor img { width: 100%; height: 100%; object-fit: cover; }

/* ── works (orizzontale) ───────────────────────────── */
.works { position: relative; background: var(--char); color: var(--sand); }
.works__sticky {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.works__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 clamp(1.2rem, 4vw, 3.5rem);
  margin-bottom: 2.6rem;
}
.works__hint { font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.works__track {
  display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem);
  padding: 0 clamp(1.2rem, 4vw, 3.5rem);
  width: max-content;
  will-change: transform;
}
.work { flex-shrink: 0; width: clamp(300px, 44vw, 620px); }
.work--tall { width: clamp(240px, 26vw, 380px); }
.work figure { overflow: hidden; border-radius: 3px; }
.work img {
  width: 100%; aspect-ratio: 16/11; object-fit: cover;
  transform: scale(1.06);
  transition: transform 1s var(--ease-out);
}
.work--tall img { aspect-ratio: 3/4; }
.work:hover img { transform: scale(1); }
.work__meta { display: flex; align-items: baseline; gap: 1rem; margin-top: 1.1rem; }
.work__meta span {
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--terra-soft);
  white-space: nowrap;
}
.work__meta h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; letter-spacing: -0.01em; }
.works__progress {
  margin: 3rem clamp(1.2rem, 4vw, 3.5rem) 0;
  height: 1px; background: var(--line-light);
}
.works__bar { height: 100%; width: 0%; background: var(--terra-soft); transition: width 0.1s linear; }

/* ── processo ──────────────────────────────────────── */
.process {
  background: var(--char-2); color: var(--sand);
  padding: clamp(6rem, 13vh, 10rem) clamp(1.2rem, 4vw, 3.5rem);
}
.process__head { max-width: 1400px; margin: 0 auto clamp(3.5rem, 8vh, 6rem); }
.process__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.4rem, 5.5vw, 4.6rem); line-height: 1.04; letter-spacing: -0.015em;
  margin-top: 1.6rem;
}
.process__body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  max-width: 1400px; margin: 0 auto;
  align-items: start;
}
.process__media { position: sticky; top: 0; height: 100dvh; display: flex; align-items: center; }
.process__frame {
  position: relative; width: 100%; aspect-ratio: 4/5; max-height: 78vh;
  overflow: hidden; border-radius: 3px;
}
.process__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.07);
  transition: opacity 0.7s ease, transform 1.1s var(--ease-out);
}
.process__img.is-active { opacity: 1; transform: scale(1); }
.process__counter {
  position: absolute; right: 1.1rem; bottom: 0.9rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem; letter-spacing: 0.22em; color: rgba(239,233,225,0.85);
  background: rgba(27,24,21,0.5); backdrop-filter: blur(6px);
  padding: 0.4rem 0.8rem; border-radius: 99px;
}
.process__counter b { font-weight: 500; color: var(--terra-soft); }
.process__steps { padding: 20vh 0 30vh; }
.process__step {
  padding: 3.2rem 0; border-top: 1px solid var(--line-light);
  opacity: 0.28; transition: opacity 0.5s ease;
}
.process__step.is-active { opacity: 1; }
.process__step h3 {
  display: flex; align-items: baseline; gap: 1.1rem;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 0.9rem; letter-spacing: -0.01em;
}
.process__step h3 span {
  font-family: var(--font-body); font-weight: 300; font-size: 0.85rem;
  letter-spacing: 0.2em; color: var(--terra-soft);
}
.process__step p { color: rgba(239,233,225,0.62); max-width: 46ch; font-size: 1rem; }

/* ── scena di cantiere scroll-driven (sezione processo) ── */
.process__scene {
  position: relative; width: 100%;
  border: 1px solid var(--line-light); border-radius: 3px;
  background:
    linear-gradient(rgba(239,233,225,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239,233,225,0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  background-color: rgba(27, 24, 21, 0.35);
  padding: 0.6rem;
}
.process__scene svg { display: block; width: 100%; height: auto; }

.scn .el { opacity: 0; transition: opacity 0.65s ease 0.12s; }
.scn.on-0 .s0, .scn.on-1 .s1, .scn.on-2 .s2,
.scn.on-3 .s3, .scn.on-4 .s4, .scn.on-5 .s5 { opacity: 1; }

.scn .ln { stroke: var(--sand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scn .lf { stroke-width: 1.2; }
.scn.on-0 .lf { opacity: 0.5; }
.scn .lt { stroke-width: 1.3; }
.scn .ldim { stroke: var(--stone); stroke-width: 1.1; }
.scn.on-1 .ldim { opacity: 0.75; }
.scn .pdim { fill: var(--stone); font-family: var(--font-body); font-weight: 300; font-size: 15px; letter-spacing: 0.16em; }
.scn.on-1 .pdim { opacity: 0.75; }
.scn .pspray { fill: #C9503D; font-family: "Caveat", cursive; font-size: 27px; }
.scn.on-0 .pspray.s0, .scn.on-1 .pspray.s1 { opacity: 0.95; }
.scn .pspray-line { stroke: #C9503D; stroke-width: 2.4; stroke-dasharray: 12 7; }
.scn.on-1 .pspray-line { opacity: 0.85; }
.scn .pfill--door { fill: #7A5236; }
.scn .pfill--pergola { fill: #6E5138; }
.scn .pfill--glass { fill: #232A33; }
.scn.on-3 .pfill.s3, .scn.on-4 .pfill.s4 { opacity: 0.96; }
.scn .glow { fill: #F2C077; }
.scn.on-5 .glow.s5 { opacity: 0.92; }
.scn.on-5 .glow--halo { opacity: 0.48; }
.scn.on-5 .glow--door { opacity: 0.5; }

/* texture: si rivelano con la fase giusta */
.scn .tex--footing { transition-delay: 0.15s; }
.scn .tex--wall { transition-delay: 0.1s; }
.scn .tex--roof { transition-delay: 0.25s; }
.scn .tex--chimney { transition-delay: 0.5s; }
.scn.on-1 .tex--footing { clip-path: inset(0 0 0 0); }
.scn.on-2 .tex--wall { clip-path: inset(0 0 0 0); }
.scn.on-3 .tex--roof, .scn.on-3 .tex--chimney { clip-path: inset(0 0 0 0); }
.scn.on-0 .tex--boulder { opacity: 0.96; transition-delay: 0.3s; }

/* gru: monta con le strutture, smontata alla consegna */
.scn.on-2 .crane { opacity: 1; }
.scn.on-5 .crane { opacity: 0 !important; }
.scn.on-5 .smoke__p { animation: smokeRise 2.8s ease-out infinite; }
.scn.on-5 .smoke__p--2 { animation-delay: 0.95s; }
.scn.on-5 .smoke__p--3 { animation-delay: 1.8s; }

.scene__done {
  position: absolute; left: 1.3rem; bottom: 1rem;
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: 1.35rem; color: var(--sand);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.6s ease 0.5s, transform 0.7s var(--ease-out) 0.5s;
}
.scn.on-5 .scene__done { opacity: 1; transform: none; }

/* foto reali dentro i passi */
.process__photo { margin-top: 1.5rem; max-width: 320px; border-radius: 3px; overflow: hidden; }
.process__photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ── materiali ─────────────────────────────────────── */
.materials { padding: clamp(6rem, 13vh, 10rem) clamp(1.2rem, 4vw, 3.5rem); max-width: 1400px; margin: 0 auto; }
.materials__head { margin-bottom: 3rem; }
.materials__row {
  display: flex; gap: 0.8rem; height: clamp(360px, 60vh, 540px);
}
.material {
  position: relative; flex: 1; overflow: hidden; border-radius: 3px;
  background-size: cover; background-position: center;
  cursor: pointer;
  transition: flex 0.85s var(--ease-expo);
}
.material.is-open { flex: 3.2; }
.material::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,24,21,0) 40%, rgba(27,24,21,0.72) 100%);
}
.material figcaption {
  position: absolute; left: 1.4rem; right: 1.4rem; bottom: 1.3rem; z-index: 2;
  color: var(--sand);
}
.material h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.1rem, 1.9vw, 1.6rem); letter-spacing: -0.01em;
  white-space: nowrap;
}
.material p {
  font-size: 0.9rem; color: rgba(239,233,225,0.75); white-space: nowrap;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.6s var(--ease-out) 0.15s, opacity 0.5s ease 0.2s;
}
.material.is-open p { max-height: 3rem; opacity: 1; }

/* ── galleria ──────────────────────────────────────── */
.gallery { padding: 0 clamp(1.2rem, 4vw, 3.5rem) clamp(6rem, 13vh, 10rem); max-width: 1400px; margin: 0 auto; }
.gallery__head { display: flex; justify-content: space-between; align-items: baseline; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; }
.gallery__note { color: var(--muted); font-size: 0.95rem; font-style: italic; font-family: var(--font-display); }
.gallery__grid { columns: 3 300px; column-gap: 0.9rem; }
.gallery__item {
  margin-bottom: 0.9rem; overflow: hidden; border-radius: 3px;
  break-inside: avoid; cursor: zoom-in;
}
.gallery__item img {
  transition: transform 0.9s var(--ease-out), filter 0.5s ease;
}
.gallery__item:hover img { transform: scale(1.045); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(20, 17, 14, 0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__img {
  max-width: 88vw; max-height: 86vh; border-radius: 3px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.8);
}
.lightbox__close, .lightbox__arrow {
  position: absolute; background: none; border: 0; cursor: pointer;
  color: var(--sand); font-size: 1.6rem; padding: 1rem;
  transition: color 0.3s ease, transform 0.3s var(--ease-out);
  font-family: var(--font-body);
}
.lightbox__close { top: 1rem; right: 1.4rem; font-size: 2.2rem; line-height: 1; }
.lightbox__close:hover { color: var(--terra-soft); transform: rotate(90deg); }
.lightbox__arrow--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__arrow--next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__arrow:hover { color: var(--terra-soft); }

/* ── contatti ──────────────────────────────────────── */
.contact {
  background: var(--char); color: var(--sand);
  padding: clamp(7rem, 15vh, 11rem) clamp(1.2rem, 4vw, 3.5rem) 2.2rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  overflow: hidden;
}
.contact__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 5.8rem); line-height: 1.05; letter-spacing: -0.015em;
  margin: 1.8rem 0 1.4rem;
}
.contact__sub { color: rgba(239,233,225,0.65); max-width: 52ch; margin-bottom: 2.8rem; }
.contact__actions { display: flex; gap: 1.1rem; flex-wrap: wrap; justify-content: center; }
.footer {
  margin-top: clamp(5rem, 10vh, 8rem);
  width: 100%; max-width: 1400px;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.6rem; border-top: 1px solid var(--line-light);
  font-size: 0.8rem; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase;
}

/* ── WhatsApp float ────────────────────────────────── */
.wa-float {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 80;
  display: flex; align-items: center; gap: 0.6rem;
  background: #46B96A; color: #FFFDFA;
  padding: 0.9rem 1.1rem; border-radius: 99px;
  box-shadow: 0 16px 38px -12px rgba(70, 185, 106, 0.6);
  transform: translateY(140%);
  transition: transform 0.6s var(--ease-expo), box-shadow 0.3s ease;
}
.wa-float.is-in { transform: translateY(0); }
.wa-float:hover { box-shadow: 0 20px 44px -12px rgba(70, 185, 106, 0.8); }
.wa-float:active { transform: scale(0.96); }
.wa-float__label { font-size: 0.92rem; font-weight: 500; letter-spacing: 0.03em; }

/* ── responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .manifesto { grid-template-columns: 1fr; }
  .manifesto__media { min-height: 0; margin-top: 1rem; }
  .manifesto__img-off { bottom: -8%; }

  .service__row { grid-template-columns: 3rem 1fr; }
  .service__desc { grid-column: 2; }
  .service__cursor { display: none; }
  .service__mobile-img { display: block; overflow: hidden; max-height: 0; transition: max-height 0.7s var(--ease-out); }
  .service.is-expanded .service__mobile-img { max-height: 260px; }
  .service__mobile-img img { width: 100%; height: 240px; object-fit: cover; }

  .process__body { grid-template-columns: 1fr; }
  .process__media { position: sticky; top: 0; height: auto; padding: 0.8rem 0; z-index: 5; background: var(--char-2); }
  .process__frame { aspect-ratio: 16/10; max-height: 44vh; }
  .process__steps { padding: 2rem 0 4rem; }
  .process__step { padding: 2.2rem 0; }

  .materials__row { flex-direction: column; height: auto; }
  .material { height: 120px; flex: none !important; transition: height 0.7s var(--ease-expo); }
  .material.is-open { height: 340px; }

  .works__hint { display: none; }
  .work { width: 78vw; }
  .work--tall { width: 62vw; }

  .wa-float__label { display: none; }
  .wa-float { padding: 1rem; }
}

/* ── reduced motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-line > span { transform: none; }
  .fade-up { opacity: 1; transform: none; }
  .manifesto__statement .w { opacity: 1; }
}
