/* Nagemus v2: percorso immersivo a scene intere */

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

:root {
  --blue:   #004aac;
  --blue-2: #2f6fe0;
  --deep:   #01051e;
  --ink:    #131010;
  --paper:  #F8F5F0;
  --cream:  #F3E9E2;
  --gray:   #8a857f;
  --serif:  'DM Serif Display', Georgia, serif;
  --sans:   'DM Sans', system-ui, sans-serif;
  --nav-h:  68px;
  --g:      6vw;
}

html { font-size: 16px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
em { font-style: italic; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.line-wrap { display: block; overflow: hidden; padding-bottom: 0.08em; }
.line-inner { display: block; transform: translateY(110%); }

/* ===== NAV ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--g); z-index: 100;
  mix-blend-mode: normal;
  transition: color 0.4s;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo-icon { width: 34px; height: auto; }
.logo-lockup { height: 30px; width: auto; display: block; transition: filter 0.3s; }
.logo-text { font-weight: 600; font-size: 0.95rem; letter-spacing: 0.12em; text-transform: uppercase; }
.nav-cta {
  text-decoration: none; color: var(--paper); background: var(--ink);
  padding: 0.55rem 1.25rem; border-radius: 999px; font-size: 0.85rem; font-weight: 500;
  transition: transform 0.2s, background 0.3s, color 0.3s;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav.on-dark { color: var(--paper); }
.nav.on-dark .nav-cta { background: var(--paper); color: var(--ink); }
.nav.on-dark .logo-icon, .nav.on-dark .logo-lockup { filter: brightness(0) invert(1); }

/* ===== SCENE ===== */
.scene {
  position: relative;
  height: 100vh; height: 100svh; min-height: 520px;
  overflow: hidden;
}

.fullbleed { position: absolute; inset: 0; width: 100%; height: 100%; }

.eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--blue);
}

.huge {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.6rem, 7.2vw, 7rem); line-height: 1.02; letter-spacing: -0.01em;
}
.big {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 4.2rem); line-height: 1.08; letter-spacing: -0.005em;
}

/* ===== STAGE (logo + pupille) ===== */
.stage { position: relative; aspect-ratio: 513 / 430; }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.stage-overlay { position: absolute; inset: 0; }
.stage-logo { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.stage-logo-mask {
  background: var(--paper);
  -webkit-mask: url(assets/logo-senza-occhi.png) center / contain no-repeat;
  mask: url(assets/logo-senza-occhi.png) center / contain no-repeat;
}
.pupil {
  position: absolute; width: 15%; aspect-ratio: 1; margin: -7.5% 0 0 -7.5%;
  border-radius: 50%; background: var(--blue); will-change: transform;
}
.contact-stage .pupil { background: var(--paper); }

/* ===== 1. INTRO ===== */
.intro { background: var(--paper); }
#dive-canvas { opacity: 0; transform-origin: 87% 21%; }

.intro-type { position: absolute; font-family: var(--serif); font-weight: 400; color: var(--ink); z-index: 1; pointer-events: none; }
.intro-top {
  top: calc(var(--nav-h) + 4vh); left: var(--g);
  font-size: clamp(2.6rem, 6.4vw, 6.2rem); line-height: 1;
}
.intro-big {
  left: 0; right: 0; bottom: -0.16em;
  text-align: center; white-space: nowrap;
  font-size: clamp(6rem, 25vw, 30rem); line-height: 0.9; letter-spacing: -0.03em;
  font-style: italic; color: var(--blue);
}

.intro-stage {
  position: absolute; z-index: 2;
  left: 50%; top: 50%;
  width: min(40vw, 58vh * 1.193, 560px);
  transform: translate(-50%, -54%);
}

.intro-sub {
  position: absolute; right: var(--g); top: calc(var(--nav-h) + 5vh);
  max-width: 250px; font-size: 0.95rem; color: var(--gray); text-align: right; z-index: 3;
  opacity: 0;
}

.dive-copy {
  position: absolute; left: var(--g); bottom: 12vh; z-index: 3; color: var(--ink);
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.7rem; z-index: 3;
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray);
  opacity: 0; transition: opacity 0.3s;
}
.scroll-hint span { width: 1px; height: 26px; background: var(--gray); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
.scroll-hint.is-hidden { opacity: 0 !important; }
@keyframes drip { 0%,100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.intro-dive-text {
  position: absolute; z-index: 3; left: var(--g); bottom: 11vh; max-width: min(980px, 88vw);
  opacity: 0;
}
.intro-dive-text p + p { margin-top: 0.4em; color: var(--blue); }
.dive-blue { background: var(--blue); opacity: 0; z-index: 4; pointer-events: none; }
@media (max-width: 768px) {
  .intro-dive-text { bottom: 7vh; padding: 1rem 1.1rem; border-radius: 16px; background: rgba(243,233,226,0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .intro-dive-text .big { font-size: 1.7rem; }
  .intro-dive-text br, .senso-line br { display: none; }
  .scroll-hint { bottom: calc(30vw + 5vh); }
}

/* ===== 2. SENSO ===== */
.senso { background: var(--blue); color: var(--paper); }
.senso-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,20,70,0.35) 0%, rgba(0,20,70,0.05) 45%, rgba(0,10,30,0.45) 100%);
  opacity: 0;
}
.senso-lines {
  position: absolute; inset: 0; padding: calc(var(--nav-h) + 8vh) var(--g) 10vh;
  display: grid; align-content: start;
}
.senso-line { position: absolute; left: var(--g); right: var(--g); opacity: 0; }
#senso-eyebrow { top: calc(var(--nav-h) + 8vh); color: rgba(248,245,240,0.8); }
#senso-1 { top: calc(var(--nav-h) + 12vh); text-shadow: 0 4px 40px rgba(0,20,80,0.35); }
#senso-1 em { color: #cfe0ff; }
#senso-2 { top: calc(var(--nav-h) + 12vh); text-shadow: 0 4px 40px rgba(0,20,80,0.35); }

/* ===== 3. LA Ä ===== */
.occhi { background: var(--paper); display: grid; place-items: center; }
.occhi-photo { display: none; }
.occhi-lines { position: relative; text-align: center; padding: 0 var(--g); }
.occhi-word { position: relative; }
.wordmark {
  font-family: var(--sans); font-weight: 700; color: var(--blue);
  font-size: clamp(4.5rem, 21vw, 22rem); line-height: 1; letter-spacing: -0.045em;
  padding-top: 0.22em;
}
.a-eyes { position: relative; display: inline-block; }
.a-eyes i {
  position: absolute; top: -0.06em; width: 0.17em; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #8fb2ff 0%, #2f6fe0 22%, #004aac 55%, #002c70 100%);
  box-shadow: 0 0.02em 0.04em rgba(0,30,90,0.35);
  transform-origin: 50% 100%;
}
.a-eyes i:first-of-type { left: 0.03em; }
.a-eyes i:last-of-type  { left: 0.33em; }
.a-eyes::before, .a-eyes::after {
  content: ''; position: absolute; bottom: 0.52em; width: 0.03em; height: 0; background: var(--blue);
  border-radius: 0.02em; transform-origin: 50% 100%;
}
.occhi-caption { margin-top: clamp(1.6rem, 3.2vw, 3.2rem); font-size: clamp(1rem, 1.6vw, 1.3rem); color: #555; line-height: 1.5; }

/* ===== 4. SPIRALE ===== */
.spirale { background: var(--deep); color: var(--paper); display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; padding: var(--nav-h) var(--g) 0; gap: 4vw; }
.spiral-wrap { position: relative; width: min(46vw, 78vh); aspect-ratio: 1; justify-self: center; }
.spiral-img { position: absolute; inset: 9%; width: 82%; height: 82%; border-radius: 50%; will-change: transform; }
.spiral-text { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; will-change: transform; }
.ring { font-family: var(--sans); font-weight: 600; letter-spacing: 0.12em; }
.ring-out { font-size: 30px; fill: rgba(248,245,240,0.85); }
.ring-in  { font-size: 22px; fill: #5b8fe0; }
.spiral-copy .big em { color: #8fb2ff; }
.spiral-copy p { margin-top: 1.4rem; max-width: 420px; color: rgba(248,245,240,0.65); font-size: 1.05rem; opacity: 0; }

/* ===== 5. CHI ===== */
.chi { background: var(--paper); height: auto; min-height: 100svh; padding: 18vh var(--g); display: grid; align-content: center; gap: 2rem; }
.manifesto {
  font-family: var(--serif); font-size: clamp(1.9rem, 4.4vw, 4rem); line-height: 1.15; max-width: 1150px;
}
.manifesto .w { opacity: 0.12; transition: none; }
.manifesto em { color: var(--blue); }
.manifesto .hl { font-weight: 400; font-style: italic; color: var(--blue); }

/* ===== 6. SERVIZI ===== */
.servizi { background: #e9dcd4; }
/* La lumaca sale un po' così la scia resta visibile sopra le schede */
#glide-video { object-fit: cover; object-position: 47% 50%; transform: translateY(-11%); opacity: 0; }
.servizi-head { position: absolute; top: calc(var(--nav-h) + 3vh); left: var(--g); z-index: 2; }
.servizi-head .big { margin-top: 0.8rem; font-size: clamp(1.8rem, 3.6vw, 3.2rem); }
.servizi-head .big em { color: var(--blue); }
.servizi-rail {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 5vh;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 3.4rem 0 1rem;
}
.servizi-rail::-webkit-scrollbar { display: none; }
.servizi-track { display: flex; gap: 1.4rem; width: max-content; padding: 0 var(--g); }
.card {
  position: relative; flex: 0 0 auto; width: min(330px, 76vw);
  padding: 1.6rem 1.6rem 3.4rem;
  text-decoration: none; color: var(--ink);
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(60,40,20,0.10);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), background 0.3s, box-shadow 0.3s;
}
.card:hover, .card:focus-visible {
  transform: translateY(-10px);
  background: rgba(255,255,255,0.88);
  box-shadow: 0 30px 60px rgba(0,40,110,0.16);
  outline: none;
}
.card-icon {
  position: absolute; top: -2.6rem; right: 1rem; width: 92px; height: 92px; object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0,40,110,0.22));
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.card:hover .card-icon, .card:focus-visible .card-icon { transform: translateY(-8px) rotate(-8deg) scale(1.08); }
.card h3 { padding-right: 3.6rem; }
.card-n { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; color: var(--blue); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.15; margin: 0.5rem 0 0.6rem; }
.card p { font-size: 0.9rem; color: #555; line-height: 1.55; }
.card-more {
  position: absolute; left: 1.6rem; bottom: 1.3rem;
  font-size: 0.82rem; font-weight: 600; color: var(--blue); letter-spacing: 0.02em;
}
.card-more::after { content: ' →'; display: inline-block; transition: transform 0.3s; }
.card:hover .card-more::after { transform: translateX(5px); }

/* ===== 7. CLIENTI ===== */
.clienti { background: var(--paper); display: grid; align-content: center; gap: 9vh; }
.clienti-head { padding: 0 var(--g); }
.clienti-head .big { margin-top: 0.8rem; }
.clienti-head .big em { color: var(--blue); }
.logo-rail { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track { display: flex; align-items: center; gap: 7vw; width: max-content; animation: logos 38s linear infinite; padding-left: 7vw; }
.logo-rail:hover .logo-track { animation-play-state: paused; }
.logo-item { height: clamp(70px, 11vw, 140px); width: auto; object-fit: contain; transition: transform 0.4s; }
.logo-item:hover { transform: scale(1.08); }
.logo-confartigianato, .logo-vtrend { height: clamp(46px, 6.5vw, 86px); }
.logo-romano-pucci { mix-blend-mode: multiply; }
@keyframes logos { to { transform: translateX(-50%); } }

/* ===== 8. CONTATTI ===== */
.contatti { background: var(--ink); color: var(--paper); }
#contact-canvas { z-index: 0; }
.contatti-inner {
  position: relative; z-index: 1; height: 100%;
  display: grid; justify-items: center; align-content: center; text-align: center;
  padding: var(--nav-h) var(--g) 4rem;
}
.contact-stage { width: min(26vw, 150px); margin-bottom: 1rem; }
.contatti-spacer { height: clamp(7rem, 22vw, 20rem); width: 100%; }
.contatti-sub { margin: 1rem 0 2rem; color: rgba(248,245,240,0.7); font-size: 1.05rem; }
.btn-contact {
  display: inline-flex; gap: 0.6rem; align-items: center;
  background: var(--paper); color: var(--ink); text-decoration: none;
  padding: 1rem 2.2rem; border-radius: 999px; font-weight: 600; letter-spacing: 0.03em;
  transition: transform 0.2s;
}
.btn-contact::after { content: '→'; }
.btn-contact:hover { transform: translateX(4px); }
.footer {
  position: absolute; left: 0; right: 0; bottom: 1.2rem; text-align: center; z-index: 1;
  font-size: 0.72rem; color: rgba(248,245,240,0.3); letter-spacing: 0.04em;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  :root { --nav-h: 60px; --g: 20px; }

  .intro-top { font-size: clamp(2.4rem, 12vw, 3.4rem); top: calc(var(--nav-h) + 3vh); }
  .intro-sub { display: none; }
  .intro-stage { width: min(78vw, 360px); transform: translate(-50%, -42%); }
  .intro-big { font-size: 30vw; bottom: 3vh; }
  #dive-canvas { transform-origin: 70% 21%; }

  #senso-1, #senso-2 { top: calc(var(--nav-h) + 10vh); }

  .spirale { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 2rem; padding: calc(var(--nav-h) + 1rem) var(--g) 2rem; }
  .spiral-wrap { width: min(82vw, 46vh); }
  .ring-out { font-size: 34px; }
  .ring-in { font-size: 26px; }

  .servizi-head .big { font-size: 1.9rem; }
  .servizi-rail { bottom: 2vh; padding-top: 2.8rem; }
  #glide-video {
    top: 21%; bottom: auto; height: 50%; transform: none;
    -webkit-mask: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
    mask: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  }
  .servizi-head { top: calc(var(--nav-h) + 1.5vh); }
  .card p { display: none; }
  .card { width: min(260px, 70vw); padding-bottom: 2.8rem; }
  .card-icon { width: 70px; height: 70px; top: -2rem; }
  .servizi-track { gap: 1rem; }
  .card { padding: 1.3rem 1.3rem 3rem; }
  .card-more { left: 1.3rem; bottom: 1.1rem; }
  .card h3 { font-size: 1.25rem; }
  .card p { font-size: 0.85rem; }

  .logo-track { gap: 12vw; animation-duration: 28s; }
  .logo-item { height: 72px; }
  .logo-confartigianato, .logo-vtrend { height: 44px; }
}

@media (max-width: 768px) and (max-height: 700px) {
  .intro-stage { width: min(64vw, 280px); }
  .card p { display: none; }
}

/* ===== MOVIMENTO RIDOTTO ===== */
@media (prefers-reduced-motion: reduce) {
  .line-inner { transform: none !important; }
  .intro-sub, .scroll-hint, .senso-line, .occhi-line, .spiral-copy p, .intro-dive-text { opacity: 1 !important; }
  .scene { height: auto; min-height: 100svh; }
  .senso-line { position: static; margin-bottom: 2rem; }
  .senso-shade { opacity: 1; }
  .manifesto .w { opacity: 1 !important; }
  .logo-track { animation: none; flex-wrap: wrap; width: auto; }
}

/* ===== PAGINE SERVIZIO ===== */
.svc-page { background: var(--paper); }
.svc-hero { background: #e9dcd4; }
.svc-video { object-fit: cover; object-position: 55% 40%; transform: translateX(17%) scale(1.12); transform-origin: 50% 40%; }
.svc-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(233,220,212,0.97) 0%, rgba(233,220,212,0.85) 30%, rgba(233,220,212,0) 55%); }
.svc-hero-copy { position: absolute; left: var(--g); bottom: 12vh; max-width: min(620px, 88vw); z-index: 1; }
.svc-hero-copy .huge { margin: 0.8rem 0 1.2rem; font-size: clamp(2.6rem, 6vw, 5.8rem); animation: rise 1s cubic-bezier(.2,.8,.2,1) both 0.1s; }
.svc-lead { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: #4a4542; max-width: 520px; animation: rise 1s cubic-bezier(.2,.8,.2,1) both 0.3s; }
.svc-icon { display: block; width: clamp(76px, 8vw, 110px); height: auto; margin-bottom: 0.6rem; filter: drop-shadow(0 16px 20px rgba(0,40,110,0.22)); animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
.svc-back { display: inline-block; margin-bottom: 2rem; color: var(--ink); text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.svc-back::before { content: '← '; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

.svc-block { padding: 14vh var(--g); max-width: 1300px; margin: 0 auto; }
.svc-intro .manifesto { max-width: 1050px; }
.svc-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin-top: 3rem; border-top: 1px solid rgba(0,0,0,0.1); }
.svc-item { padding: 2.6rem 2rem 2.6rem 0; border-bottom: 1px solid rgba(0,0,0,0.1); }
.svc-item:nth-child(even) { padding-left: 2rem; border-left: 1px solid rgba(0,0,0,0.1); }
.svc-item-n { font-family: var(--serif); font-size: 3.4rem; line-height: 1; color: var(--blue); opacity: 0.25; }
.svc-item h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin: 0.6rem 0 0.4rem; }
.svc-item p { color: #555; max-width: 440px; }

.svc-how { background: var(--white, #fff); max-width: none; }
.svc-how > * { max-width: 1300px; margin-left: auto; margin-right: auto; }
.svc-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3vw; margin-top: 3rem; }
.svc-step span { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--blue); color: var(--paper); font-weight: 700; }
.svc-step h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; margin: 1rem 0 0.4rem; }
.svc-step p { color: #555; }
.svc-per { margin-top: 4rem; font-size: 1.15rem; color: #444; }
.svc-per strong { color: var(--blue); }

.svc-cta { position: relative; background: var(--ink); color: var(--paper); text-align: center; padding: 18vh var(--g) 8rem; display: grid; justify-items: center; gap: 1.4rem; }
.svc-cta .huge { font-size: clamp(3.4rem, 11vw, 10rem); }
.svc-cta p { color: rgba(248,245,240,0.7); }
.svc-next { margin-top: 5rem; color: var(--paper); text-decoration: none; font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2.4rem); display: grid; gap: 0.4rem; }
.svc-next span { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: #8fb2ff; }
.svc-next::after { content: '→'; font-family: var(--sans); transition: transform 0.3s; }
.svc-next:hover::after { transform: translateX(8px); }

.rv { opacity: 0; transform: translateY(40px); transition: opacity 0.9s cubic-bezier(.2,.8,.2,1), transform 0.9s cubic-bezier(.2,.8,.2,1); }
.rv.in { opacity: 1; transform: none; }
.svc-item.rv:nth-child(2), .svc-step.rv:nth-child(2) { transition-delay: 0.1s; }
.svc-item.rv:nth-child(3), .svc-step.rv:nth-child(3) { transition-delay: 0.2s; }
.svc-item.rv:nth-child(4) { transition-delay: 0.3s; }

@media (max-width: 768px) {
  .svc-hero-shade { background: linear-gradient(0deg, rgba(233,220,212,0.98) 0%, rgba(233,220,212,0.9) 34%, rgba(233,220,212,0) 52%); }
  .svc-video { object-position: 50% 30%; transform: translateY(-16%); }
  .svc-hero-copy { bottom: 6vh; }
  .svc-back { margin-bottom: 1rem; }
  .svc-block { padding: 10vh var(--g); }
  .svc-list { grid-template-columns: 1fr; }
  .svc-item, .svc-item:nth-child(even) { padding: 2rem 0; border-left: none; }
  .svc-steps { grid-template-columns: 1fr; gap: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .svc-hero-copy .huge, .svc-lead, .svc-icon { animation: none; }
}
.svc-page .nav { background: rgba(248,245,240,0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.svc-page .nav.on-dark { background: rgba(19,16,16,0.86); }
