/* =========================================================
   AudiophileBerry — v63 "Motion"
   Palette: #1F1F1F background · #33C2FF accent
   ========================================================= */

/* Font inclusi nel sito (nessuna connessione esterna). Licenze SIL OFL in assets/fonts/
   Michroma = titoli · Montserrat = testi · JetBrains Mono = etichette tecniche */
@font-face { font-family: "Michroma"; src: url("assets/fonts/michroma-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("assets/fonts/montserrat-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("assets/fonts/montserrat-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("assets/fonts/montserrat-medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("assets/fonts/montserrat-semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("assets/fonts/montserrat-bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("assets/fonts/montserrat-extrabold.woff") format("woff"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/fonts/jetbrainsmono-regular.woff") format("woff"); font-weight: 400 500; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #1F1F1F;
  --bg-deep: #171717;
  --panel: #242424;
  --panel-2: #2a2a2a;
  --text: #F5F7FA;
  --muted: #A8AFB7;
  --dim: #7d848c;
  --line: rgba(255,255,255,.09);
  --accent: #33C2FF;
  --accent-soft: rgba(51,194,255,.14);
  --accent-line: rgba(51,194,255,.38);
  --it-green: #009246;
  --it-white: #F1F2F1;
  --it-red: #CE2B37;
  --max: 1240px;
  --gutter: max(24px, calc((100vw - var(--max)) / 2));
  --ease: cubic-bezier(.22,.8,.24,1);
  --ease-back: cubic-bezier(.34,1.56,.64,1);
  --display: "Michroma", "Montserrat", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #0d1418; }

/* ---------- INTRO ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 34px;
  background: var(--bg-deep);
  transition: opacity .7s var(--ease) .1s, visibility 0s linear .8s;
}
body:not(.is-loading) .intro { opacity: 0; visibility: hidden; }
.intro-mark { position: relative; width: 110px; aspect-ratio: 800/803; }
.intro-part {
  position: absolute; inset: 0; width: 100%; opacity: 0;
  animation: introPart .9s var(--ease) forwards;
}
.intro-part.p1 { --from: translate(-60px,-40px) rotate(-25deg); animation-delay: .05s; }
.intro-part.p2 { --from: translate(60px,-40px) rotate(25deg);  animation-delay: .18s; }
.intro-part.p3 { --from: translate(0,60px) rotate(-15deg);     animation-delay: .31s; }
@keyframes introPart {
  from { opacity: 0; transform: var(--from) scale(.6); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: drop-shadow(0 0 6px rgba(51,194,255,.18)); }
}
.intro-bar { width: 120px; height: 2px; background: var(--line); overflow: hidden; }
.intro-bar span {
  display: block; height: 100%; width: 100%; background: var(--accent);
  transform-origin: left; animation: introBar 1.1s var(--ease) forwards;
}
@keyframes introBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- BACKGROUND FX ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.scroll-progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent));
  transform-origin: left; transform: scaleX(var(--p, 0));
  box-shadow: 0 0 10px var(--accent);
}
/* Simbolo AudiophileBerry che segue il mouse */
.cursor-logo {
  position: fixed; z-index: 70; left: 0; top: 0; pointer-events: none;
  width: 26px; height: 26px; margin: -13px 0 0 -13px;
  transform: translate3d(var(--lx, -100px), var(--ly, -100px), 0);
  opacity: 0; transition: opacity .3s;
}
.cursor-logo.is-visible { opacity: .85; }
.cursor-logo img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(51,194,255,.25));
  transition: transform .35s var(--ease), opacity .3s;
}
.cursor-logo.is-hover img { transform: scale(1.7) rotate(-8deg); opacity: .55; }
.cursor-logo.is-down img { transform: scale(.75); }
main, .site-footer { position: relative; z-index: 1; }

/* ---------- HEADER ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: padding .4s var(--ease), background .4s, border-color .4s, transform .5s var(--ease);
}
/* Lo sfondo sfocato sta in un livello separato: così il menu a tutto schermo
   su smartphone non resta "intrappolato" dentro la barra */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(27,27,27,.86);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0; transition: opacity .4s;
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-scrolled {
  padding-block: 10px;
  border-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }

.brand-logo {
  width: clamp(210px, 18vw, 300px); height: auto;
  transition: width .4s var(--ease), filter .4s;
}
.site-header.is-scrolled .brand-logo { width: clamp(190px, 15vw, 250px); }
.brand:hover .brand-logo { filter: drop-shadow(0 0 10px rgba(51,194,255,.4)); }

.nav { display: flex; gap: 30px; align-items: center; font-size: .9rem; }
.nav a { position: relative; color: var(--muted); transition: color .25s; padding: 4px 0; }
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav a:hover, .nav a.is-current { color: var(--text); }
.nav a:hover::after, .nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  padding: 9px 18px !important; border: 1px solid var(--accent-line); color: var(--accent) !important;
  overflow: hidden; isolation: isolate;
  transition: color .3s, border-color .3s !important;
}
.nav-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  transform: translateY(101%); transition: transform .35s var(--ease);
}
.nav-cta:hover { color: #0d1418 !important; border-color: var(--accent); }
.nav-cta:hover::before { transform: none; }

.menu-toggle {
  display: none; position: relative; z-index: 2;
  width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; cursor: pointer;
}
.menu-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--accent);
  transition: transform .4s var(--ease), top .4s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ---------- LAYOUT ---------- */
.hero, .section, .contact, .site-footer, .italian-rule {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}
.section { padding: 120px 0; }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px; color: var(--accent);
  font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .16em;
}
.eyebrow .idx {
  color: var(--dim); padding-right: 12px; border-right: 1px solid var(--line);
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; font-synthesis: none; letter-spacing: -.01em; line-height: 1.14; margin: 0; }
h2 { font-size: clamp(1.6rem, 3.3vw, 2.7rem); font-weight: 400; }
h3 { font-size: 1.2rem; font-family: "Montserrat", Arial, sans-serif; font-weight: 700; letter-spacing: -.005em; line-height: 1.25; }

.section-heading { margin-bottom: 56px; max-width: 760px; }
.section-heading > p:last-child:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; margin: 18px 0 0; }

/* ---------- BUTTONS ---------- */
.button {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; font-weight: 600; font-size: .95rem;
  overflow: hidden; isolation: isolate;
  transition: color .35s, border-color .35s, box-shadow .35s, transform .35s var(--ease);
  will-change: transform;
}
.button span { position: relative; z-index: 1; display: inline-block; transition: transform .35s var(--ease); }
.button.primary { background: var(--accent); color: #0d1418; }
.button.primary::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.button.primary:hover { box-shadow: 0 10px 40px -8px rgba(51,194,255,.65); }
.button.primary:hover::before { transform: translateX(120%); }
.button.secondary { border: 1px solid rgba(255,255,255,.2); color: var(--text); }
.button.secondary::before {
  content: ""; position: absolute; inset: 0; background: var(--accent-soft); z-index: 0;
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.button.secondary:hover { border-color: var(--accent-line); }
.button.secondary:hover::before { transform: none; }
.button-lg { min-height: 58px; padding: 0 36px; font-size: 1.02rem; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding: 120px 0 90px;
}
.hero-wave {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100vw; height: 46%; pointer-events: none; z-index: -1; opacity: .9;
}
.hero-content { position: relative; z-index: 2; }

.made-in-italy {
  display: flex; align-items: center; gap: 10px; margin-bottom: 26px;
  color: #8f969e; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.flag { display: inline-grid; grid-template-columns: repeat(3, 4px); height: 17px; overflow: hidden; border-radius: 1px; }
.flag i:nth-child(1) { background: var(--it-green); }
.flag i:nth-child(2) { background: var(--it-white); }
.flag i:nth-child(3) { background: var(--it-red); }
.flag-small { grid-template-columns: repeat(3, 3px); height: 12px; }

/* Equalizer animato */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 100%; background: var(--accent); transform-origin: bottom; animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .9s; }
.eq i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.3s; }
.eq i:nth-child(4) { animation-delay: -.15s; animation-duration: .8s; }
@keyframes eq { 0%,100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

.hero-title {
  font-size: clamp(2.05rem, 4.5vw, 3.9rem); font-weight: 400; letter-spacing: -.015em; line-height: 1.1;
  max-width: 12ch; margin-bottom: 26px;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent) 0%, #9fe3ff 35%, var(--accent) 60%, #1b8fd1 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Split text (parole che salgono) */
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.word > span { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 80ms + 150ms); }
.is-ready .word > span { transform: none; }
.hero-title em .word > span {
  background: linear-gradient(100deg, var(--accent) 0%, #9fe3ff 35%, var(--accent) 60%, #1b8fd1 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}

[data-hero] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.is-ready [data-hero] { opacity: 1; transform: none; }
.is-ready .eyebrow[data-hero] { transition-delay: .12s; }
.is-ready .hero-kicker { transition-delay: .55s; }
.is-ready .hero-text { transition-delay: .68s; }
.is-ready .hero-actions { transition-delay: .8s; }

.hero-kicker { font-size: clamp(1.1rem, 1.6vw, 1.32rem); color: var(--text); font-weight: 500; margin: 0 0 14px; max-width: 34ch; }
.hero-text { color: var(--muted); max-width: 52ch; margin: 0 0 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 560px; width: 100%; justify-self: center; }

.hero-mark { position: relative; width: 82%; aspect-ratio: 800/803; animation: float 7s ease-in-out infinite; }
.mark-part {
  position: absolute; inset: 0; width: 100%; height: 100%;
  filter: drop-shadow(0 0 8px rgba(51,194,255,.12));
  transition: transform 1.3s var(--ease), opacity 1.3s var(--ease);
  opacity: 0;
}
.mark-part.m1 { transform: translate(-30%, -20%) rotate(-18deg); }
.mark-part.m2 { transform: translate(30%, -20%) rotate(18deg); transition-delay: .1s; }
.mark-part.m3 { transform: translate(0, 32%) rotate(-10deg); transition-delay: .2s; }
.is-ready .mark-part { opacity: 1; transform: translate3d(var(--px,0), var(--py,0), 0); }
.is-assembled .mark-part { transition: transform .9s var(--ease), opacity 1.3s var(--ease); transition-delay: 0s; }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
  width: 26px; height: 42px; border: 1.5px solid rgba(255,255,255,.25); border-radius: 14px;
  opacity: 0; transition: opacity 1s ease 1.4s;
}
.is-ready .scroll-cue { opacity: 1; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- ITALIAN RULE ---------- */
.italian-rule { position: relative; display: flex; justify-content: center; height: 3px; }
.italian-rule span { width: 34px; height: 3px; transform: scaleX(0); transition: transform .7s var(--ease); }
.italian-rule span:nth-child(1) { background: var(--it-green); transform-origin: right; }
.italian-rule span:nth-child(2) { background: var(--it-white); transition-delay: .15s; }
.italian-rule span:nth-child(3) { background: var(--it-red); transform-origin: left; transition-delay: .3s; }
.italian-rule.is-in span { transform: none; }
.rule-line::before {
  content: ""; position: absolute; left: 0; right: 0; top: 1px; height: 1px; background: var(--line);
  transform: scaleX(0); transition: transform 1.4s var(--ease);
}
.rule-line.is-in::before { transform: none; }
.rule-line span { position: relative; }

/* ---------- MARQUEE ---------- */
.marquee {
  margin-top: 70px; overflow: hidden; border-block: 1px solid var(--line);
  padding: 22px 0; background: rgba(0,0,0,.12);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; gap: 36px; align-items: center; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  font-family: var(--display); font-size: clamp(1.05rem, 1.9vw, 1.55rem); font-weight: 400; letter-spacing: 0;
  color: transparent; -webkit-text-stroke: 1px rgba(245,247,250,.28); white-space: nowrap;
  transition: color .3s, -webkit-text-stroke-color .3s;
}
.marquee span:hover { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.marquee b { color: var(--accent); font-weight: 400; font-size: 1.1rem; opacity: .7; }
@keyframes marquee { to { transform: translateX(calc(-50% - 18px)); } }

/* ---------- REVEAL ---------- */
[data-reveal]:not([data-reveal="rule"]) {
  opacity: 0; transform: translateY(46px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="wipe"] { opacity: 1 !important; transform: none !important; border-color: transparent !important; transition: border-color 1s ease .9s !important; }
[data-reveal="wipe"].is-in { border-color: rgba(51,194,255,.14) !important; }
[data-reveal="wipe"] > img { clip-path: inset(0 0 100% 0); }
[data-reveal="wipe"].is-in > img { clip-path: inset(0 0 0 0); transition: clip-path 1.4s var(--ease), filter .6s; }
[data-reveal="wipe"] > span { opacity: 0; transition: opacity .6s ease 1.1s; }
[data-reveal="wipe"].is-in > span { opacity: 1; }

/* ---------- GALLERY (Projects + Lab) ---------- */
.project-list { display: grid; gap: 120px; }
.project { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.project-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); }
.project-flip .gallery { order: 2; }
.project-copy { position: relative; padding-left: 28px; border-left: 1px solid var(--line); }
.project-copy::before {
  content: ""; position: absolute; left: -1px; top: 0; width: 1px; height: 0; background: var(--accent);
  transition: height 1.2s var(--ease) .4s;
}
.project.is-in .project-copy::before { height: 64px; }
.project-type { margin: 0 0 10px; color: var(--accent); font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.project-copy h3 { font-family: var(--display); font-size: clamp(1.7rem, 2.8vw, 2.4rem); font-weight: 400; letter-spacing: 0; line-height: 1.12; margin-bottom: 18px; }
.project-copy > p:not(.project-type) { margin: 0; color: var(--muted); font-size: 1.02rem; }
.project-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 9px; }
.project-points li { position: relative; padding-left: 22px; color: var(--text); font-size: .94rem; line-height: 1.5; }
.project-points li::before {
  content: ""; position: absolute; left: 0; top: .52em; width: 9px; height: 9px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--accent);
}
.project-facts { margin: 24px 0 0; display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.project-facts div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.project-facts dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding-top: 3px; }
.project-facts dd { margin: 0; font-size: .9rem; color: var(--muted); }

/* Riquadro "Your product could be next" */
.project-soon {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center;
  padding: 48px 52px; border: 1px solid var(--accent-line);
  background: linear-gradient(120deg, rgba(51,194,255,.07), transparent 55%), var(--bg-deep);
}
.project-soon::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, rgba(51,194,255,.07) 50%, transparent 65%);
  transform: translateX(-100%); animation: sweep 5s ease-in-out infinite;
}
@keyframes sweep { 60%, 100% { transform: translateX(100%); } }
.soon-mark img { width: 100%; opacity: .9; filter: drop-shadow(0 0 8px rgba(51,194,255,.15)); animation: float 7s ease-in-out infinite; }
.soon-copy h3 { font-family: var(--display); font-size: clamp(1.35rem, 2.2vw, 1.9rem); font-weight: 400; letter-spacing: -.01em; line-height: 1.15; margin-bottom: 16px; }
.soon-copy > p:not(.project-type) { margin: 0; color: var(--muted); max-width: 70ch; }
.soon-copy .project-type { display: flex; align-items: center; gap: 10px; }
.project-soon { transition: border-color .3s, transform .5s var(--ease), opacity 1s var(--ease) !important; }
.project-soon:hover { border-color: var(--accent); }
.soon-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--accent); font-weight: 600; }
.soon-link b { font-weight: 400; transition: transform .35s var(--ease); }
.project-soon:hover .soon-link b { transform: translateX(6px); }

/* Riquadro "Now in development" */
.now {
  width: min(calc(100% - 48px), var(--max)); margin: 64px auto 0;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 24px; border: 1px solid var(--accent-line); background: rgba(51,194,255,.05);
  transition: background .3s, border-color .3s;
}
.now:hover { background: rgba(51,194,255,.1); border-color: var(--accent); }
.now-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.now-text { color: var(--text); font-size: .95rem; flex: 1; min-width: 240px; }
.now-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.now-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { transform: scale(3); opacity: 0; } }
.now + .marquee { margin-top: 40px; }

.gallery { display: grid; gap: 12px; }
/* Miniature: sempre 8 visibili; dalla nona in poi si scorre verso destra */
.thumbs {
  --visible: 8; --tgap: 8px;
  display: grid; grid-auto-flow: column; gap: var(--tgap);
  grid-auto-columns: calc((100% - (var(--visible) - 1) * var(--tgap)) / var(--visible));
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: rgba(51,194,255,.6) rgba(255,255,255,.06);
}
.thumbs.has-more { padding-bottom: 8px; }
.thumbs.has-more:not(.at-end) {
  -webkit-mask-image: linear-gradient(90deg, #000 86%, rgba(0,0,0,.25));
  mask-image: linear-gradient(90deg, #000 86%, rgba(0,0,0,.25));
}
.thumbs::-webkit-scrollbar { height: 4px; }
.thumbs::-webkit-scrollbar-track { background: rgba(255,255,255,.06); }
.thumbs::-webkit-scrollbar-thumb { background: rgba(51,194,255,.6); }
.thumb { scroll-snap-align: start; }
/* Lab: foto quadrate -> riquadro quadrato, miniature quadrate sotto */
.gallery-lab .gallery-stage { aspect-ratio: 1 / 1; }
.gallery-lab .thumb { aspect-ratio: 1 / 1; }

.gallery-stage {
  position: relative; overflow: hidden; aspect-ratio: 5 / 4;
  background: #111; border: 1px solid var(--line);
  touch-action: pan-y;
}
.gallery-blur {
  position: absolute; inset: -40px; background: var(--bg) center / cover no-repeat;
  filter: blur(36px) brightness(.45) saturate(1.2); transform: scale(1.1);
  transition: background-image .6s;
}
.gallery-main {
  position: relative; width: 100%; height: 100%; object-fit: contain;
  transition: opacity .55s var(--ease), transform 1.2s var(--ease), filter .55s;
}
.gallery-stage:hover .gallery-main { transform: scale(1.035); }
.gallery-main.is-out { opacity: 0; transform: scale(1.06); filter: blur(8px); }
.gallery-main.is-in-left { animation: slideL .7s var(--ease); }
.gallery-main.is-in-right { animation: slideR .7s var(--ease); }
@keyframes slideR { from { opacity: 0; transform: translateX(40px) scale(1.02); filter: blur(6px); } }
@keyframes slideL { from { opacity: 0; transform: translateX(-40px) scale(1.02); filter: blur(6px); } }

.image-kind, .gallery-count {
  position: absolute; z-index: 2; top: 16px;
  padding: 6px 11px; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(16,16,16,.65); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.08);
}
.image-kind { left: 16px; color: var(--accent); }
.gallery-count { right: 16px; color: var(--muted); }
.gallery-count b { color: var(--text); font-weight: 500; }

.gallery-arrow {
  position: absolute; z-index: 3; top: 50%; translate: 0 -50%;
  width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.14); cursor: pointer;
  background: rgba(16,16,16,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 1.6rem; line-height: 1; color: var(--text);
  opacity: 0; transition: opacity .35s, transform .35s var(--ease), background .25s, border-color .25s;
}
.gallery-arrow.prev { left: 16px; transform: translateX(-12px); }
.gallery-arrow.next { right: 16px; transform: translateX(12px); }
.gallery-stage:hover .gallery-arrow, .gallery-arrow:focus-visible { opacity: 1; transform: none; }
.gallery-arrow:hover { background: var(--accent); border-color: var(--accent); color: #0d1418; }

.gallery-progress { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.06); }
.gallery-progress span { display: block; height: 100%; background: var(--accent); width: calc(var(--pos, 1) / var(--total, 8) * 100%); transition: width .6s var(--ease); box-shadow: 0 0 8px var(--accent); }

.thumb {
  position: relative; padding: 0; border: 1px solid var(--line); background: #111; cursor: pointer;
  aspect-ratio: 5 / 4; overflow: hidden;
  transition: border-color .3s, transform .4s var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: grayscale(.6); transition: opacity .35s, filter .35s, transform .6s var(--ease); }
.thumb:hover img { opacity: .9; filter: none; transform: scale(1.08); }
.thumb:hover { transform: translateY(-2px); }
.thumb.is-active { border-color: var(--accent); }
.thumb.is-active img { opacity: 1; filter: none; }
.thumb::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--accent); opacity: 0; transition: opacity .3s; }
.thumb.is-active::after { opacity: 1; }

/* ---------- CAPABILITIES ---------- */
.capabilities { position: relative; }
#capabilities.section { padding-bottom: 90px; }
#capabilities .section-heading { margin-bottom: 32px; }
#capabilities h2 { font-size: clamp(1.5rem, 2.8vw, 2.3rem); }
#capabilities .section-heading > p:last-child { margin-top: 10px; }
.capability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.capability {
  position: relative; padding: 26px 28px 28px; background: var(--bg); overflow: hidden;
  transform-style: preserve-3d;
  transition: background .4s, opacity 1s var(--ease), transform .5s var(--ease) !important;
  transition-delay: var(--d, 0s) !important;
}
.capability.is-in { transform: none; }
.capability.is-in:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.capability::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(380px circle at var(--cx, 50%) var(--cy, 50%), rgba(51,194,255,.13), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.capability::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.capability:hover { background: #222; }
.capability:hover::before { opacity: 1; }
.capability:hover::after { transform: scaleX(1); }
.cap-num { display: block; font-family: var(--mono); color: var(--accent); font-size: .8rem; margin-bottom: 16px; letter-spacing: .1em; }
.capability h3 { margin-bottom: 8px; transition: transform .4s var(--ease); }
.capability:hover h3 { transform: translateX(6px); }
.capability p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }

/* ---------- PROCESS ---------- */
.process-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.process-steps li { position: relative; padding: 0 28px 0 0; }
.process-steps li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: var(--line);
}
.process-steps li::after {
  content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease) calc(var(--d, 0s) + .3s);
}
.process-steps li.is-in::after { transform: none; }
.step-num {
  position: relative; z-index: 1; display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 26px;
  font-family: var(--mono); font-size: .8rem; color: var(--accent); background: var(--bg);
  border: 1px solid var(--accent-line); box-shadow: 0 0 0 8px var(--bg);
}
.process-steps h3 { margin-bottom: 10px; }
.process-steps p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- LAB ---------- */
.lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 40px 64px; align-items: center; }
.lab-copy { max-width: 520px; }
.lab-copy h2 { margin-bottom: 24px; }
.lab-copy p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; margin: 0 0 14px; }
.origin { padding: 56px 0 0; border-top: 1px solid var(--line); }
.origin .lab-copy .project-type { margin: 0 0 10px; color: var(--accent); font-size: .72rem; }
.origin h3 { font-family: var(--display); font-size: clamp(1.35rem, 2.2vw, 1.9rem); font-weight: 400; letter-spacing: -.01em; line-height: 1.15; margin-bottom: 20px; }
.story .lab-copy em { font-style: italic; color: var(--text); }
.footer-disclaimer { grid-column: 1 / -1; margin: 6px 0 0; padding-top: 22px; border-top: 1px solid var(--line); color: #626970; font-size: .7rem; line-height: 1.6; text-align: center; max-width: none; }
/* "Not just DIY": gallery un po' più piccola su desktop (stesso formato quadrato) */
.lab.origin { grid-template-columns: minmax(0, 1fr) minmax(0, 1.07fr); }

/* ---------- ABOUT ---------- */
.it-word { position: relative; display: inline-block; }
.it-word::after {
  content: ""; position: absolute; left: 0; right: .25em; bottom: -.08em; height: .08em;
  background: linear-gradient(90deg, var(--it-green) 0 33.3%, var(--it-white) 0 66.6%, var(--it-red) 0);
  transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease) .5s;
}
.is-in .it-word::after { transform: none; }

.about-personal { display: grid; grid-template-columns: minmax(0, 820px); }
.about-copy .about-name { color: var(--text); font-family: var(--display); font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 400; letter-spacing: 0; margin: 0 0 4px; }
.about-role { margin: 0 0 26px !important; color: var(--accent) !important; font-family: var(--mono); font-size: .78rem !important; letter-spacing: .1em; text-transform: uppercase; }
.about-copy p { color: var(--muted); font-size: 1.05rem; margin: 0 0 16px; }
.about-copy .about-note { margin-top: 24px; padding-left: 16px; border-left: 2px solid var(--accent); font-size: .95rem; color: var(--text); }

.portrait { position: relative; margin: 0; aspect-ratio: 1400 / 1120; overflow: hidden; border: 1px solid rgba(51,194,255,.14); }
.portrait img { width: 100%; height: 115%; object-fit: cover; transform: translateY(var(--par, 0px)); transition: filter .6s; filter: grayscale(1) contrast(1.05); }
.portrait:hover img { filter: grayscale(1) contrast(1.12) brightness(1.06); }
.portrait-corner { position: absolute; width: 22px; height: 22px; border: 0 solid var(--accent); }
.portrait-corner.tl { top: 12px; left: 12px; border-top-width: 2px; border-left-width: 2px; }
.portrait-corner.br { bottom: 12px; right: 12px; border-bottom-width: 2px; border-right-width: 2px; }

/* ---------- CONTACT ---------- */
.contact { position: relative; padding: 150px 0 160px; text-align: center; overflow: hidden; }
.contact-eq {
  position: absolute; left: 0; right: 0; bottom: 0; height: 60%;
  display: flex; align-items: flex-end; justify-content: center; gap: 6px; pointer-events: none;
  mask-image: linear-gradient(to top, rgba(0,0,0,.6), transparent);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.6), transparent);
}
.contact-eq i {
  flex: 1; max-width: 14px; height: 100%; background: linear-gradient(to top, rgba(51,194,255,.35), rgba(51,194,255,0));
  transform-origin: bottom; transform: scaleY(.1);
  animation: eqBar var(--dur, 1.4s) ease-in-out var(--del, 0s) infinite alternate;
}
@keyframes eqBar { from { transform: scaleY(var(--lo, .08)); } to { transform: scaleY(var(--hi, .6)); } }
.contact-inner { position: relative; display: grid; justify-items: center; }
.contact-email { margin-top: 22px; font-family: var(--mono); font-size: .95rem; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid transparent; transition: color .25s, border-color .25s; }
.contact-email:hover { color: var(--accent); border-color: var(--accent); }
.contact .eyebrow { justify-content: center; }
.contact h2 { font-size: clamp(1.6rem, 3.8vw, 3.2rem); max-width: 18ch; margin-bottom: 22px; }
.contact p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; margin: 0 0 40px; }

/* ---------- FOOTER ---------- */
.site-footer {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 30px; align-items: center;
  padding: 40px 0 46px; border-top: 1px solid var(--line); color: var(--dim); font-size: .82rem;
}
.trademark-note { margin-top: 4px; font-size: .74rem; color: #666d74; }
.footer-center { display: grid; justify-items: center; gap: 14px; }
.instagram-link { display: flex; align-items: center; gap: 12px; color: var(--text); transition: color .3s; }
.instagram-icon { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .5s var(--ease-back), stroke .3s; }
.instagram-icon circle:last-child { fill: currentColor; stroke: none; }
.instagram-copy { display: grid; line-height: 1.25; }
.instagram-title { font-size: .72rem; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.instagram-handle { font-weight: 600; font-size: .98rem; }
.instagram-link:hover { color: var(--accent); }
.instagram-link:hover .instagram-icon { transform: rotate(-10deg) scale(1.12); }
.footer-legal { display: flex; gap: 18px; font-size: .76rem; }
.footer-legal a { transition: color .25s; }
.footer-legal a:hover { color: var(--accent); }
.footer-origin { display: flex; align-items: center; gap: 10px; justify-self: end; }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 46px; height: 46px; border: 1px solid var(--accent-line); background: rgba(24,24,24,.85);
  color: var(--accent); cursor: pointer; font-size: 1.1rem;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: opacity .4s, transform .4s var(--ease), background .25s, color .25s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); color: #0d1418; }

/* ---------- LEGAL PAGES ---------- */
.legal-page { position: relative; z-index: 1; width: min(calc(100% - 48px), 820px); margin: 0 auto; padding: 90px 0 120px; animation: pageIn .9s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(24px); } }
.legal-page h1 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); font-weight: 400; letter-spacing: -.01em; margin-bottom: 30px; }
.legal-page h2 { font-size: 1.15rem; margin: 46px 0 16px; letter-spacing: 0; }
.legal-page p { color: var(--muted); }
.legal-back { display: inline-flex; gap: 8px; margin-bottom: 60px; color: var(--muted); font-size: .9rem; transition: color .25s, gap .3s var(--ease); }
.legal-back:hover { color: var(--accent); gap: 14px; }
.legal-placeholder { padding: 20px 22px; border: 1px dashed var(--accent-line); background: var(--accent-soft); }
.legal-section { border-top: 1px solid var(--line); margin-top: 40px; }
.legal-updated { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; color: var(--dim) !important; margin: -14px 0 30px; }
.legal-page a:not(.legal-back) { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.legal-page a:not(.legal-back):hover { border-color: var(--accent); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .project { grid-template-columns: 1fr; gap: 30px; }
  .project-flip .gallery { order: 0; }
  .project-flip { grid-template-columns: 1fr; }
  .lab, .lab.origin { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); gap: 44px 0; }
  .project-soon { grid-template-columns: 1fr; gap: 28px; padding: 36px 28px; }
  .soon-mark { width: 140px; }
  .lab-copy { max-width: 760px; }
  .thumbs { --visible: 5; }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .site-header.is-hidden { transform: none; }
  .site-header::before { background: rgba(24,24,24,.96); }
  .menu-toggle { background: rgba(24,24,24,.6); }
  .nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; gap: 26px;
    background: rgba(20,20,20,.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    font-size: 1.6rem; font-weight: 600;
    clip-path: circle(0 at calc(100% - 46px) 40px);
    transition: clip-path .7s var(--ease);
  }
  .nav.open { clip-path: circle(150% at calc(100% - 46px) 40px); }
  .nav a { opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .5s var(--ease), color .25s; color: var(--text); }
  .nav.open a { opacity: 1; transform: none; }
  .nav.open a:nth-child(1) { transition-delay: .15s; }
  .nav.open a:nth-child(2) { transition-delay: .21s; }
  .nav.open a:nth-child(3) { transition-delay: .27s; }
  .nav.open a:nth-child(4) { transition-delay: .33s; }
  .nav.open a:nth-child(5) { transition-delay: .39s; }
  .nav-cta { font-size: 1.1rem; }

  .hero { grid-template-columns: 1fr; padding-top: 104px; gap: 28px; text-align: center; }
  .hero-visual { order: -1; max-width: 340px; width: 72%; justify-self: center; }
  .hero-title { margin-inline: auto; }
  .hero-kicker, .hero-text { margin-inline: auto; }
  .made-in-italy, .hero-actions { justify-content: center; }
  .hero .eyebrow { display: block; text-align: center; line-height: 1.7; }
  .hero .eyebrow .eq { margin-right: 8px; vertical-align: -1px; }
  .hero-wave { height: 35%; }
  .scroll-cue { display: none; }
  .section { padding: 90px 0; }
  .project-list { gap: 80px; }
  .about-personal { grid-template-columns: 1fr; gap: 40px; }
  .portrait { max-width: 520px; }
  .site-footer { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer-origin { justify-self: center; }
  .gallery-arrow { opacity: 1; transform: none; width: 40px; height: 40px; }
  .cursor-logo { display: none; }
}

@media (max-width: 560px) {
  .hero, .section, .contact, .site-footer, .italian-rule { width: calc(100% - 32px); }
  .site-header { padding-inline: 16px; }
  .capability-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; gap: 36px; }
  .now { width: calc(100% - 32px); }
  .capability { padding: 32px 26px; }
  .cap-num { margin-bottom: 26px; }
  .hero-visual { width: 78%; max-width: 300px; }
  .hero-actions .button { flex: 1; }
  .portrait { max-width: none; }
  .contact { padding: 110px 0 120px; }
}

/* Chi preferisce meno movimento (impostazione del sistema operativo) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
}
