/* ============================================================
   ROSS DEVELOPER — style.css
   Unica fonte di verità. Mobile-first. Zero duplicati.
   ============================================================ */

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: 'Inter', sans-serif; background: #FDFDFD; color: #080808; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }

/* ── VARIABILI ── */
:root {
  --n: #080808;
  --b: #FDFDFD;
  --n2: #0f0f0f;
  --gray: #666;
  --gray-light: #999;
  --border-n: rgba(253,253,253,.1);
  --border-b: rgba(8,8,8,.08);
  /* Safe area per notch / schermi curvi */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}

/* ── UTILITY / LAYOUT PRIMITIVES ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.container-xl { max-width: 1300px; margin: 0 auto; padding: 0 2rem; }
.section-fade { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.section-fade.active, .section-fade.vis { opacity: 1; transform: translateY(0); }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--b); border-bottom: 1px solid var(--border-b);
  transition: box-shadow .3s, background .3s;
  padding-top: max(0px, var(--sat));
}
nav.scrolled { box-shadow: 0 2px 20px rgba(8,8,8,.06); background: rgba(253,253,253,.97); backdrop-filter: blur(12px); }
nav.menu-open { z-index: 10000; }
.nav-container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.logo-img { width: 32px; height: 32px; object-fit: cover; border-radius: 50%; overflow: hidden; }
.nav-logo-text { display: flex; flex-direction: column; gap: 2px; }
.nav-text { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--n); line-height: 1; }
.nav-tagline { font-size: .58rem; font-weight: 400; letter-spacing: .06em; color: rgba(8,8,8,.42); line-height: 1; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 2.5rem; }
.nav-links > a { font-size: .75rem; font-weight: 500; color: var(--n); opacity: .6; transition: opacity .2s; }
.nav-links > a:hover { opacity: 1; }
.nav-links > a:not(.nav-wa-btn) { display: none; }
.nav-cta-link { padding: .5rem 1.1rem; border-radius: 100px; background: var(--n); color: var(--b) !important; opacity: 1 !important; font-weight: 600; transition: transform .2s, opacity .2s; }
.nav-cta-link:hover { transform: translateY(-1px); opacity: .88 !important; }
.nav-wa-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--b); color: var(--n);
  border: 1px solid var(--border-b);
  box-shadow: 0 2px 8px rgba(8,8,8,.07);
  transition: transform .2s;
}
.nav-wa-btn:hover { transform: scale(1.08); }
.nav-mobile-wrapper { display: flex; align-items: center; gap: 1rem; }

#nav-menu.active {
  position: fixed; inset: 0; height: 100dvh;
  background: var(--n);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  z-index: 1000;
  animation: menuOverlayIn .38s cubic-bezier(.16,1,.3,1) both;
}
@keyframes menuOverlayIn { from { opacity: 0; } to { opacity: 1; } }
#nav-menu.active > a {
  display: block;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 200; letter-spacing: .06em; line-height: 1.2;
  color: rgba(253,253,253,.82);
  padding: .5rem 0; position: relative;
  opacity: 0;
  animation: menuLinkIn .5s cubic-bezier(.16,1,.3,1) forwards;
}
#nav-menu.active > a:nth-child(1) { animation-delay: .07s; }
#nav-menu.active > a:nth-child(2) { animation-delay: .13s; }
#nav-menu.active > a:nth-child(3) { animation-delay: .19s; }
#nav-menu.active > a:nth-child(4) { animation-delay: .25s; }
#nav-menu.active > a:nth-child(5) { animation-delay: .31s; }
#nav-menu.active > a:nth-child(6) { animation-delay: .37s; }
@keyframes menuLinkIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
#nav-menu.active > a::after {
  content: '';
  position: absolute; bottom: 2px; left: 0;
  width: 0; height: 1px;
  background: rgba(253,253,253,.3);
  transition: width .35s ease;
}
#nav-menu.active > a:hover { color: #fdfdfd; }
#nav-menu.active > a:hover::after { width: 100%; }
#nav-menu.active > a.nav-cta-link {
  background: var(--b); color: var(--n) !important;
  padding: .6rem 1.6rem; margin-top: .8rem;
  font-size: 1rem; font-weight: 600; letter-spacing: .02em;
}
#nav-menu.active > a.nav-cta-link::after { display: none; }
#menu-toggle.active .line-1 { transform: translateY(4px) rotate(45deg); width: 28px; }
#menu-toggle.active .line-2 { transform: translateY(-4.5px) rotate(-45deg); width: 28px; }
#menu-toggle.active {
  color: #fdfdfd;
}
#nav-menu.active .nav-mobile-wrapper { position: absolute; top: 1.5rem; right: 1.5rem; }
#nav-menu.active .nav-wa-btn { background: transparent; color: #fdfdfd; border-color: rgba(253,253,253,.25); box-shadow: none; }

/* Footer contatti nell'overlay */
.menu-footer { display: none; }
#nav-menu.active .menu-footer {
  display: flex;
  position: absolute;
  bottom: max(2.5rem, var(--sab));
  left: 0; right: 0;
  justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 1.2rem;
  animation: menuLinkIn .5s .42s cubic-bezier(.16,1,.3,1) both;
}
.menu-footer a {
  font-size: .68rem; letter-spacing: .15em; font-weight: 400;
  color: rgba(253,253,253,.32); text-transform: uppercase;
  transition: color .2s;
}
.menu-footer a:hover { color: rgba(253,253,253,.7); }
.menu-footer .m-sep { color: rgba(253,253,253,.2); }

/* Hamburger */
#menu-toggle {
  position: relative;
  z-index: 1002;
  display: flex;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--n);
  cursor: pointer;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  transition: color .25s ease, transform .25s ease;
}
#menu-toggle:hover {
  color: #B9480B;
  transform: translateX(-2px);
}
#menu-toggle.active:hover {
  color: #fdfdfd;
}
.m-line {
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: all .4s cubic-bezier(.16,1,.3,1);
}
.line-1 { width: 28px; }
.line-2 { width: 18px; }

/* ── KEYFRAMES (globali) ── */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes pulse-badge { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.15); opacity: .8; } }
@keyframes bubbleIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── HERO ── */
.hero { background: var(--b); padding-bottom: 0; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; min-height: auto; align-items: stretch; gap: 0; position: relative; z-index: 1; }
.hero-content {
  display: flex; flex-direction: column; justify-content: center;
  padding: 5rem 1.5rem 2.5rem; order: 1; height: auto; opacity: 1; transform: none;
}
.hero-image { order: 2; height: 92vw; max-height: 460px; min-height: unset; overflow: hidden; position: relative; opacity: 1; transform: none; margin: 0 1.25rem 2.25rem; }
.hero-image-frame { width: 100%; height: 100%; border-radius: 18px; overflow: hidden; }
.hero-image-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }

/* Hero identity row
.hero-identity { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.5rem; flex-wrap: wrap; font-size: .65rem; }
.tag-dot { width: 7px; height: 7px; background: #22c55e; border-radius: 50%; flex-shrink: 0; animation: pulse 2s infinite; }
.hero-identity-text { font-size: .72rem; font-weight: 500; color: rgba(8,8,8,.45); letter-spacing: .06em; }
.hero-avail-pill { background: #22c55e; color: white; font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: .2rem .65rem; border-radius: 100px; } */

/* Hero H1 */
.hero-h1 { margin: 0 0 1.2rem; padding: 0; line-height: 1; }
.h1-light { display: block; font-size: clamp(2.8rem, 8.5vw, 6rem); font-weight: 200; color: rgba(8,8,8,.35); letter-spacing: -.045em; line-height: 1; margin-bottom: .08em; }
.h1-bold { display: block; font-size: clamp(3rem, 10.5vw, 7rem); font-weight: 800; color: var(--n); letter-spacing: -.05em; line-height: .92; }

.hero-subtitle { font-size: 1rem; color: rgba(8,8,8,.55); line-height: 1.65; max-width: 420px; margin-bottom: 2.2rem; }

.hero-cta { display: flex; flex-direction: column; align-items: stretch; gap: .75rem; margin-bottom: 2rem; }
.btn-hero-main {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; text-align: center;
  padding: .9rem 2rem; background: var(--n); color: var(--b);
  font-family: 'Inter', sans-serif; font-size: .82rem; font-weight: 600;
  border-radius: 6px; border: none; cursor: pointer; text-decoration: none;
  transition: opacity .2s, transform .2s;
}
.btn-hero-main:hover { opacity: .85; transform: translateY(-2px); }
.btn-hero-ghost { font-size: .82rem; font-weight: 500; color: rgba(8,8,8,.45); text-decoration: none; border-bottom: 1px solid rgba(8,8,8,.2); padding-bottom: 1px; transition: color .2s, border-color .2s; }
.btn-hero-ghost:hover { color: var(--n); border-bottom-color: rgba(8,8,8,.5); }


/* Decorative ambient gradient (desktop) */
.hero::after { content: ''; position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: radial-gradient(ellipse 70% 80% at 25% 45%, rgba(8,8,8,.025) 0%, transparent 70%); pointer-events: none; z-index: 0; }

/* Three.js canvas (desktop only — hidden on touch, see touch media block) */
#heroCanvas { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; display: block; opacity: 0; transition: opacity 1.2s ease; }
#heroCanvas.loaded { opacity: 1; }

.scroll-indicator { width: 1px; height: 60px; background: rgba(8,8,8,.15); margin: 0 auto; }

/* ── PROBLEMA ── */
.problema { background: var(--n); padding: 5rem 0; position: relative; overflow: hidden; }
.problema .section-header h2 { color: var(--b); }
.problema .section-sub { color: rgba(253,253,253,.55); }

.prob-stats { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2rem; margin-bottom: 4rem; }
.prob-stat-item { flex: 1; padding: 0; max-width: 300px; }
.prob-stat-num { display: block; font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 200; color: var(--b); letter-spacing: -.04em; line-height: 1; margin-bottom: .4rem; }
.prob-stat-lbl { font-size: .75rem; color: rgba(253,253,253,.45); line-height: 1.6; }

.prob-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: rgba(253,253,253,.05); border: 1px solid rgba(253,253,253,.05); border-radius: 4px; overflow: hidden; margin-bottom: 3rem; }
.prob-card { background: var(--n2); padding: 2rem; transition: background .25s; }
.prob-card:hover { background: #141414; }
.prob-card-num { font-size: .6rem; font-weight: 700; color: rgba(253,253,253,.18); letter-spacing: .15em; margin-bottom: 1.2rem; }
.prob-card h3 { font-size: .95rem; font-weight: 500; color: var(--b); margin-bottom: .6rem; letter-spacing: -.01em; }
.prob-card p { font-size: .82rem; color: rgba(253,253,253,.55); line-height: 1.75; }

.prob-cta { display: flex; align-items: center; gap: 2rem; border-top: 1px solid rgba(253,253,253,.08); padding-top: 2.5rem; flex-wrap: wrap; }
.prob-cta-text { font-size: .88rem; color: rgba(253,253,253,.4); flex: 1; min-width: 200px; }
.btn-prob-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.8rem; background: var(--b); color: var(--n);
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; border-radius: 4px; transition: opacity .2s; flex-shrink: 0;
}
.btn-prob-cta:hover { opacity: .85; }

/* Ambient decoration (shared pattern with other dark sections) */
.problema::before, .chatbot-section::before, .work::before, .reviews::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 15% 60%, rgba(255,255,255,.025) 0%, transparent 45%), radial-gradient(circle at 85% 25%, rgba(255,255,255,.018) 0%, transparent 40%);
  pointer-events: none; z-index: 0;
}
.problema .container, .chatbot-section .container, .chatbot-section .chatbot-layout, .work .container-xl, .reviews .container { position: relative; z-index: 1; }
.chatbot-section, .work, .reviews { position: relative; overflow: hidden; }

/* ── SERVIZI ── */
.services { background: var(--b); padding: 5rem 0; }
.section-header { margin-bottom: 3.5rem; }
.section-header h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 200; letter-spacing: -.04em; color: var(--n); margin-bottom: 1rem; line-height: 1.15; }
.section-sub-light, .section-sub { font-size: .9rem; color: #555; line-height: 1.75; }

.services-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.service-card { background: #f5f5f5; border: 1px solid rgba(8,8,8,.06); border-radius: 14px; padding: 2rem; position: relative; will-change: transform; transition: background .25s, transform .12s ease, box-shadow .25s; }
.service-card:not(.featured):hover { background: #ececec; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(8,8,8,.06); }
.service-card.featured { background: var(--n); }
.service-badge { position: absolute; top: 1rem; right: 1rem; background: var(--b); color: var(--n); font-size: .6rem; font-weight: 700; padding: .2rem .6rem; border-radius: 100px; text-transform: uppercase; letter-spacing: .06em; }
.service-icon { margin-bottom: 1.2rem; }
.service-icon svg { stroke: var(--n); }
.service-card.featured .service-icon svg { stroke: var(--b); }
.service-card h3 { font-size: .95rem; font-weight: 600; color: var(--n); margin-bottom: .5rem; }
.service-card.featured h3 { color: var(--b); }
.service-card p { font-size: .82rem; color: #444; line-height: 1.7; margin-bottom: 1rem; }
.service-card.featured p { color: rgba(253,253,253,.65); }
.service-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.2rem; }
.service-list li { font-size: .78rem; color: #666; padding-left: 1rem; position: relative; }
.service-card.featured .service-list li { color: rgba(253,253,253,.5); }
.service-list li::before { content: '→'; position: absolute; left: 0; opacity: .6; }
.service-cta { font-size: .78rem; color: rgba(8,8,8,.4); font-weight: 500; transition: color .2s; }
.service-card.featured .service-cta { color: rgba(253,253,253,.55); }
.service-cta:hover { color: var(--n); }

/* ── CHATBOT SECTION ── */
.chatbot-section { background: var(--n); padding: 5rem 0; }
.chatbot-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.chatbot-label { color: rgba(253,253,253,.3); }
.chatbot-title { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 200; letter-spacing: -.04em; color: var(--b); line-height: 1.15; margin-bottom: 1rem; }
.chatbot-sub { font-size: .9rem; color: rgba(253,253,253,.55); line-height: 1.75; margin-bottom: 2rem; }
.chatbot-features { display: flex; flex-direction: column; gap: 1.4rem; margin-bottom: 2rem; }
.chatbot-feat { display: flex; gap: 1rem; align-items: flex-start; }
.chatbot-feat-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(253,253,253,.07); border: 1px solid rgba(253,253,253,.1); display: flex; align-items: center; justify-content: center; color: rgba(253,253,253,.7); flex-shrink: 0; }
.chatbot-feat-title { font-size: .88rem; font-weight: 600; color: var(--b); margin-bottom: .15rem; }
.chatbot-feat-desc { font-size: .78rem; color: rgba(253,253,253,.5); line-height: 1.65; }
.chatbot-section .btn-cta-primary { background: var(--b); color: var(--n); }

/* Mockup */
.chatbot-mockup { display: none; justify-content: center; }
.mock-browser { width: 100%; max-width: 340px; background: #111; border-radius: 14px; border: 1px solid rgba(253,253,253,.1); overflow: hidden; box-shadow: 0 32px 80px rgba(0,0,0,.6); }
.mock-bar { display: flex; align-items: center; gap: .4rem; padding: .75rem 1rem; background: #1a1a1a; border-bottom: 1px solid rgba(253,253,253,.07); }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-red { background: #ff5f57; } .mock-yellow { background: #ffbd2e; } .mock-green { background: #28c840; }
.mock-url { flex: 1; background: rgba(253,253,253,.07); border-radius: 6px; padding: .25rem .7rem; font-size: .68rem; color: rgba(253,253,253,.4); margin-left: .4rem; }
.mock-body { padding: 1.2rem; position: relative; min-height: 260px; background: #111; }
.mock-hero-block { background: rgba(253,253,253,.04); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.mock-line { height: 7px; border-radius: 4px; background: rgba(253,253,253,.1); margin-bottom: 7px; }
.mock-line:last-child { margin-bottom: 0; }
.mock-line-title { width: 70%; background: rgba(253,253,253,.2); height: 12px; margin-bottom: 10px; }
.mock-line-sm { width: 90%; } .mock-line-xs { height: 5px; background: rgba(253,253,253,.08); }
.mock-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.mock-action-btn { border-radius: 8px; padding: .9rem; display: flex; align-items: center; justify-content: center; }
.mock-btn-phone { background: rgba(253,253,253,.06); border: 1px solid rgba(253,253,253,.08); color: rgba(253,253,253,.5); }
.mock-btn-cal { background: rgba(8,8,8,.4); border: 1px solid rgba(34,197,94,.2); color: rgba(34,197,94,.7); }
.mock-chat-bubble { display: inline-flex; align-items: center; gap: .5rem; background: var(--n); color: var(--b); border-radius: 14px 14px 14px 4px; padding: .65rem 1rem; font-size: .8rem; font-weight: 500; border: 1px solid rgba(253,253,253,.15); animation: bubbleIn .6s ease both .8s; }
.mock-chat-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: pulse 2s infinite; }
.mock-fab { position: absolute; bottom: 1rem; right: 1rem; width: 40px; height: 40px; border-radius: 50%; background: rgba(253,253,253,.1); border: 1px solid rgba(253,253,253,.12); display: flex; align-items: center; justify-content: center; }

/* ── METODO ── */
.method { background: var(--b); padding: 5rem 0 6rem; }
.method .section-header { text-align: center; margin: 0 auto 4rem; }
.method h2 { color: var(--n); text-align: center; }
.method-sub { font-size: .88rem; color: #555; margin-top: .4rem; text-align: center; }
.method .section-sub { font-size: .9rem; color: #555; text-align: center; }
.method-wrapper { position: relative; }
.method-line { display: none; }
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid rgba(8,8,8,.08);
  border-radius: 12px;
  overflow: hidden;
}
.method-step { text-align: center; padding: 2.5rem 1.5rem; border-right: 1px solid rgba(8,8,8,.07); border-bottom: 1px solid rgba(8,8,8,.07); background: #fdfdfd; transition: background .25s; }
.method-step:nth-child(2n) { border-right: none; }
.method-step:last-child { border-bottom: none; }
.method-step:hover { background: #f5f5f5; }
.method-number { width: 48px; height: 48px; border-radius: 50%; background: #efefef; border: none; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.4rem; }
.method-number span { font-size: .8rem; font-weight: 700; color: var(--n); letter-spacing: .05em; }
.method-step h3 { font-size: .88rem; font-weight: 600; color: var(--n); margin-bottom: .4rem; }
.method-step p { font-size: .78rem; color: #555; line-height: 1.7; }

/* ── PORTFOLIO ── */
.work { background: var(--n); padding: 5rem 0; }
.work-header { margin-bottom: 3rem; }
.work-header h2 { color: var(--b); font-size: clamp(2rem,4vw,3rem); font-weight: 200; letter-spacing: -.04em; margin-bottom: 1rem; line-height: 1.15; }
.work-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.work-item { display: block; color: inherit; will-change: transform; transition: transform .3s ease; }
.work-item:hover { transform: translateY(-5px); }
.zoom-frame { position: relative; overflow: hidden; border-radius: 8px; aspect-ratio: 16/10; background: #111; }
.zoom-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.work-item:hover .zoom-frame img { transform: scale(1.04); }
.work-overlay { position: absolute; inset: 0; background: rgba(8,8,8,.75); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; }
.work-overlay span { color: var(--b); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.work-item:hover .work-overlay { opacity: 1; }
.work-info { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; margin-bottom: .3rem; }
.work-info h3 { font-size: .9rem; font-weight: 600; color: var(--b); }
.work-info span { font-size: .7rem; color: rgba(253,253,253,.35); text-transform: uppercase; letter-spacing: .08em; }
.work-desc { font-size: .8rem; color: rgba(253,253,253,.55); line-height: 1.65; }
.work-cta-card { display: flex; }
.work-cta-inner { flex: 1; border: 2px dashed rgba(253,253,253,.12); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; gap: .75rem; transition: border-color .3s, background .3s; }
.work-cta-card:hover .work-cta-inner { border-color: rgba(253,253,253,.3); background: rgba(253,253,253,.03); }
.work-cta-icon { color: rgba(253,253,253,.4); opacity: .3; transition: opacity .3s; }
.work-cta-card:hover .work-cta-icon { opacity: .6; }
.work-cta-inner h3 { font-size: 1rem; font-weight: 500; color: var(--b); }
.work-cta-inner p { font-size: .78rem; color: rgba(253,253,253,.4); line-height: 1.6; }
.work-cta-inner .btn-cta-primary { background: var(--b); color: var(--n); font-size: .7rem; }

/* ── CHI SONO ── */
.about { background: var(--b); padding: 5rem 0; }
.about-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
.about-image { display: none; }
.about-image-frame { border-radius: 12px; overflow: hidden; aspect-ratio: 4/5; }
.about-image-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.about-content { padding: 0; }
.about-header h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 200; letter-spacing: -.04em; color: var(--n); margin-bottom: 1.5rem; }
.about-intro { font-size: 1.05rem; font-weight: 600; color: var(--n); margin-bottom: 1rem; line-height: 1.6; }
.about-text p { font-size: .9rem; color: #444; line-height: 1.8; margin-bottom: 1rem; }
.about-quote { font-style: italic; color: rgba(8,8,8,.4); border-left: 2px solid rgba(8,8,8,.12); padding-left: 1rem; margin: 1.5rem 0; }
.about .btn-cta-primary { margin-top: 1.5rem; }

/* ── RECENSIONI ── */
.reviews { background: var(--n); padding: 5rem 0; }
.reviews .section-header { text-align: center; margin: 0 auto 3.5rem; }
.reviews h2 { color: var(--b); font-size: clamp(2rem,4vw,3rem); font-weight: 200; letter-spacing: -.04em; }
.reviews-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 960px; margin: 0 auto; }
.review-card { background: var(--n2); border: 1px solid rgba(253,253,253,.07); border-radius: 16px; padding: 1.8rem; will-change: transform; transition: border-color .25s, background .25s, transform .25s ease; }
.review-card:hover { background: #141414; border-color: rgba(253,253,253,.15); transform: translateY(-4px); }
.review-quote { font-size: 2.8rem; font-family: Georgia, serif; color: rgba(253,253,253,.12); line-height: 1; margin-bottom: -.3rem; transition: color .25s; }
.review-card:hover .review-quote { color: rgba(253,253,253,.25); }
.review-stars { display: flex; gap: 3px; color: #f59e0b; margin-bottom: .8rem; }
.review-stars svg { width: 15px; height: 15px; }
.review-text { font-size: .88rem; color: rgba(253,253,253,.82); line-height: 1.75; margin-bottom: 1.2rem; font-style: italic; }
.review-author { display: flex; align-items: center; gap: .75rem; }
.review-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(253,253,253,.12); border: 1px solid rgba(253,253,253,.15); display: flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 700; color: rgba(253,253,253,.7); flex-shrink: 0; letter-spacing: .05em; }
.review-name { font-weight: 600; font-size: .85rem; color: var(--b); display: block; }
.review-role { font-size: .75rem; color: rgba(253,253,253,.45); display: block; margin-top: .15rem; }

/* ── LEAD MAGNET ── */
.leadmag { background: var(--b); padding: 5rem 0; }
.leadmag-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
.leadmag-title { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 200; letter-spacing: -.04em; color: var(--n); margin-bottom: 1rem; line-height: 1.15; }
.leadmag-sub { font-size: .9rem; color: #555; line-height: 1.7; margin-bottom: 1.5rem; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.check-list li { display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: #444; }
.leadmag-form { background: var(--n); border: 1px solid rgba(253,253,253,.08); border-radius: 14px; padding: 2rem; }
.leadmag-form h3 { font-size: 1.1rem; font-weight: 600; color: var(--b); margin-bottom: .3rem; }
.leadmag-form > p { font-size: .8rem; color: rgba(253,253,253,.45); margin-bottom: 1.2rem; }
.lm-input { width: 100%; background: rgba(253,253,253,.07); border: 1px solid rgba(253,253,253,.1); border-radius: 10px; padding: .72rem 1rem; color: var(--b); font-size: .87rem; font-family: 'Inter', sans-serif; outline: none; margin-bottom: .8rem; transition: border-color .2s; }
.lm-input::placeholder { color: rgba(253,253,253,.35); }
.lm-input:focus { border-color: rgba(253,253,253,.3); }
.lm-submit { width: 100%; background: var(--b); color: var(--n); border: none; border-radius: 10px; padding: .85rem; font-size: .85rem; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .5rem; transition: opacity .2s; }
.lm-submit:hover { opacity: .88; }
.lm-privacy { font-size: .7rem; color: rgba(253,253,253,.3); display: flex; align-items: center; gap: .4rem; margin-top: .7rem; justify-content: center; }


/* ── GENERIC CTA (used outside hero: chatbot, work, about, cta-finale) ── */
.btn-cta-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.8rem; background: var(--n); color: var(--b);
  font-family: 'Inter', sans-serif; font-size: .82rem; font-weight: 600;
  border-radius: 6px; border: none; cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.btn-cta-primary:hover { opacity: .85; transform: translateY(-2px); }
.btn-cta-ghost { font-size: .82rem; font-weight: 500; color: rgba(8,8,8,.5); border-bottom: 1px solid rgba(8,8,8,.2); padding-bottom: 2px; transition: color .2s; }
.btn-cta-ghost:hover { color: var(--n); }

/* ── FAQ ── */
.faq-section { background: var(--b); padding: 5rem 1.5rem; }
.faq-section h2 { color: var(--n); margin-bottom: 3rem; }
.faq-grid { max-width: 720px; margin: 0 auto; padding: 0; display: flex; flex-direction: column; gap: 0; }
.faq-item { border-bottom: 1px solid rgba(8,8,8,.08); }
.faq-item:first-child { border-top: 1px solid rgba(8,8,8,.08); }
.faq-q {
  width: 100%; background: none; border: none; padding: 1.3rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  cursor: pointer; font-family: 'Inter', sans-serif; font-size: .92rem; font-weight: 500;
  color: var(--n); text-align: left; transition: color .2s;
}
.faq-q:hover { color: rgba(8,8,8,.6); }
.faq-icon { flex-shrink: 0; transition: transform .3s; color: rgba(8,8,8,.35); }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease; }
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 1.3rem; }
.faq-a p { font-size: .85rem; color: #444; line-height: 1.75; }

/* ── CONTATTI ── */
.contact { background: var(--b); padding: 5rem 0; }
.contact-content { max-width: 680px; margin: 0 auto; padding: 0 1.5rem; }
.contact h2 { color: var(--n); font-size: clamp(2rem, 4vw, 3rem); font-weight: 200; letter-spacing: -.04em; margin-bottom: .5rem; }
.contact-sub { font-size: .9rem; color: #555; margin-bottom: 3rem; }
.contact-form-wrapper { margin-bottom: 2.5rem; }

/* Step indicator */
.form-step-indicator { display: flex; align-items: center; margin-bottom: 2rem; }
.step-dot { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid rgba(8,8,8,.2); color: rgba(8,8,8,.35); font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .3s; font-family: 'Inter', sans-serif; }
.step-dot.active { background: var(--n); border-color: var(--n); color: var(--b); }
.step-dot.done { background: rgba(8,8,8,.1); border-color: rgba(8,8,8,.2); color: rgba(8,8,8,.4); }
.step-line { flex: 1; height: 1px; background: rgba(8,8,8,.1); transition: background .3s; }
.step-line.done { background: rgba(8,8,8,.3); }

/* Form steps */
.form-step { display: none; }
.form-step.active { display: block; }
.form-step-label { font-size: .78rem; font-weight: 500; color: #444; margin-bottom: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group input, .form-group textarea { width: 100%; background: #f5f5f5; border: 1px solid rgba(8,8,8,.1); border-radius: 8px; padding: .75rem 1rem; font-size: .87rem; font-family: 'Inter', sans-serif; color: var(--n); outline: none; transition: border-color .2s; }
.form-group input:focus, .form-group textarea:focus { border-color: rgba(8,8,8,.3); }
.service-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.chip { padding: .55rem 1.1rem; background: rgba(8,8,8,.05); border: 1px solid rgba(8,8,8,.12); border-radius: 100px; color: #555; font-family: 'Inter', sans-serif; font-size: .8rem; cursor: pointer; transition: all .2s; }
.chip:hover { background: rgba(8,8,8,.08); }
.chip.selected { background: var(--n); border-color: var(--n); color: var(--b); font-weight: 600; }
.form-next { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem; padding: .7rem 1.8rem; background: rgba(8,8,8,.07); border: 1px solid rgba(8,8,8,.12); border-radius: 4px; color: var(--n); font-family: 'Inter', sans-serif; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; transition: all .25s; }
.form-next:hover { background: rgba(8,8,8,.12); }
.form-submit { background: var(--n); color: var(--b); border: none; border-radius: 8px; padding: .9rem 2rem; font-size: .85rem; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; transition: opacity .2s; margin-top: 1rem; }
.form-submit:hover { opacity: .85; }
.form-success { text-align: center; padding: 2rem 0; }
.success-icon { display: flex; justify-content: center; margin-bottom: 1rem; }
.form-success h3 { font-size: 1.4rem; font-weight: 300; color: var(--n); margin-bottom: .5rem; }
.form-success p { font-size: .85rem; color: #555; line-height: 1.7; }
.form-progress { height: 2px; background: rgba(8,8,8,.1); border-radius: 100px; margin-top: 2rem; overflow: hidden; }
.progress-bar { height: 100%; background: var(--n); border-radius: 100px; transition: width .4s ease; }

.contact-divider { display: flex; align-items: center; gap: 1rem; margin: 2rem 0; color: rgba(8,8,8,.3); font-size: .75rem; }
.contact-divider::before, .contact-divider::after { content: ''; flex: 1; height: 1px; background: rgba(8,8,8,.1); }
.contact-email-wrap { text-align: center; margin-bottom: 2rem; }
.contact-email { font-size: clamp(1rem, 2vw, 1.5rem); font-weight: 200; color: var(--n); letter-spacing: -.02em; opacity: .6; transition: opacity .2s; }
.contact-email:hover { opacity: 1; }
.social-icons { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(8,8,8,.05); border: 1px solid rgba(8,8,8,.1); color: rgba(8,8,8,.5); transition: all .25s; }
.social-icon:hover { background: rgba(8,8,8,.1); color: var(--n); transform: translateY(-3px); }

/* ── FOOTER ── */
footer { background: var(--n); border-top: 1px solid rgba(253,253,253,.06); padding: 2rem; text-align: center; }
.footer-tools { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.footer-tools a { font-size: .72rem; color: rgba(253,253,253,.45); text-decoration: none; transition: color .2s; }
.footer-tools a:hover { color: rgba(253,253,253,.85); }
.footer-tools span { color: rgba(253,253,253,.2); font-size: .72rem; }
footer p { font-size: .75rem; color: rgba(253,253,253,.3); }

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed; bottom: 1.5rem; left: 1.5rem;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--b); border: 1px solid rgba(8,8,8,.12); color: var(--n);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(8,8,8,.1);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: all .3s; z-index: 200;
}
.back-to-top.show { opacity: 1; pointer-events: all; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(8,8,8,.15); }

/* ── CHATBOT FAB ── */
.chat-fab-wrap { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300; }
.chat-fab-badge { position: absolute; top: -2px; right: -2px; width: 13px; height: 13px; border-radius: 50%; background: #22c55e; border: 2px solid var(--b); animation: pulse-badge 2s infinite; z-index: 1; }
.chat-fab { position: relative; width: 58px; height: 58px; border-radius: 50%; background: var(--n); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--b); box-shadow: 0 8px 28px rgba(8,8,8,.35); transition: transform .25s, box-shadow .25s; }
.chat-fab:hover { transform: scale(1.08); box-shadow: 0 12px 40px rgba(8,8,8,.45); }

/* ── CHAT WINDOW ── */
.chat-window {
  position: fixed; bottom: 5.5rem; right: 1.25rem;
  width: calc(100vw - 2.5rem); max-width: 380px;
  background: var(--b); border: 1px solid rgba(8,8,8,.1); border-radius: 20px;
  z-index: 300; overflow: hidden;
  transform: translateY(16px) scale(.97); opacity: 0; pointer-events: none;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 24px 64px rgba(8,8,8,.18);
}
.chat-window.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }
.chat-header { background: var(--n); padding: 1rem 1.2rem; display: flex; align-items: center; justify-content: space-between; }
.chat-header-left { display: flex; align-items: center; gap: .75rem; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(253,253,253,.15); display: flex; align-items: center; justify-content: center; }
.chat-header h4 { font-family: 'Inter', sans-serif; font-size: .85rem; font-weight: 600; color: var(--b); margin: 0; }
.chat-header p { font-size: .68rem; color: rgba(253,253,253,.6); margin: 0; display: flex; align-items: center; gap: .3rem; }
.chat-online-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; display: inline-block; animation: pulse-badge 2s infinite; }
.chat-close { background: none; border: none; color: rgba(253,253,253,.5); cursor: pointer; padding: .2rem; line-height: 1; transition: color .2s; }
.chat-close:hover { color: var(--b); }
.chat-msgs { height: 280px; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .65rem; scrollbar-width: thin; scrollbar-color: rgba(8,8,8,.1) transparent; background: var(--b); }
.chat-msg { max-width: 85%; padding: .65rem .95rem; border-radius: 14px; font-size: .82rem; line-height: 1.6; word-break: break-word; font-family: 'Inter', sans-serif; }
.chat-msg.bot { background: #f3f3f3; color: var(--n); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.usr { background: var(--n); color: var(--b); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.typing { opacity: .45; }
.chat-quick { padding: .4rem 1rem .7rem; display: flex; flex-wrap: wrap; gap: .35rem; background: var(--b); }
.quick-btn { background: rgba(8,8,8,.06); border: 1px solid rgba(8,8,8,.1); border-radius: 100px; padding: .3rem .75rem; font-size: .7rem; font-weight: 500; color: var(--n); cursor: pointer; transition: background .2s; font-family: 'Inter', sans-serif; }
.quick-btn:hover { background: rgba(8,8,8,.1); }
.quick-btn:last-child { background: var(--n); border-color: var(--n); color: var(--b); }
.chat-input-area { padding: .75rem; border-top: 1px solid rgba(8,8,8,.08); display: flex; gap: .5rem; align-items: center; background: var(--b); }
.chat-input { flex: 1; background: #f3f3f3; border: 1px solid rgba(8,8,8,.1); border-radius: 10px; padding: .6rem .9rem; font-size: .82rem; font-family: 'Inter', sans-serif; color: var(--n); outline: none; transition: border-color .2s; }
.chat-input:focus { border-color: rgba(8,8,8,.25); }
.chat-input::placeholder { color: rgba(8,8,8,.35); }
.chat-send { background: var(--n); border: none; border-radius: 10px; width: 36px; height: 36px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--b); transition: opacity .2s; flex-shrink: 0; }
.chat-send:hover { opacity: .8; }
.chat-send:disabled { opacity: .3; cursor: not-allowed; }
.chat-powered { text-align: center; padding: .4rem; font-size: .62rem; color: rgba(8,8,8,.2); border-top: 1px solid rgba(8,8,8,.05); background: var(--b); }
.booking-btns { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem 1rem .75rem; background: var(--b); }
.booking-btn { background: var(--n); border: none; border-radius: 100px; padding: .4rem .9rem; font-size: .74rem; font-weight: 500; color: var(--b); cursor: pointer; font-family: 'Inter', sans-serif; transition: opacity .2s; white-space: nowrap; }
.booking-btn:hover { opacity: .8; }

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--n); border-top: 1px solid rgba(253,253,253,.1);
  z-index: 9999; transform: translateY(100%); transition: transform .4s ease;
  padding: 1rem 1.5rem; padding-bottom: max(1rem, calc(.5rem + var(--sab)));
}
.cookie-banner.show { transform: translateY(0); }
.cookie-content { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cookie-text { display: flex; align-items: flex-start; gap: .75rem; flex: 1; }
.cookie-text svg { color: rgba(253,253,253,.4); flex-shrink: 0; margin-top: .15rem; }
.cookie-text p { font-size: .78rem; color: rgba(253,253,253,.55); line-height: 1.6; }
.cookie-btns { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.cookie-accept { background: var(--b); color: var(--n); border: none; border-radius: 6px; padding: .5rem 1.4rem; font-size: .74rem; font-weight: 700; font-family: 'Inter', sans-serif; text-transform: uppercase; letter-spacing: .1em; cursor: pointer; transition: opacity .2s; }
.cookie-accept:hover { opacity: .85; }
.cookie-policy { font-size: .72rem; color: rgba(253,253,253,.4); text-decoration: underline; }
.cookie-policy:hover { color: rgba(253,253,253,.7); }

/* ============================================================
   BREAKPOINTS
   Mobile-first base above targets 320–767px.
   Tablet 768–1023px, Desktop 1024px+ override below.
   ============================================================ */

/* ── TABLET (768px – 1023px) ── */
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1fr 1fr; min-height: 80vh; }
  .hero-content { padding: 5rem 2.5rem; }
  .hero-image { height: 90vh; min-height: 500px; max-height: none; margin: 0; padding: calc(64px + 1.25rem) 1.5rem 1.5rem 0; }
  .hero-image-frame { border-radius: 22px; }
  .h1-light { font-size: 5vw; }
  .h1-bold { font-size: 6.2vw; }
  .hero-cta { flex-direction: row; align-items: center; }
  .btn-hero-main { width: auto; }

  .prob-stats { flex-direction: row; align-items: flex-start; justify-content: center; gap: 3rem; }
  .prob-grid { grid-template-columns: repeat(2, 1fr); }

  .services-grid { grid-template-columns: repeat(2, 1fr); }

  .chatbot-layout { grid-template-columns: 1fr; gap: 2.5rem; }

  .method-grid { grid-template-columns: repeat(3, 1fr); }
  .method-step { border-right: 1px solid rgba(8,8,8,.07); border-bottom: none; }
  .method-step:nth-child(3n), .method-step:last-child { border-right: none; }
  .method-step:nth-child(n+4) { border-top: 1px solid rgba(8,8,8,.07); }
  .method-step:nth-child(-n+3) { border-bottom: 1px solid rgba(8,8,8,.07); }

  .work-grid { grid-template-columns: repeat(2, 1fr); }

  .about-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .about-image { display: block; }

  .reviews-grid { grid-template-columns: 1fr 1fr; }

  .leadmag-inner { grid-template-columns: 1fr 1fr; gap: 3rem; }

  .form-row { grid-template-columns: 1fr 1fr; }

  .problema, .services, .chatbot-section, .method, .work,
  .about, .reviews, .leadmag, .faq-section, .contact {
    padding-top: 6rem; padding-bottom: 6rem;
  }

  .chat-window { width: 380px; right: 2rem; bottom: 6.5rem; }
  .chat-fab-wrap { bottom: 2rem; right: 2rem; }
  .back-to-top { bottom: 2rem; left: 2rem; }
}

/* ── DESKTOP (1024px+) ── */
@media (min-width: 1024px) {

  .hero-grid { grid-template-columns: 1fr 1fr; min-height: 100vh; }
  .hero-content { padding: 5rem 4rem 5rem 5rem; height: 100vh; }
  .hero-image { height: 100vh; min-height: 600px; padding: calc(64px + 1.5rem) 2rem 1.5rem 0; }
  .hero-image-frame { border-radius: 24px; }
  .h1-light { font-size: clamp(2.8rem, 5.5vw, 6rem); }
  .h1-bold { font-size: clamp(3rem, 6.5vw, 7rem); }

  .prob-grid { grid-template-columns: repeat(4, 1fr); }

  .services-grid { grid-template-columns: repeat(3, 1fr); }

  .chatbot-layout { grid-template-columns: 1fr 1fr; gap: 5rem; }
  .chatbot-mockup { display: flex; }

  .method-grid { grid-template-columns: repeat(5, 1fr); }
  .method-step, .method-step:nth-child(2n), .method-step:nth-child(3n) { border-right: 1px solid rgba(8,8,8,.07); border-bottom: none; }
  .method-step:last-child { border-right: none; }

  .work-grid { grid-template-columns: repeat(3, 1fr); }

  .about-grid { gap: 5rem; }

  .reviews-grid { grid-template-columns: repeat(3, 1fr); }

  .leadmag-inner { gap: 4rem; }

  .problema, .services, .chatbot-section, .method, .work,
  .about, .reviews, .leadmag, .faq-section, .contact {
    padding-top: 7rem; padding-bottom: 7rem;
  }
}

/* ── DESKTOP LARGE (1440px+) ── */
@media (min-width: 1440px) {
  .container { max-width: 1200px; margin: 0 auto; }
  .container-wide, .container-xl { max-width: 1350px; margin: 0 auto; }
  .hero-content { padding: 5rem 5rem 5rem 8rem; }
  .h1-light { font-size: 5.5rem; }
  .h1-bold { font-size: 7rem; }
}

/* ── 4K / ULTRA-WIDE (1920px+) ── */
@media (min-width: 1920px) {
  .container { max-width: 1400px; }
  .hero-content { padding: 5rem 6rem 5rem 10rem; }
  .h1-light { font-size: 7rem; }
  .h1-bold { font-size: 9rem; }
}

/* ── LANDSCAPE MOBILE ── */
@media (max-width: 900px) and (orientation: landscape) {
  .hero-grid { min-height: auto; }
  .hero-content { padding: 4rem 2rem 2rem; }
  .hero-image { height: 70vh; max-height: none; padding: calc(64px + 1rem) 1.5rem 1rem 0; }
  .h1-light { font-size: 4.5vw; }
  .h1-bold { font-size: 5.5vw; }
}

/* ── IPHONE SE / SMALL PHONES (max 374px) ── */
@media (max-width: 374px) {
  .hero-content { padding: 4rem 1.2rem 2rem; }
  .h1-light { font-size: 7.5vw; }
  .h1-bold { font-size: 9.5vw; }
  .hero-identity { gap: .4rem; }
  .prob-stat-num { font-size: 2rem; }
  .container { padding: 0 1.2rem; }
}

/* ── SAFE AREA / NOTCH / SCHERMI CURVI ── */
@supports (padding: max(0px)) {
  body { padding-left: max(0px, var(--sal)); padding-right: max(0px, var(--sar)); }
  nav { padding-left: max(1rem, var(--sal)); padding-right: max(1rem, var(--sar)); }
  .hero { padding-left: max(0px, var(--sal)); padding-right: max(0px, var(--sar)); }
}
@media (max-width: 767px) {
  .chat-fab-wrap {
    bottom: max(1.5rem, calc(1.5rem + var(--sab)));
    right: max(1.5rem, calc(1.5rem + var(--sar)));
  }
  .back-to-top {
    bottom: max(1.5rem, calc(1.5rem + var(--sab)));
    left: max(1.5rem, calc(1.5rem + var(--sal)));
  }
}

/* ── ACCESSIBILITÀ: riduzione movimento ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .section-fade { opacity: 1; transform: none; }
}

/* ── STAMPA ── */
@media print {
  nav, .chat-fab-wrap, .back-to-top, .cookie-banner, .chat-window { display: none !important; }
  .hero { min-height: auto; }
  body { font-size: 12pt; color: #000; }
}

/* ============================================================
   MOBILE 3D EFFECTS — CSS-ONLY
   Replaces Three.js WebGL on touch/coarse-pointer devices.
   Transform-only keyframes (translate/scale, no rotateX/Y/
   perspective) to avoid seam/hairline rendering artifacts on
   bordered or tightly-packed grid items (service/work/review
   cards). .method-step is intentionally left static — it shares
   borders with siblings and previously caused flicker artifacts
   when animated.
   ============================================================ */

@keyframes mob-orb-1 {
  0%,100% { transform: translate(0,0) scale(1); }
  30%  { transform: translate(18px,-24px) scale(1.07); }
  65%  { transform: translate(-14px,16px) scale(.95); }
}
@keyframes mob-orb-2 {
  0%,100% { transform: translate(0,0) scale(1); }
  40%  { transform: translate(-22px,18px) scale(1.09); }
  72%  { transform: translate(12px,-18px) scale(.93); }
}
@keyframes mob-orb-dark {
  0%,100% { opacity:.5; transform: scale(1) translateY(0); }
  50%  { opacity:.8; transform: scale(1.1) translateY(-12px); }
}
@keyframes mob-card-3d {
  from { transform: scale(.93) translateY(22px); }
  to   { transform: scale(1) translateY(0); }
}
@keyframes mob-card-side {
  from { transform: scale(.95) translateX(-16px); }
  to   { transform: scale(1) translateX(0); }
}
@keyframes mob-icon-3d {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-5px) scale(1.05); }
}
@keyframes mob-heading-3d {
  from { transform: translateY(14px); opacity:0; }
  to   { transform: translateY(0); opacity:1; }
}

/* Orb elements hidden by default (shown only on touch via the query below; injected into DOM via JS) */
.mob-hero-orb-1, .mob-hero-orb-2 { display: none; }

@media (hover: none), (pointer: coarse) {

  /* Hero: hide Three.js canvas (desktop-only, perf), show CSS orbs instead */
  #heroCanvas { display: none; }
  .hero::after { display: none; }

  /* Hero orb 1 — top-right soft blob */
  .mob-hero-orb-1 {
    display: block;
    position: absolute;
    width: min(360px, 90vw);
    height: min(360px, 90vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(8,8,8,.055) 0%, rgba(8,8,8,.02) 40%, transparent 70%);
    top: -90px; right: -90px;
    z-index: 0; pointer-events: none;
    animation: mob-orb-1 9s ease-in-out infinite;
  }

  /* Hero orb 2 — bottom-left softer blob */
  .mob-hero-orb-2 {
    display: block;
    position: absolute;
    width: min(220px, 58vw);
    height: min(220px, 58vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(8,8,8,.04) 0%, transparent 70%);
    bottom: 18%; left: -55px;
    z-index: 0; pointer-events: none;
    animation: mob-orb-2 12s ease-in-out infinite 2.5s;
  }

  /* Section-fade: always visible on touch devices, no opacity-0 entrance */
  .section-fade { opacity: 1; transform: none; }

  /* Service cards: scale/translate entrance */
  .service-card { animation: mob-card-3d .65s ease both; }
  .service-card:nth-child(1) { animation-delay: 0s; }
  .service-card:nth-child(2) { animation-delay: .09s; }
  .service-card:nth-child(3) { animation-delay: .18s; }
  .service-card:nth-child(4) { animation-delay: .27s; }
  .service-card:nth-child(5) { animation-delay: .36s; }
  .service-card:nth-child(6) { animation-delay: .45s; }

  /* Service icons: gentle float */
  .service-icon { animation: mob-icon-3d 3.8s ease-in-out infinite; }
  .service-card:nth-child(2) .service-icon { animation-delay: .6s; }
  .service-card:nth-child(3) .service-icon { animation-delay: 1.2s; }
  .service-card:nth-child(4) .service-icon { animation-delay: 1.8s; }
  .service-card:nth-child(5) .service-icon { animation-delay: 2.4s; }
  .service-card:nth-child(6) .service-icon { animation-delay: 3.0s; }

  /* Work items: slide in */
  .work-item { animation: mob-card-side .72s ease both; }
  .work-item:nth-child(2) { animation-delay: .12s; }
  .work-item:nth-child(3) { animation-delay: .24s; }
  .work-item:nth-child(4) { animation-delay: .36s; }
  .work-item:nth-child(5) { animation-delay: .48s; }

  /* Review cards: scale entrance */
  .review-card { animation: mob-card-3d .7s ease both; }
  .review-card:nth-child(2) { animation-delay: .1s; }
  .review-card:nth-child(3) { animation-delay: .2s; }

  /* Method steps: kept static — shared borders, animating causes seam flicker */

  /* Section headings: entrance from above */
  .section-header h2,
  .work-header h2,
  .chatbot-title,
  .leadmag-title {
    animation: mob-heading-3d .6s ease both;
  }

  /* Dark-section floating orbs (injected as .mob-dark-orb via JS) */
  .mob-dark-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: mob-orb-dark 7s ease-in-out infinite;
  }
}

/* ════════════════════════════════════════════
   TITOLI CENTRATI — tutte le intestazioni di sezione
════════════════════════════════════════════ */
.section-header,
.prob-header,
.work-header,
.about-header,
.faq-header {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}
.section-header .section-sub,
.section-header .section-sub-light {
  margin-left: auto;
  margin-right: auto;
  max-width: 560px;
}
.leadmag-left { text-align: center; }
.leadmag-left .check-list { display: inline-block; text-align: left; }



/* ════════════════════════════════════════════
   MOBILE — testi ordinati e centrati
════════════════════════════════════════════ */
@media (max-width: 767px) {
  .hero-content { text-align: center; align-items: center; padding-top: 5.5rem; }
  .hero-identity { justify-content: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-cta { width: 100%; max-width: 360px; }

  .section-header { padding: 0 .25rem; }
  .section-header h2 { margin-bottom: .9rem; }
  .section-sub, .section-sub-light { max-width: 100%; }

  .prob-stats { gap: 1.8rem; }
  .prob-stat-lbl { max-width: 240px; margin: 0 auto; }

  .work-info { flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
  .work-desc { text-align: center; }

  .about-header, .about-text { text-align: center; }
  .about-text p { margin-left: auto; margin-right: auto; }
  .about-quote { padding-left: 0; border-left: none; border-top: 2px solid rgba(8,8,8,.15); padding-top: 1rem; }

  .leadmag-left { text-align: center; }
  .leadmag-sub { margin-left: auto; margin-right: auto; max-width: 340px; }

  .contact-sub { max-width: 100%; }
}
