/* ==========================================================================
   STANCAMPIANO & PARTNERS — Design System
   Minimal Luxury / Institutional Consulting
   Palette estratta dal logo ufficiale (monogramma S&P navy/oro su fondo avorio).
   ========================================================================== */

:root{
  /* Colore istituzionale — estratto dal logo ufficiale */
  --navy-950: #0a1826;
  --navy-900: #13263b;
  --navy-800: #1b3450;
  --navy-700: #234666;
  --navy-600: #2e5a80;
  --ivory: #f7f4f0;
  --ivory-dim: #d8d3c8;
  --gold: #b98d4e;
  --gold-light: #d3ac74;
  --gold-dim: #8a6a3a;
  --line: rgba(247,244,240,0.12);
  --line-strong: rgba(247,244,240,0.22);

  --font-serif: 'Fraunces', 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease-lux: cubic-bezier(.16,.84,.44,1);
  --dur-med: .9s;

  --container: 1280px;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html,body{ margin:0; padding:0; }

body{
  background: var(--navy-900);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.light-mode{
  background: var(--ivory);
  color: var(--navy-900);
}

::selection{ background: var(--gold); color: var(--navy-950); }

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

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

h1,h2,h3,h4{
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

.eyebrow{
  display:flex;
  align-items:center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 22px;
}
.eyebrow::before{
  content:'';
  width: 34px;
  height: 1px;
  background: var(--gold);
  display:inline-block;
}

p.lead{
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ivory-dim);
  max-width: 640px;
  font-weight: 300;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .5s var(--ease-lux);
  white-space: nowrap;
}
.btn-primary{
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dim));
  color: var(--navy-950);
}
.btn-primary:hover{ filter: brightness(1.12); transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(185,141,78,.45); }

.btn-ghost{
  border-color: var(--line-strong);
  color: var(--ivory);
  background: rgba(247,245,240,0.02);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover{ border-color: var(--gold); color: var(--gold-light); transform: translateY(-2px); }

.btn-arrow{ transition: transform .4s var(--ease-lux); }
.btn:hover .btn-arrow{ transform: translateX(4px); }

/* ---------- Glass ---------- */
.glass{
  background: rgba(247,245,240,0.04);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* ---------- Nav ---------- */
.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 22px 0;
  transition: all .5s var(--ease-lux);
  border-bottom: 1px solid transparent;
}
.nav.scrolled{
  padding: 14px 0;
  background: rgba(7,13,24,0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav .container{
  display:flex;
  align-items:center;
  justify-content: space-between;
}
.nav-logo img{ height: 34px; width: auto; transition: height .4s var(--ease-lux); }
.nav.scrolled .nav-logo img{ height: 28px; }

.nav-links{
  display:flex;
  align-items:center;
  gap: 40px;
}
.nav-links a{
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  position: relative;
  padding: 4px 0;
  transition: color .3s ease;
}
.nav-links a::after{
  content:'';
  position:absolute; left:0; bottom:0;
  width:0; height:1px;
  background: var(--gold);
  transition: width .4s var(--ease-lux);
}
.nav-links a:hover, .nav-links a.active{ color: var(--ivory); }
.nav-links a:hover::after, .nav-links a.active::after{ width: 100%; }

.nav-cta{ display:flex; align-items:center; gap: 18px; }
.nav-toggle{ display:none; }

@media (max-width: 960px){
  .nav-links{ display:none; }
  .nav-toggle{ display:block; }
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  min-height: 100vh;
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow:hidden;
  padding-top: 100px;
}
.hero-bg{
  position:absolute; inset:0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(31,57,96,0.55), transparent 60%),
    radial-gradient(ellipse 70% 60% at 80% 80%, rgba(185,141,78,0.10), transparent 60%),
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  z-index: 0;
}
.hero-canvas{ position:absolute; inset:0; z-index:1; opacity:.55; }
.hero-grain{
  position:absolute; inset:0; z-index:2;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.hero-content{ position:relative; z-index: 3; max-width: 980px; padding: 0 24px; }
.hero-mono{
  width: 64px; height: 64px;
  margin: 0 auto 36px;
  opacity: 0;
}
.hero-eyebrow{
  font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold-light); font-weight: 600; margin-bottom: 28px;
  display:flex; align-items:center; justify-content:center; gap:14px;
}
.hero-eyebrow span.line{ width:40px; height:1px; background: var(--gold); }

.hero h1{
  font-size: clamp(38px, 6.4vw, 92px);
  line-height: 1.04;
  font-weight: 400;
  color: var(--ivory);
}
.hero h1 .line-wrap{ overflow:hidden; display:block; }
.hero h1 .accent{ font-style: italic; color: var(--gold-light); }

.hero-sub{
  margin: 30px auto 46px;
  max-width: 620px;
  font-size: clamp(15px,1.4vw,18px);
  color: var(--ivory-dim);
  font-weight: 300;
}
.hero-actions{ display:flex; gap: 18px; justify-content:center; flex-wrap: wrap; }

.hero-scroll{
  position:absolute; bottom: 40px; left:50%; transform: translateX(-50%);
  z-index:3; display:flex; flex-direction:column; align-items:center; gap:10px;
  font-size: 10px; letter-spacing:.3em; text-transform:uppercase; color: var(--ivory-dim);
}
.hero-scroll .stick{ width:1px; height:46px; background: linear-gradient(var(--gold), transparent); position:relative; overflow:hidden; }
.hero-scroll .stick::after{ content:''; position:absolute; top:-100%; left:0; width:100%; height:100%; background: var(--gold-light); animation: scrollDown 2.2s ease-in-out infinite; }
@keyframes scrollDown{ 0%{top:-100%;} 60%{top:100%;} 100%{top:100%;} }

/* ---------- Sections generic ---------- */
section{ position:relative; padding: clamp(90px, 12vw, 170px) 0; }
.section-head{ max-width: 720px; margin-bottom: 64px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head h2{ font-size: clamp(30px, 4vw, 54px); line-height:1.12; }
.section-head h2 .accent{ font-style: italic; color: var(--gold-light); }

.divider{ height:1px; background: var(--line); border:0; margin:0; }

/* stat number counters */
.reveal{ opacity:0; transform: translateY(40px); }

/* ---------- Ticker / marquee ---------- */
.marquee-wrap{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  overflow:hidden;
  white-space: nowrap;
}
.marquee{
  display:inline-flex;
  gap: 60px;
  animation: marquee 32s linear infinite;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ivory-dim);
  letter-spacing: .02em;
}
.marquee span{ opacity:.6; }
.marquee .sep{ color: var(--gold); opacity:1; }
@keyframes marquee{ from{ transform: translateX(0);} to{ transform: translateX(-50%);} }

/* ---------- Cards: services ---------- */
.grid{ display:grid; gap: 1px; background: var(--line); border:1px solid var(--line); }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){ .grid-3, .grid-4{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 620px){ .grid-3, .grid-4, .grid-2{ grid-template-columns: 1fr; } }

.card{
  background: var(--navy-900);
  padding: 44px 36px;
  position: relative;
  transition: background .5s var(--ease-lux);
  overflow:hidden;
}
.card:hover{ background: var(--navy-800); }
.card::before{
  content:'';
  position:absolute; left:0; top:0; width:2px; height:0;
  background: var(--gold);
  transition: height .5s var(--ease-lux);
}
.card:hover::before{ height: 100%; }
.card .num{ font-family: var(--font-serif); font-size:13px; color: var(--gold); letter-spacing:.1em; }
.card h3{ font-size: 22px; margin: 22px 0 14px; color: var(--ivory); }
.card p{ color: var(--ivory-dim); font-size: 14.5px; font-weight:300; }
.card .card-link{ margin-top:22px; display:inline-flex; align-items:center; gap:8px; font-size:12px; letter-spacing:.12em; text-transform:uppercase; color: var(--gold-light); opacity:0; transform: translateX(-6px); transition: all .4s ease; }
.card:hover .card-link{ opacity:1; transform:none; }

.icon{ width:30px; height:30px; stroke: var(--gold-light); fill:none; stroke-width:1.2; }

/* ---------- Timeline / Metodo ---------- */
.timeline{ position:relative; }
.timeline-line{
  position:absolute; left: 28px; top:0; bottom:0; width:1px;
  background: var(--line-strong);
}
.timeline-line-fill{
  position:absolute; left:0; top:0; width:100%; height:0;
  background: linear-gradient(var(--gold), var(--gold-dim));
}
.t-step{ position:relative; padding: 0 0 70px 90px; }
.t-step:last-child{ padding-bottom:0; }
.t-dot{
  position:absolute; left: 16px; top:2px; width: 26px; height:26px; border-radius:50%;
  background: var(--navy-900); border: 1px solid var(--gold); display:flex; align-items:center; justify-content:center;
  font-family: var(--font-serif); font-size:11px; color: var(--gold-light);
}
.t-step h3{ font-size: 24px; margin-bottom:10px; color: var(--ivory); }
.t-step p{ color: var(--ivory-dim); font-weight: 300; max-width: 560px; }

/* ---------- Case history ---------- */
.case-card{
  border: 1px solid var(--line);
  padding: 46px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-bottom: 26px;
  position: relative;
}
.case-card .tag{ font-size:11px; letter-spacing:.2em; text-transform:uppercase; color: var(--gold-light); margin-bottom:16px; display:block; }
.case-card h3{ font-size: 30px; margin-bottom: 18px; }
.case-flow{ display:flex; flex-wrap:wrap; gap: 10px 0; font-size:13px; color: var(--ivory-dim); margin: 18px 0 26px; }
.case-flow b{ color: var(--ivory); font-weight:500; }
.case-flow .arrow{ margin: 0 10px; color: var(--gold); }
.case-stats{ display:grid; grid-template-columns: repeat(3,1fr); gap: 20px; align-content:start; }
.case-stat .value{ font-family: var(--font-serif); font-size: clamp(26px,2.6vw,38px); color: var(--gold-light); }
.case-stat .label{ font-size:11.5px; color: var(--ivory-dim); letter-spacing:.05em; margin-top:6px; }
@media (max-width: 860px){ .case-card{ grid-template-columns: 1fr; } }

/* ---------- Stats strip ---------- */
.stats-strip{ display:grid; grid-template-columns: repeat(4,1fr); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.stat-item{ padding: 50px 30px; text-align:center; border-left:1px solid var(--line); }
.stat-item:first-child{ border-left:none; }
.stat-item .value{ font-family: var(--font-serif); font-size: clamp(34px,3.4vw,56px); color: var(--gold-light); }
.stat-item .label{ margin-top:10px; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color: var(--ivory-dim); }
@media (max-width: 760px){ .stats-strip{ grid-template-columns: repeat(2,1fr);} .stat-item:nth-child(3){border-left:none;} }

/* ---------- Timeline chi siamo (horizontal history) ---------- */
.history-track{ display:flex; gap: 0; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom: 20px; }
.history-item{ min-width: 280px; scroll-snap-align:start; padding: 30px 34px 30px 0; border-right:1px solid var(--line); margin-right:34px; }
.history-item .year{ font-family: var(--font-serif); font-size: 34px; color: var(--gold-light); }
.history-item p{ color: var(--ivory-dim); font-size:14px; font-weight:300; margin-top:12px; }

/* ---------- Values grid ---------- */
.value-item{ padding: 30px 0; border-bottom: 1px solid var(--line); display:flex; gap: 30px; align-items:baseline; }
.value-item .idx{ font-family: var(--font-serif); font-size: 20px; color: var(--gold); min-width: 50px; }
.value-item h4{ font-size: 20px; color: var(--ivory); margin-bottom: 8px; }
.value-item p{ color: var(--ivory-dim); font-weight:300; font-size:14.5px; max-width: 560px; }

/* ---------- Sectors marquee cards ---------- */
.sector-pill{
  padding: 12px 22px; border:1px solid var(--line-strong); border-radius: 30px;
  font-size: 13px; letter-spacing:.04em; color: var(--ivory-dim);
  transition: all .35s ease; cursor:default;
}
.sector-pill:hover{ border-color: var(--gold); color: var(--gold-light); background: rgba(185,141,78,0.06); }
.sector-wrap{ display:flex; flex-wrap:wrap; gap: 14px; }

/* ---------- Form ---------- */
.form-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field{ display:flex; flex-direction:column; gap:10px; margin-bottom:24px; }
.field.full{ grid-column: 1 / -1; }
.field label{ font-size:11px; letter-spacing:.14em; text-transform:uppercase; color: var(--ivory-dim); }
.field input, .field select, .field textarea{
  background: rgba(247,245,240,0.03);
  border: 1px solid var(--line-strong);
  color: var(--ivory);
  padding: 15px 16px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  border-radius: 2px;
  transition: border-color .3s ease, background .3s ease;
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline:none; border-color: var(--gold); background: rgba(247,245,240,0.05);
}
.field textarea{ resize: vertical; min-height: 120px; }

/* ---------- Footer ---------- */
footer{
  border-top: 1px solid var(--line);
  padding: 90px 0 40px;
  background: var(--navy-950);
}
.footer-top{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 50px; margin-bottom: 70px; }
.footer-brand p{ color: var(--ivory-dim); font-size:14px; font-weight:300; margin-top:20px; max-width:280px; }
.footer-col h5{ font-size:11px; letter-spacing:.16em; text-transform:uppercase; color: var(--gold-light); margin-bottom:22px; font-weight:600; }
.footer-col a{ display:block; font-size:14px; color: var(--ivory-dim); padding: 7px 0; transition: color .3s; }
.footer-col a:hover{ color: var(--gold-light); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; padding-top: 30px; border-top:1px solid var(--line); font-size:12.5px; color: var(--ivory-dim); }
.footer-social{ display:flex; gap:16px; }
.footer-legal{ display:flex; gap: 24px; }
@media (max-width: 860px){ .footer-top{ grid-template-columns: 1fr 1fr; } }

/* ---------- Chatbot bubble ---------- */
.chat-bubble{
  position: fixed; bottom: 28px; right: 28px; z-index: 900;
  width: 60px; height:60px; border-radius:50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dim));
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; box-shadow: 0 12px 30px -8px rgba(185,141,78,.5);
  transition: transform .4s var(--ease-lux);
}
.chat-bubble:hover{ transform: scale(1.08); }
.chat-bubble svg{ width:26px; height:26px; stroke: var(--navy-950); }
.chat-bubble .close-ic{ display:none; }
.chat-bubble.is-open .chat-ic{ display:none; }
.chat-bubble.is-open .close-ic{ display:block; }

/* ==========================================================================
   CHAT WIDGET — Metodo S.P.A.R.K. (rule-based, nessuna API esterna)
   ========================================================================== */
.chat-panel{
  position: fixed; bottom: 102px; right: 28px; z-index: 899;
  width: 360px; max-width: calc(100vw - 40px);
  max-height: 62vh;
  background: var(--navy-900);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.55);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(16px) scale(.98);
  pointer-events: none;
  transition: opacity .35s var(--ease-lux), transform .35s var(--ease-lux);
}
.chat-panel.is-open{ opacity:1; transform:none; pointer-events:auto; }

.chat-head{
  display:flex; align-items:center; gap:12px; padding: 18px 20px;
  border-bottom: 1px solid var(--line); background: var(--navy-950);
}
.chat-head .dot{ width:8px; height:8px; border-radius:50%; background: var(--gold-light); box-shadow: 0 0 8px var(--gold-light); }
.chat-head .title{ font-family: var(--font-serif); font-size:15px; color: var(--ivory); }
.chat-head .sub{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color: var(--gold-light); margin-top:2px; }

.chat-body{ flex:1; overflow-y:auto; padding: 18px 20px; display:flex; flex-direction:column; gap:14px; }
.chat-body::-webkit-scrollbar{ width:5px; }
.chat-body::-webkit-scrollbar-thumb{ background: var(--line-strong); }

.chat-msg{
  max-width: 88%; padding: 12px 15px; font-size: 13.5px; line-height:1.5;
  border: 1px solid var(--line-strong); color: var(--ivory-dim);
  animation: chatIn .35s var(--ease-lux);
}
.chat-msg.bot{ align-self:flex-start; background: rgba(247,244,240,0.03); border-top-left-radius:0; }
.chat-msg.user{ align-self:flex-end; background: rgba(185,141,78,0.1); border-color: rgba(185,141,78,.3); color: var(--ivory); border-top-right-radius:0; }
@keyframes chatIn{ from{ opacity:0; transform: translateY(8px);} to{ opacity:1; transform:none; } }

.chat-options{ display:flex; flex-direction:column; gap:8px; }
.chat-opt{
  text-align:left; padding: 11px 14px; font-size:13px; color: var(--ivory);
  background: transparent; border: 1px solid var(--line-strong); cursor:pointer;
  transition: all .3s ease; font-family: var(--font-sans);
}
.chat-opt:hover{ border-color: var(--gold); color: var(--gold-light); background: rgba(185,141,78,.06); }

.chat-cta{ display:flex; flex-direction:column; gap:10px; margin-top:4px; }
.chat-cta .btn{ width:100%; justify-content:center; padding:13px 20px; font-size:12px; }
.chat-restart{ align-self:center; font-size:11.5px; color: var(--ivory-dim); text-decoration:underline; cursor:pointer; margin-top:6px; }
.chat-restart:hover{ color: var(--gold-light); }

@media (max-width:480px){
  .chat-panel{ right:16px; left:16px; width:auto; bottom:96px; }
}

/* ---------- Utility ---------- */
.mt-0{margin-top:0;}
.text-center{text-align:center;}
.split{ display:grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items:center; }
@media (max-width: 900px){ .split{ grid-template-columns: 1fr; gap: 40px; } }

.visual-block{
  position:relative; aspect-ratio: 4/5; border:1px solid var(--line-strong);
  background: linear-gradient(155deg, var(--navy-800), var(--navy-950));
  overflow:hidden;
}
.visual-block::before{
  content:''; position:absolute; inset:0;
  background: radial-gradient(circle at 30% 20%, rgba(185,141,78,0.18), transparent 55%);
}
.visual-block .frame-num{
  position:absolute; bottom:24px; right:24px; font-family: var(--font-serif); font-size:13px; color: var(--gold-light); letter-spacing:.15em;
}
.visual-block .frame-corner{ position:absolute; width:26px; height:26px; border: 1px solid var(--gold); opacity:.6; }
.visual-block .frame-corner.tl{ top:20px; left:20px; border-right:none; border-bottom:none; }
.visual-block .frame-corner.br{ bottom:20px; right:20px; border-left:none; border-top:none; }

/* page hero (interior pages) */
.page-hero{
  padding: 190px 0 90px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
}
.page-hero .eyebrow{ justify-content:flex-start; }
.page-hero h1{ font-size: clamp(36px,5.4vw,68px); max-width: 900px; }
.breadcrumb{ font-size:12px; letter-spacing:.1em; text-transform:uppercase; color: var(--ivory-dim); margin-bottom: 26px; }
.breadcrumb a:hover{ color: var(--gold-light); }

.cta-band{
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
  border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  text-align:center;
}
.cta-band h2{ font-size: clamp(28px,3.6vw,46px); margin-bottom: 26px; }

.faq-item{ border-bottom:1px solid var(--line); padding: 26px 0; cursor:pointer; }
.faq-item .q{ display:flex; justify-content:space-between; align-items:center; font-size:17px; color:var(--ivory); font-family: var(--font-serif); }
.faq-item .a{ max-height:0; overflow:hidden; transition: max-height .5s var(--ease-lux); color: var(--ivory-dim); font-weight:300; font-size:14.5px; }
.faq-item.open .a{ max-height: 300px; padding-top:16px; }
.faq-item .plus{ transition: transform .4s ease; color: var(--gold); font-size:22px; }
.faq-item.open .plus{ transform: rotate(45deg); }

/* ==========================================================================
   PRELOADER — grande apertura con logo animato (solo Home)
   ========================================================================== */
#preloader{
  position: fixed; inset: 0; z-index: 10000;
  display:flex; align-items:center; justify-content:center;
  background: var(--navy-950);
  overflow:hidden;
}
#preloader::before{
  content:'';
  position:absolute; inset:0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(185,141,78,0.10), transparent 65%);
}
#preloader .pre-frame{
  position:absolute; inset: 28px;
  border: 1px solid rgba(247,244,240,0.14);
  opacity:0;
}
.preloader-inner{ position:relative; text-align:center; z-index:2; }
.preloader-logo{
  width: 92px; height:auto; margin: 0 auto 26px;
  opacity:0; transform: scale(.86);
  filter: drop-shadow(0 0 30px rgba(185,141,78,.18));
}
.preloader-word{
  font-family: var(--font-sans);
  font-size: 12px; letter-spacing: .5em; text-transform:uppercase;
  color: var(--ivory-dim); opacity:0; padding-left:.5em;
}
.preloader-line{
  width: 0; height:1px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 22px auto 0;
}
#preloader.pre-done{ pointer-events:none; }
body.is-loading{ overflow:hidden; height:100vh; }

/* ---- Mini apertura pagine interne ---- */
#page-intro{
  position: fixed; inset:0; z-index: 9500;
  background: var(--navy-950);
  display:flex; align-items:center; justify-content:center;
}
.page-intro-logo{ width:52px; height:auto; opacity:0; transform: scale(.82); }

/* ==========================================================================
   DOCUMENTI → SOLUZIONE — sezione animata (Home)
   ========================================================================== */
.doc-flow{ display:flex; flex-direction:column; align-items:center; gap:8px; margin-top:10px; }

.doc-stack{ display:flex; gap:24px; flex-wrap:wrap; justify-content:center; }
.doc-card{
  width: 152px; padding: 30px 16px 24px;
  background: var(--navy-900); border: 1px solid var(--line-strong);
  display:flex; flex-direction:column; align-items:center; gap:16px; text-align:center;
  transition: transform .5s var(--ease-lux), border-color .4s ease, background .4s ease;
}
.doc-card svg{ width:28px; height:28px; stroke: var(--gold-light); fill:none; stroke-width:1.2; }
.doc-card span{ font-size:12.5px; letter-spacing:.03em; color: var(--ivory-dim); line-height:1.3; }
.doc-card:nth-child(1){ transform: rotate(-4deg); }
.doc-card:nth-child(2){ transform: rotate(3deg); margin-top:14px; }
.doc-card:nth-child(3){ transform: rotate(-2deg); }
.doc-card:nth-child(4){ transform: rotate(4deg); margin-top:10px; border-style:dashed; border-color: rgba(185,141,78,.5); }
.doc-card:hover{ transform: rotate(0deg) translateY(-8px); border-color: var(--gold); background: var(--navy-800); }
.doc-card.doc-card-idea span{ color: var(--gold-light); }

.flow-arrows{ display:flex; flex-direction:column; align-items:center; gap:0; height:64px; justify-content:center; }
.flow-arrows span{
  width:12px; height:12px; border-right:2px solid var(--gold); border-bottom:2px solid var(--gold);
  transform: rotate(45deg); opacity:.15; animation: flowDown 1.8s ease-in-out infinite; margin-top:-2px;
}
.flow-arrows span:nth-child(2){ animation-delay:.2s; }
.flow-arrows span:nth-child(3){ animation-delay:.4s; }
@keyframes flowDown{ 0%,100%{ opacity:.1; transform: translateY(0) rotate(45deg);} 50%{ opacity:.9; transform: translateY(6px) rotate(45deg);} }

.doc-euro-wrap{ text-align:center; margin: 4px 0 10px; }
.doc-euro{
  width:126px; height:126px; border-radius:50%;
  border: 1px solid var(--gold); display:flex; align-items:center; justify-content:center;
  font-family: var(--font-serif); font-size:58px; color: var(--gold-light);
  background: radial-gradient(circle, rgba(185,141,78,0.14), transparent 70%);
  margin: 0 auto; position:relative;
}
.doc-euro::after{
  content:''; position:absolute; inset:-12px; border:1px solid rgba(185,141,78,.3); border-radius:50%;
  animation: euroPulse 2.8s ease-in-out infinite;
}
@keyframes euroPulse{ 0%,100%{ transform:scale(1); opacity:.5; } 50%{ transform:scale(1.1); opacity:0; } }
.doc-euro-label{ margin-top:16px; font-size:11px; letter-spacing:.22em; text-transform:uppercase; color: var(--ivory-dim); }

.doc-outcomes{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; margin-top:6px; max-width:760px; }

@media (max-width:700px){
  .doc-card{ width: 130px; padding: 22px 12px 18px; }
}

/* ==========================================================================
   METODO — Stage pinnato (scrollytelling)
   ========================================================================== */
.method-stage{ padding: 0; }
.method-stage-inner{
  display:grid; grid-template-columns: 90px 1fr; gap: 70px; align-items:center;
  min-height: 76vh; padding: 90px 0;
}

.method-dots{ position:relative; display:flex; flex-direction:column; align-items:center; gap:26px; }
.method-dots-line{ position:absolute; top:20px; bottom:20px; left:50%; width:1px; background: var(--line-strong); transform:translateX(-50%); z-index:0; }
.method-dots-fill{ position:absolute; top:0; left:0; width:100%; height:0; background: linear-gradient(var(--gold), var(--gold-dim)); }
.method-dot{
  position:relative; z-index:1;
  width:42px; height:42px; border-radius:50%; border:1px solid var(--line-strong);
  background: var(--navy-900);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-serif); font-size:13px; color: var(--ivory-dim);
  transition: all .5s var(--ease-lux);
}
.method-dot.is-active{
  border-color: var(--gold); color: var(--gold-light); transform: scale(1.18);
  box-shadow: 0 0 0 6px rgba(185,141,78,.1);
}

.method-panel{ position:relative; min-height: 260px; }
.method-slide{
  position:absolute; inset:0; opacity:0; visibility:hidden;
  transform: translateY(26px);
  transition: opacity .5s var(--ease-lux), transform .5s var(--ease-lux), visibility 0s linear .5s;
}
.method-slide.is-active{
  opacity:1; visibility:visible; transform:translateY(0);
  transition: opacity .5s var(--ease-lux), transform .5s var(--ease-lux), visibility 0s linear 0s;
}
.method-count{ display:block; font-size:12px; letter-spacing:.2em; text-transform:uppercase; color: var(--gold-light); margin-bottom:18px; }
.method-slide h3{ font-size: clamp(30px,4vw,46px); margin-bottom:20px; color: var(--ivory); }
.method-slide p{ font-size: clamp(15px,1.5vw,18px); color: var(--ivory-dim); font-weight:300; max-width:560px; }

@media (max-width: 860px){
  .method-stage-inner{ grid-template-columns: 1fr; min-height:auto; padding: 60px 0; gap: 40px; }
  .method-dots{ display:none; }
  .method-panel{ min-height:auto; }
  .method-slide{ position:static; opacity:1 !important; visibility:visible !important; transform:none !important; margin-bottom:56px; padding-bottom:40px; border-bottom:1px solid var(--line); }
  .method-slide:last-child{ border-bottom:none; margin-bottom:0; }
}

/* ==========================================================================
   SCROLL PROGRESS BAR
   ========================================================================== */
.scroll-progress{
  position: fixed; top:0; left:0; width:100%; height:3px;
  z-index: 1100; background: transparent; pointer-events:none;
}
.scroll-progress-bar{
  height:100%; width:100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-light));
  transform: scaleX(0); transform-origin: 0 50%;
  box-shadow: 0 0 12px rgba(185,141,78,.5);
}

/* ==========================================================================
   CURSORE CUSTOM (solo desktop / mouse fine)
   ========================================================================== */
html.has-cursor, html.has-cursor body, html.has-cursor a, html.has-cursor button{ cursor:none; }
.cursor-dot, .cursor-ring{
  position: fixed; top:0; left:0; z-index: 9999;
  pointer-events:none; border-radius:50%;
  transform: translate(-50%,-50%);
  will-change: transform;
}
.cursor-dot{ width:5px; height:5px; background: var(--gold-light); opacity:0; }
.cursor-ring{
  width:34px; height:34px; border: 1px solid var(--gold);
  opacity:0; transition: width .35s var(--ease-lux), height .35s var(--ease-lux), border-color .35s ease, background .35s ease;
}
.cursor-ring.is-active, .cursor-dot.is-active{ opacity:1; }
.cursor-ring.is-hover{ width:56px; height:56px; background: rgba(185,141,78,0.08); border-color: var(--gold-light); }

/* ---------- Service / Detail pages (shared) ---------- */
.service-block{ padding: 80px 0; border-bottom: 1px solid var(--line); }
.service-block:nth-child(even){ background: var(--navy-950); }
.service-top{ display:flex; justify-content:space-between; align-items:flex-end; gap:40px; margin-bottom:40px; flex-wrap:wrap; }
.service-top .lead{ margin-top:14px; }
.tag-grid{ display:flex; flex-wrap:wrap; gap:12px; }

.related-strip{ display:flex; gap: 14px; flex-wrap:wrap; margin-top: 30px; }
.related-strip a{ font-size:12.5px; letter-spacing:.08em; text-transform:uppercase; color: var(--ivory-dim); border:1px solid var(--line-strong); padding: 10px 18px; transition: all .3s; }
.related-strip a:hover{ color: var(--gold-light); border-color: var(--gold); }

.mini-steps{ display:grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border:1px solid var(--line); margin-top: 20px; }
.mini-steps > div{ background: var(--navy-900); padding: 26px 22px; }
.mini-steps .n{ font-family: var(--font-serif); color: var(--gold-light); font-size:13px; }
.mini-steps h5{ font-size:15px; color: var(--ivory); margin: 10px 0 6px; font-weight:500; }
.mini-steps p{ font-size:13px; color: var(--ivory-dim); font-weight:300; margin:0; }
@media (max-width: 860px){ .mini-steps{ grid-template-columns: repeat(2,1fr); } }

.audience-list{ display:grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 24px; }
.audience-list div{ border-left: 2px solid var(--gold); padding: 6px 0 6px 18px; font-size:14px; color: var(--ivory-dim); }
@media (max-width: 760px){ .audience-list{ grid-template-columns: 1fr; } }

.related-case{ border:1px solid var(--line); padding: 34px 38px; display:flex; justify-content:space-between; align-items:center; gap: 24px; flex-wrap:wrap; margin-top: 30px; background: var(--navy-950); }
.related-case .tag{ font-size:11px; letter-spacing:.2em; text-transform:uppercase; color: var(--gold-light); display:block; margin-bottom:10px; }
.related-case h4{ font-size: 20px; color: var(--ivory); font-family: var(--font-serif); font-weight:400; }
