/* ==========================================================================
   OMNIGRAPH · CINEMATIC CREATIVE STUDIO (CLEAN BASE)
   Warm Amber-Gold Accent, Full Light/Dark Mode, 6 Unique Studio Visuals
   ========================================================================== */

:root {
  --bg: #101114;
  --bg-elevated: #17191f;
  --bg-card: rgba(25, 27, 34, 0.78);
  --bg-header: rgba(16, 17, 20, 0.82);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);

  --text-primary: #f6f4ef;
  --text-secondary: #b4b2ab;
  --text-muted: #7f7d77;

  --accent: #f2a93b;
  --accent-hover: #f7be5e;
  --accent-on: #14120e;
  --accent-soft: rgba(242, 169, 59, 0.15);
  --accent-glow: rgba(242, 169, 59, 0.28);

  --hero-bg: #101114;
  --hero-text: #f6f4ef;
  --hero-sub: rgba(246, 244, 239, 0.82);
  --hero-muted: rgba(246, 244, 239, 0.65);
  --hero-border: rgba(255, 255, 255, 0.14);
  --hero-scrim: linear-gradient(95deg, rgba(16, 17, 20, 0.90) 0%, rgba(16, 17, 20, 0.64) 50%, rgba(16, 17, 20, 0.18) 100%),
                linear-gradient(180deg, rgba(16, 17, 20, 0.35) 0%, transparent 28%, rgba(16, 17, 20, 0.92) 100%);
  --hero-footer-bg: linear-gradient(180deg, transparent 0%, rgba(16, 17, 20, 0.72) 100%);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --container: 1320px;
}

[data-theme="light"] {
  --bg: #f6f4ef;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.86);
  --bg-header: rgba(246, 244, 239, 0.88);
  --border: rgba(20, 18, 15, 0.11);
  --border-strong: rgba(20, 18, 15, 0.24);

  --text-primary: #151412;
  --text-secondary: #4a4843;
  --text-muted: #706e67;

  --accent: #b86c0b;
  --accent-hover: #9e5a06;
  --accent-on: #ffffff;
  --accent-soft: rgba(184, 108, 11, 0.12);
  --accent-glow: rgba(184, 108, 11, 0.22);

  --hero-bg: #f6f4ef;
  --hero-text: #151412;
  --hero-sub: rgba(21, 20, 18, 0.80);
  --hero-muted: rgba(21, 20, 18, 0.62);
  --hero-border: rgba(21, 20, 18, 0.14);
  --hero-scrim: linear-gradient(95deg, rgba(246, 244, 239, 0.94) 0%, rgba(246, 244, 239, 0.78) 52%, rgba(246, 244, 239, 0.26) 100%),
                linear-gradient(180deg, rgba(246, 244, 239, 0.55) 0%, transparent 28%, rgba(246, 244, 239, 0.96) 100%);
  --hero-footer-bg: linear-gradient(180deg, transparent 0%, rgba(246, 244, 239, 0.88) 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.45s var(--ease-out), color 0.45s var(--ease-out);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0; height: 2px; width: 0%;
  background: var(--accent);
  z-index: 1000;
}

.preloader {
  position: fixed; inset: 0; z-index: 2000; background: #101114;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.75s var(--ease-out), opacity 0.5s ease;
}
.preloader.done { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.preloader-inner { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.preloader-mark { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.34em; color: #f6f4ef; }
.preloader-bar { width: 140px; height: 1.5px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.preloader-progress { height: 100%; width: 100%; background: #f2a93b; transform-origin: left; animation: preloadFill 0.45s var(--ease-out) forwards; }
@keyframes preloadFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* HEADER */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 1.35rem 0; color: var(--hero-text);
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease-out), padding 0.35s var(--ease-out), border-color 0.35s ease, color 0.35s ease;
}
.site-header.scrolled {
  background: var(--bg-header); color: var(--text-primary);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  padding: 0.9rem 0; border-bottom-color: var(--border);
}
.header-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand-lockup { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 600; letter-spacing: 0.16em; font-size: 0.9rem; }
.brand-mark { width: 26px; height: 26px; display: inline-flex; }
.main-nav { display: flex; align-items: center; gap: 2.1rem; }
.nav-link { font-size: 0.86rem; font-weight: 500; opacity: 0.82; position: relative; transition: opacity 0.25s ease; }
.nav-link::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease-out); }
.nav-link:hover { opacity: 1; }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.header-controls { display: flex; align-items: center; gap: 0.9rem; }
.theme-segmented-switch {
  display: inline-flex; align-items: center; background: var(--bg-card);
  border: 1px solid var(--border-strong); border-radius: var(--radius-full);
  padding: 0.22rem; gap: 0.2rem; backdrop-filter: blur(12px);
}
.theme-opt-btn {
  background: transparent; border: none; color: var(--text-secondary);
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.34rem 0.68rem;
  border-radius: var(--radius-full); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.05em; cursor: pointer; transition: background-color 0.25s ease, color 0.25s ease;
}
.theme-opt-btn:hover { color: var(--text-primary); }
.theme-opt-btn.active { background: var(--accent); color: var(--accent-on); }
.theme-separator { width: 1px; height: 14px; background: var(--border-strong); }
.btn-header-cta {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full); border: 1px solid var(--border-strong);
  font-size: 0.84rem; font-weight: 500; transition: all 0.25s ease;
}
.btn-header-cta:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.mobile-menu-btn {
  display: none; width: 38px; height: 38px; background: transparent;
  border: 1px solid var(--border-strong); border-radius: var(--radius-full);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
}
.mobile-menu-btn span { display: block; width: 16px; height: 1.5px; background: currentColor; }
.mobile-drawer {
  position: fixed; inset: 0; z-index: 450; background: var(--bg);
  display: flex; align-items: center; padding: 5rem 2rem 2rem;
  opacity: 0; pointer-events: none; transition: opacity 0.35s ease;
}
.mobile-drawer.open { opacity: 1; pointer-events: auto; }
.mobile-drawer-nav { display: flex; flex-direction: column; gap: 1.4rem; }
.mobile-nav-link { font-size: 1.8rem; font-weight: 500; display: flex; align-items: baseline; gap: 1rem; }
.mobile-nav-link span { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.mobile-nav-link.accent { color: var(--accent); }

/* HERO */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  justify-content: space-between; padding-top: 8rem; overflow: hidden;
  color: var(--hero-text); background: var(--hero-bg);
}
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-img { width: 100%; height: 108%; object-fit: cover; object-position: center 40%; will-change: transform; transition: filter 0.45s ease; }
[data-theme="light"] .hero-img { filter: brightness(1.12) contrast(0.95) saturate(0.92); }
.hero-scrim { position: absolute; inset: 0; background: var(--hero-scrim); transition: background 0.45s ease; }
.hero-content { position: relative; z-index: 2; margin-top: auto; margin-bottom: auto; padding-top: 2rem; padding-bottom: 3rem; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 0.65rem; font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.14em; color: var(--hero-sub); margin-bottom: 1.75rem; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero-title { font-size: clamp(2.85rem, 6.8vw, 6.2rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.035em; max-width: 15ch; margin-bottom: 1.9rem; }
.line-mask { display: block; overflow: hidden; padding-bottom: 0.06em; }
.line-inner { display: block; transform: translateY(105%); transition: transform 0.9s var(--ease-out); }
body.hero-ready .line-inner { transform: translateY(0); }
body.hero-ready .line-mask:nth-child(2) .line-inner { transition-delay: 0.12s; }
.hero-anim { opacity: 0; transform: translateY(16px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
body.hero-ready .hero-anim { opacity: 1; transform: translateY(0); transition-delay: 0.22s; }
.hero-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.08em; color: var(--accent); }
.hero-lead { font-size: clamp(1.04rem, 1.35vw, 1.2rem); line-height: 1.68; color: var(--hero-sub); max-width: 58ch; margin-bottom: 2.6rem; }
.hero-lead strong { color: var(--hero-text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.65rem; background: var(--accent); color: var(--accent-on);
  border: 1px solid var(--accent); padding: 0.95rem 1.85rem; border-radius: var(--radius-full);
  font-size: 0.92rem; font-weight: 600; cursor: pointer; transition: all 0.25s ease;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 12px 30px var(--accent-glow); }
.btn-ghost {
  display: inline-flex; align-items: center; padding: 0.95rem 1.5rem; border-radius: var(--radius-full);
  border: 1px solid var(--hero-border); color: var(--hero-text); font-size: 0.92rem; font-weight: 500; transition: all 0.25s ease;
}
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
.hero-footer { position: relative; z-index: 2; border-top: 1px solid var(--hero-border); padding: 1.5rem 0; background: var(--hero-footer-bg); }
.hero-metrics { display: flex; align-items: center; gap: 2.5rem; }
.metric-item { display: flex; flex-direction: column; gap: 0.15rem; }
.metric-val { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; color: var(--hero-text); }
.metric-label { font-size: 0.8rem; color: var(--hero-muted); }
.metric-divider { width: 1px; height: 30px; background: var(--hero-border); }
.scroll-cue { margin-left: auto; display: inline-flex; align-items: center; gap: 0.75rem; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; color: var(--hero-muted); }
.scroll-cue:hover { color: var(--accent); }
.scroll-line { width: 36px; height: 1px; background: currentColor; }

/* TRUST STRIP */
.trust-strip { padding: 2.75rem 0; border-bottom: 1px solid var(--border); overflow: hidden; background: var(--bg-elevated); }
.trust-eyebrow { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.15em; color: var(--text-muted); margin-bottom: 1.4rem; }
.marquee-wrap { overflow: hidden; mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%); }
.marquee-track { display: flex; align-items: center; gap: 2.2rem; width: max-content; animation: marqueeScroll 38s linear infinite; font-size: 1.04rem; font-weight: 500; letter-spacing: 0.12em; color: var(--text-secondary); }
.marquee-track:hover { animation-play-state: paused; }
.m-sep { color: var(--accent); }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* SECTIONS */
.section { padding: clamp(5rem, 9.5vw, 8.75rem) 0; }
.section-index { display: inline-block; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 1.25rem; }
.section-head { max-width: 740px; margin-bottom: clamp(3rem, 5vw, 4.5rem); }
.section-title { font-size: clamp(2.15rem, 4.2vw, 3.6rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 1.2rem; }
.section-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.1em; color: var(--accent); }
.section-sub { font-size: 1.06rem; color: var(--text-secondary); line-height: 1.68; max-width: 58ch; }

/* VISIONE */
.editorial-grid { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; align-items: start; }
.manifesto-statement { font-size: clamp(1.7rem, 3.1vw, 2.75rem); font-weight: 400; line-height: 1.26; letter-spacing: -0.025em; margin-bottom: 4rem; max-width: 28ch; }
.manifesto-statement em { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-size: 1.08em; }
.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.25rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.principle-card .p-num { display: block; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-bottom: 0.9rem; }
.principle-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.65rem; }
.principle-card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.68; }

/* COMPETENZE */
.services-section { border-top: 1px solid var(--border); }
.services-layout { display: grid; grid-template-columns: 0.94fr 1.06fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
.services-visual-col { position: sticky; top: 6.5rem; }
.services-visual-frame { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden; background: #14161b; border: 1px solid var(--border-strong); }
.service-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 0.65s var(--ease-out), transform 0.9s var(--ease-out); }
.service-img.active { opacity: 1; transform: scale(1); }
.visual-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 1.35rem 1.5rem; background: linear-gradient(180deg, transparent 0%, rgba(12, 13, 16, 0.90) 100%); display: flex; align-items: center; justify-content: space-between; color: #f6f4ef; }
.vc-idx { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600; color: #f2a93b; }
.vc-title { font-size: 0.9rem; font-weight: 500; }
.services-list { border-top: 1px solid var(--border); }
.service-row { border-bottom: 1px solid var(--border); }
.service-trigger { width: 100%; background: transparent; border: none; padding: 1.65rem 0; display: grid; grid-template-columns: 42px 1fr auto 24px; align-items: center; gap: 1rem; text-align: left; cursor: pointer; }
.sr-num { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; color: var(--text-muted); transition: color 0.25s ease; }
.service-row.active .sr-num, .service-row:hover .sr-num { color: var(--accent); }
.sr-name { font-size: clamp(1.12rem, 1.5vw, 1.35rem); font-weight: 500; }
.sr-tag { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; color: var(--text-secondary); padding: 0.3rem 0.72rem; border: 1px solid var(--border-strong); border-radius: var(--radius-full); }
.sr-tag.accent-tag { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.sr-icon { position: relative; width: 16px; height: 16px; justify-self: end; }
.sr-icon::before, .sr-icon::after { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1.5px; background: currentColor; transition: transform 0.3s var(--ease-out), opacity 0.3s ease; }
.sr-icon::after { transform: rotate(90deg); }
.service-row.active .sr-icon::after { transform: rotate(0deg); opacity: 0; }
.service-panel { max-height: 0; overflow: hidden; padding-left: 58px; transition: max-height 0.45s var(--ease-out), padding-bottom 0.45s var(--ease-out); }
.service-row.active .service-panel { max-height: 360px; padding-bottom: 1.8rem; }
.service-panel p { font-size: 0.96rem; color: var(--text-secondary); line-height: 1.68; margin-bottom: 1.1rem; max-width: 54ch; }
.sr-deliverables { list-style: none; display: flex; flex-direction: column; gap: 0.48rem; }
.sr-deliverables li { font-size: 0.9rem; padding-left: 1.15rem; position: relative; }
.sr-deliverables li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 1.5px; background: var(--accent); }

/* AI STUDIO */
.ai-section { position: relative; overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ai-backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ai-bg-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.30; }
[data-theme="light"] .ai-bg-img { opacity: 0.14; }
.ai-scrim { position: absolute; inset: 0; background: radial-gradient(circle at 82% 28%, transparent 0%, var(--bg) 76%); }
.ai-inner { position: relative; z-index: 2; }
.ai-showcase { display: grid; grid-template-columns: 320px 1fr; gap: 1.5rem; align-items: stretch; }
.ai-tabs { display: flex; flex-direction: column; gap: 0.75rem; }
.ai-tab { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.35rem 1.4rem; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 0.35rem; backdrop-filter: blur(14px); transition: all 0.25s ease; }
.ai-tab:hover { border-color: var(--border-strong); }
.ai-tab.active { border-color: var(--accent); background: var(--bg-elevated); }
.at-num { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600; color: var(--accent); }
.at-title { font-size: 1.05rem; font-weight: 600; }
.at-desc { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.45; }
.ai-stage { background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: clamp(1.5rem, 3vw, 2.5rem); display: flex; flex-direction: column; }
.ai-panel { display: none; flex-direction: column; gap: 1.75rem; height: 100%; animation: fadeSlideIn 0.4s var(--ease-out); }
.ai-panel.active { display: flex; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ai-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; padding-bottom: 1.15rem; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; }
.ap-badge { color: var(--accent); font-weight: 600; }
.ap-meta { color: var(--text-secondary); }
.rp-label { display: block; font-size: 0.86rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.rp-buttons { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.rp-btn { background: transparent; border: 1px solid var(--border-strong); border-radius: var(--radius-full); padding: 0.48rem 1rem; font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; transition: all 0.25s ease; }
.rp-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.rp-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--text-primary); font-weight: 500; }
.rag-console { display: flex; flex-direction: column; gap: 1.1rem; margin-top: auto; }
.rag-q-box, .rag-a-box { padding: 1.25rem 1.4rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); }
.rag-a-box { border-color: var(--accent); }
.rag-a-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.rag-role { display: block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.09em; color: var(--text-muted); margin-bottom: 0.4rem; }
.rag-a-top .rag-role { margin-bottom: 0; }
.rag-role.accent { color: var(--accent); }
.rag-latency { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-secondary); }
.rag-q-box p { font-size: 0.96rem; font-style: italic; }
.rag-a-box p { font-size: 0.96rem; color: var(--text-secondary); line-height: 1.65; transition: opacity 0.2s ease; }
.rag-a-box p strong { color: var(--text-primary); font-weight: 600; }
.rag-source { margin-top: 0.95rem; padding-top: 0.75rem; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-secondary); }
.rag-source span { color: var(--accent); font-weight: 500; }
.ai-feature-split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: start; }
.af-copy h3 { font-size: 1.35rem; font-weight: 500; line-height: 1.25; margin-bottom: 0.9rem; }
.af-copy p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.68; margin-bottom: 1.75rem; }
.af-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.af-kpis strong { display: block; font-size: 1.25rem; color: var(--accent); margin-bottom: 0.2rem; }
.af-kpis span { font-size: 0.8rem; color: var(--text-secondary); }
.af-steps { display: flex; flex-direction: column; gap: 1rem; }
.af-step { display: flex; gap: 1rem; padding: 1rem 1.15rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); }
.af-step span { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--accent); }
.af-step strong { display: block; font-size: 0.94rem; margin-bottom: 0.25rem; }
.af-step p { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.5; }
.workflow-chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 1rem; align-items: center; margin: auto 0; }
.wf-node { padding: 1.5rem 1.35rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); height: 100%; }
.wf-step { display: block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; color: var(--accent); margin-bottom: 0.6rem; }
.wf-node h4 { font-size: 1.04rem; margin-bottom: 0.5rem; }
.wf-node p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.55; }
.wf-arrow { font-size: 1.25rem; color: var(--accent); }

/* AI PACKAGES (CONSULENZA AI AZIENDE) */
.ai-packages { margin-top: clamp(3.5rem, 6vw, 5.25rem); padding-top: clamp(3rem, 5vw, 4.5rem); border-top: 1px solid var(--border); }
.ai-packages-head { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: end; margin-bottom: 2.5rem; }
.ai-pkg-eyebrow { display: inline-block; font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 0.85rem; }
.ai-pkg-title { font-size: clamp(1.65rem, 2.8vw, 2.35rem); font-weight: 500; line-height: 1.16; letter-spacing: -0.025em; }
.ai-pkg-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); font-size: 1.08em; }
.ai-pkg-sub { font-size: 0.96rem; color: var(--text-secondary); line-height: 1.65; }
.ai-packages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; }
.ai-pkg-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.75rem 1.65rem; display: flex; flex-direction: column; gap: 0.9rem; backdrop-filter: blur(14px); transition: border-color 0.3s ease, transform 0.3s var(--ease-out); }
.ai-pkg-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.ai-pkg-card.featured { border-color: var(--accent); background: var(--bg-elevated); }
.ai-pkg-top { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.ai-pkg-tier { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; color: var(--accent); }
.ai-pkg-badge { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.25rem 0.65rem; border-radius: var(--radius-full); border: 1px solid var(--border-strong); color: var(--text-secondary); }
.ai-pkg-badge.accent { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ai-pkg-card h4 { font-size: 1.15rem; font-weight: 600; line-height: 1.28; }
.ai-pkg-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }
.ai-pkg-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.ai-pkg-list li { font-size: 0.86rem; color: var(--text-primary); padding-left: 1.05rem; position: relative; line-height: 1.45; }
.ai-pkg-list li::before { content: ''; position: absolute; left: 0; top: 0.58em; width: 6px; height: 1.5px; background: var(--accent); }
.ai-packages-cta { margin-top: 2rem; padding: 1.35rem 1.65rem; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--bg-elevated); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.ai-pkg-note { font-size: 0.94rem; color: var(--text-secondary); max-width: 58ch; }

/* INFRASTRUTTURA */
.infra-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-strong); min-height: 560px; display: flex; align-items: flex-end; color: #f6f4ef; background: #101114; }
.infra-media { position: absolute; inset: 0; z-index: 0; }
.infra-img { width: 100%; height: 100%; object-fit: cover; }
.infra-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 17, 20, 0.18) 0%, rgba(16, 17, 20, 0.72) 52%, rgba(16, 17, 20, 0.94) 100%); }
.infra-content { position: relative; z-index: 2; padding: clamp(2rem, 5vw, 4.5rem); width: 100%; }
.infra-content .section-index, .infra-content .section-title em { color: #f2a93b; }
.infra-lead { font-size: 1.06rem; color: rgba(246, 244, 239, 0.84); max-width: 58ch; line-height: 1.68; margin-bottom: 2.75rem; }
.infra-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-top: 2.25rem; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.is-val { display: block; font-size: 1.5rem; font-weight: 600; margin-bottom: 0.35rem; color: #f2a93b; }
.is-label { font-size: 0.86rem; color: rgba(246, 244, 239, 0.76); line-height: 1.45; }

/* CLIENTI */
.clients-section { position: relative; overflow: hidden; border-top: 1px solid var(--border); }
.clients-backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.clients-bg-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.20; }
[data-theme="light"] .clients-bg-img { opacity: 0.10; }
.clients-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(16, 17, 20, 0.55) 45%, var(--bg) 100%); }
[data-theme="light"] .clients-scrim { background: linear-gradient(180deg, var(--bg) 0%, rgba(246, 244, 239, 0.72) 45%, var(--bg) 100%); }
.clients-inner { position: relative; z-index: 2; }
.clients-top { max-width: 900px; margin-bottom: 4.5rem; }
.featured-quote { font-family: var(--font-serif); font-size: clamp(1.85rem, 3.6vw, 3.1rem); line-height: 1.22; font-weight: 400; margin-bottom: 1.25rem; }
.quote-attrib { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; color: var(--accent); }
.clients-directory { border-top: 1px solid var(--border); }
.cd-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: 1.35rem 0; border-bottom: 1px solid var(--border); transition: padding-left 0.3s var(--ease-out); }
.cd-row:hover { padding-left: 0.75rem; }
.cd-name { font-size: clamp(1.1rem, 1.6vw, 1.4rem); font-weight: 500; }
.cd-sector { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-secondary); text-align: right; }

/* CONTATTI */
.contact-section { border-top: 1px solid var(--border); }
.contact-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 5vw, 5.5rem); align-items: start; }
.contact-lead { font-size: 1.04rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 2.5rem; max-width: 44ch; }
.contact-direct-info { display: flex; flex-direction: column; gap: 1.4rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.cdi-label { display: block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 0.3rem; }
.cdi-link { font-size: 1.25rem; font-weight: 500; border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; }
.cdi-link:hover { color: var(--accent); }
.cdi-text { font-size: 0.95rem; color: var(--text-secondary); }
.contact-form { background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: clamp(1.75rem, 3.5vw, 3rem); display: flex; flex-direction: column; gap: 1.5rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-size: 0.84rem; font-weight: 500; color: var(--text-secondary); }
.field input[type="text"], .field input[type="email"], .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0.85rem 1rem; color: var(--text-primary); font-family: inherit; font-size: 0.95rem; outline: none; transition: border-color 0.25s ease; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.interest-chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.i-chip { cursor: pointer; }
.i-chip input { display: none; }
.i-chip span { display: inline-block; padding: 0.45rem 0.95rem; border-radius: var(--radius-full); border: 1px solid var(--border-strong); font-size: 0.82rem; color: var(--text-secondary); transition: all 0.25s ease; }
.i-chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--text-primary); font-weight: 500; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 0.5rem; }
.form-note { font-size: 0.84rem; color: var(--text-muted); }

/* FOOTER, COOKIE & MODAL */
.site-footer { border-top: 1px solid var(--border); padding: 2.25rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.85rem; }
.fb-name { font-weight: 600; font-size: 0.86rem; letter-spacing: 0.12em; }
.fb-meta { font-size: 0.84rem; color: var(--text-muted); }
.footer-links { display: flex; align-items: center; gap: 0.85rem; }
.footer-link-btn { background: transparent; border: none; font-size: 0.84rem; color: var(--text-secondary); cursor: pointer; }
.footer-link-btn:hover { color: var(--accent); }
.f-sep { color: var(--text-muted); }

.cookie-banner { position: fixed; bottom: 1.25rem; right: 1.25rem; left: 1.25rem; max-width: 560px; margin-left: auto; z-index: 800; background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 1.15rem 1.35rem; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; gap: 1rem; transform: translateY(130%); opacity: 0; transition: transform 0.45s var(--ease-out), opacity 0.35s ease; }
.cookie-banner.visible { transform: translateY(0); opacity: 1; }
.cookie-text { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.55; }
.cookie-text strong { color: var(--text-primary); }
.cookie-actions { display: flex; justify-content: flex-end; gap: 0.65rem; }
.cookie-btn { padding: 0.5rem 1.05rem; border-radius: var(--radius-full); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.cookie-info { background: transparent; border: 1px solid var(--border-strong); color: var(--text-secondary); }
.cookie-accept { background: var(--accent); border: 1px solid var(--accent); color: var(--accent-on); }

.styled-dialog { margin: auto; max-width: 600px; width: calc(100% - 2rem); background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 0; box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5); }
.styled-dialog::backdrop { background: rgba(16, 17, 20, 0.72); backdrop-filter: blur(6px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.dialog-close { background: transparent; border: none; font-size: 1.1rem; color: var(--text-secondary); cursor: pointer; }
.dialog-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.9rem; font-size: 0.92rem; color: var(--text-secondary); line-height: 1.65; }
.dialog-body strong { color: var(--text-primary); }
.dialog-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (max-width: 1080px) {
  .editorial-grid, .services-layout, .ai-showcase, .contact-layout, .ai-feature-split, .ai-packages-head, .ai-packages-grid { grid-template-columns: 1fr; }
  .services-visual-col { position: relative; top: 0; }
  .infra-stats { grid-template-columns: repeat(2, 1fr); }
  .workflow-chain { grid-template-columns: 1fr; }
  .wf-arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 860px) {
  .main-nav, .btn-header-cta, .scroll-cue { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .principles-grid, .form-row-2 { grid-template-columns: 1fr; }
  .hero-metrics { flex-wrap: wrap; gap: 1.5rem; }
  .metric-divider, .sr-tag { display: none; }
  .service-panel { padding-left: 0; }
  .cd-row { flex-direction: column; gap: 0.25rem; }
  .cd-sector { text-align: left; }
}
