/* ==========================================
   AUTOMATIZIONI:FAST / AUTOMAOS
   Dark HMI aesthetic — dual-brand stylesheet
   Amber = AutomaOS, Electric blue = :FAST
   ========================================== */

:root {
  --bg: #080c14;
  --surface: #0f1929;
  --surface-2: #141f32;
  --amber: #e8a317;
  --amber-dim: rgba(232,163,23,0.12);
  --green: #22c55e;
  --warn: #f59e0b;
  --text: #f1f5f9;
  --text-dim: #9ca3af;
  --text-muted: #4b5563;
  --border: rgba(232,163,23,0.18);
  --border-dim: rgba(255,255,255,0.07);
  --font-head: 'Syne', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --hmi-bg: #070a11;
}

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

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

/* GRID BACKGROUND */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232,163,23,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,163,23,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.25) 20%, rgba(0,0,0,0.25) 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.25) 20%, rgba(0,0,0,0.25) 80%, transparent 100%);
  pointer-events: none;
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: rgba(8,12,20,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dim);
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo { color: var(--amber); font-size: 18px; }
.nav-name { font-family: var(--font-head); font-weight: 700; font-size: 17px; letter-spacing: 0.04em; }
.nav-status { display: flex; align-items: center; gap: 8px; }
.nav-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: var(--text-dim); text-transform: uppercase; }

/* HERO */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 48px 80px;
}
.hero-content {
  max-width: 1280px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.hero-left { display: flex; flex-direction: column; gap: 28px; }
.hero-tag { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.hero-tag-line { display: block; width: 32px; height: 2px; background: var(--amber); }
.hero-headline { font-family: var(--font-head); font-size: clamp(36px,4.5vw,58px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; color: var(--text); }
.hero-sub { font-size: 18px; color: var(--text-dim); line-height: 1.65; max-width: 480px; font-weight: 300; }
.hero-features { display: flex; flex-direction: column; gap: 12px; }
.hero-feature { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-dim); }
.hero-feature-icon { color: var(--amber); font-size: 16px; }

/* HMI PANEL */
.hmi-panel { background: var(--hmi-bg); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; box-shadow: 0 0 80px rgba(232,163,23,0.07), inset 0 0 40px rgba(0,0,0,0.6); }
.hmi-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; }
.hmi-title { font-family: var(--font-head); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; color: var(--text-dim); text-transform: uppercase; }
.hmi-header-right { display: flex; align-items: center; gap: 6px; }
.hmi-blink { color: var(--green); font-size: 14px; animation: blink 1s infinite; }
.hmi-status-text { font-family: var(--font-head); font-size: 9px; font-weight: 700; letter-spacing: 0.16em; color: var(--green); }
.hmi-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.hmi-metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.hmi-metric { background: var(--surface); border: 1px solid var(--border-dim); border-radius: 4px; padding: 12px; }
.hmi-metric-label { font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.hmi-metric-value { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 2px; }
.hmi-metric-value.amber { color: var(--amber); }
.hmi-metric-value.green { color: var(--green); }
.hmi-unit { font-size: 15px; }
.hmi-metric-unit { font-size: 10px; color: var(--text-muted); margin-bottom: 8px; }
.hmi-bar { height: 3px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.hmi-bar-fill { height: 100%; background: var(--amber); border-radius: 2px; transition: width 1.2s ease; }
.hmi-waveform { background: var(--surface); border: 1px solid var(--border-dim); border-radius: 4px; padding: 10px 12px; }
.hmi-wave-label { font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.hmi-log { display: flex; flex-direction: column; }
.hmi-log-line { display: flex; gap: 10px; font-size: 11px; font-family: 'IBM Plex Mono', 'Courier New', monospace; padding: 5px 0; border-bottom: 1px solid var(--border-dim); }
.hmi-log-line:last-child { border-bottom: none; }
.hmi-ts { color: var(--text-muted); min-width: 60px; flex-shrink: 0; }
.hmi-ok { color: var(--text-dim); }
.hmi-warn { color: var(--warn); }
.hmi-footer { display: flex; gap: 8px; }
.hmi-badge { font-size: 9px; font-weight: 600; letter-spacing: 0.1em; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border-dim); border-radius: 2px; padding: 3px 8px; text-transform: uppercase; }

/* STATS */
.stats { border-top: 1px solid var(--border-dim); border-bottom: 1px solid var(--border-dim); padding: 40px 48px; background: var(--surface); }
.stats-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.stats-item { text-align: center; flex: 1; }
.stats-number { font-family: var(--font-head); font-size: clamp(28px,3.5vw,42px); font-weight: 800; color: var(--amber); line-height: 1; margin-bottom: 8px; }
.stats-label { font-size: 12px; color: var(--text-dim); max-width: 160px; margin: 0 auto; }
.stats-divider { width: 1px; height: 50px; background: var(--border-dim); }

/* MONITOR GRID */
.monitor { padding: 100px 48px; }
.monitor-inner { max-width: 1280px; margin: 0 auto; }
.monitor-label { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 20px; }
.monitor-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border-dim); border: 1px solid var(--border-dim); border-radius: 4px; overflow: hidden; }
.monitor-cell { background: var(--bg); padding: 32px; display: flex; flex-direction: column; gap: 10px; }
.monitor-cell:hover { background: var(--surface); }
.mc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.mc-title { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text); }
.mc-desc { font-size: 14px; color: var(--text-dim); line-height: 1.6; font-weight: 300; }

/* FEATURES */
.features { padding: 100px 48px; background: var(--surface); }
.features-inner { max-width: 1280px; margin: 0 auto; }
.features-header { text-align: center; margin-bottom: 72px; }
.features-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 16px; }
.features-title { font-family: var(--font-head); font-size: clamp(28px,3.5vw,48px); font-weight: 800; color: var(--text); line-height: 1.1; margin-bottom: 20px; }
.features-sub { font-size: 17px; color: var(--text-dim); font-weight: 300; max-width: 560px; margin: 0 auto; line-height: 1.65; }
.features-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--border-dim); border: 1px solid var(--border-dim); border-radius: 4px; overflow: hidden; }
.feature-card { background: var(--surface-2); padding: 48px; display: flex; flex-direction: column; gap: 14px; }
.fc-number { font-family: var(--font-head); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--amber); text-transform: uppercase; }
.fc-title { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--text); }
.fc-body { font-size: 15px; color: var(--text-dim); line-height: 1.7; font-weight: 300; }

/* MANIFESTO */
.manifesto { padding: 100px 48px; border-top: 1px solid var(--border-dim); }
.manifesto-inner { max-width: 860px; margin: 0 auto; }
.manifesto-label { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 24px; }
.manifesto-quote { font-family: var(--font-head); font-size: clamp(20px,2.5vw,30px); font-weight: 600; color: var(--text); line-height: 1.35; border-left: 3px solid var(--amber); padding-left: 28px; margin-bottom: 32px; }
.manifesto-body { font-size: 17px; color: var(--text-dim); line-height: 1.75; font-weight: 300; padding-left: 31px; }

/* FACTORY CLOSING */
.factory { padding: 100px 48px; background: var(--surface); text-align: center; }
.factory-inner { max-width: 760px; margin: 0 auto; }
.factory-title { font-family: var(--font-head); font-size: clamp(28px,3.8vw,52px); font-weight: 800; color: var(--text); line-height: 1.15; margin-bottom: 24px; }
.factory-body { font-size: 18px; color: var(--text-dim); line-height: 1.65; font-weight: 300; }

/* FOOTER */
.footer { padding: 48px; border-top: 1px solid var(--border-dim); }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { color: var(--amber); font-size: 16px; }
.footer-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.footer-tagline { font-size: 14px; color: var(--text-dim); font-weight: 300; }
.footer-meta { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.footer-sep { color: var(--border-dim); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 48px; }
  .monitor-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .hero { padding: 100px 20px 60px; }
  .stats-inner { flex-wrap: wrap; gap: 24px; }
  .stats-divider { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 28px; }
  .manifesto, .factory, .monitor, .features { padding: 60px 20px; }
  .hmi-metrics { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .hero-headline { font-size: 30px; }
  .hero-sub { font-size: 16px; }
  .monitor-grid { grid-template-columns: 1fr; }
}

/* ==========================================
   AUTOMATIZIONI:FAST — Electric blue variant
   ========================================== */

:root {
  --blue: #0066ff;
  --blue-bright: #3d8bff;
  --blue-dim: rgba(0,102,255,0.12);
  --blue-glow: rgba(0,102,255,0.25);
}

/* :FAST overrides — all sections */
.fast-body {
  --accent: var(--blue);
  --accent-dim: var(--blue-dim);
  --accent-glow: var(--blue-glow);
  --grid-color: rgba(0,102,255,0.04);
  --amber: var(--blue);
}

/* NAV :FAST */
.fast-nav {
  border-bottom-color: rgba(0,102,255,0.15);
}
.fast-nav .nav-dot {
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
}
.fast-nav .nav-logo { color: var(--blue); }

/* HERO :FAST */
.fast-hero {
  background: #020c1a;
}
.fast-hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,102,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,102,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 20%, rgba(0,0,0,0.3) 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 20%, rgba(0,0,0,0.3) 80%, transparent 100%);
  pointer-events: none;
}
.fast-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 120px 48px 80px;
}
.fast-hero-left { display: flex; flex-direction: column; gap: 28px; }
.fast-hero-tag { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.fast-tag-line { display: block; width: 32px; height: 2px; background: var(--blue); }
.fast-hero-headline {
  font-family: var(--font-head);
  font-size: clamp(34px,4.2vw,56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
}
.fast-headline-accent { color: var(--blue); }
.fast-hero-sub { font-size: 18px; color: var(--text-dim); line-height: 1.65; max-width: 460px; font-weight: 300; }
.fast-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: #fff;
  padding: 14px 28px;
  border-radius: 4px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: 0.02em;
  box-shadow: 0 0 24px var(--blue-glow);
  transition: background 0.2s, box-shadow 0.2s;
  width: fit-content;
}
.fast-cta:hover { background: var(--blue-bright); box-shadow: 0 0 36px var(--blue-glow); }
.fast-cta-arrow { font-size: 18px; }

/* HMI PANEL :FAST */
.fast-hmi-panel {
  background: #050f1e;
  border: 1px solid rgba(0,102,255,0.25);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0,102,255,0.08), inset 0 0 40px rgba(0,0,0,0.6);
}
.fast-hmi-header {
  background: #091628;
  border-bottom: 1px solid rgba(0,102,255,0.25);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fast-hmi-title { font-family: var(--font-head); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; color: var(--text-dim); text-transform: uppercase; }
.fast-hmi-header-right { display: flex; align-items: center; gap: 6px; }
.fast-hmi-blink { color: var(--blue); font-size: 14px; animation: blink 1s infinite; }
.fast-hmi-status-text { font-family: var(--font-head); font-size: 9px; font-weight: 700; letter-spacing: 0.16em; color: var(--blue); }
.fast-hmi-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.fast-hmi-metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.fast-hmi-metric { background: #091628; border: 1px solid rgba(0,102,255,0.15); border-radius: 4px; padding: 12px; }
.fast-hmi-metric-label { font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.fast-hmi-metric-value { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 2px; }
.fast-hmi-metric-value.blue { color: var(--blue); }
.fast-hmi-unit { font-size: 15px; }
.fast-hmi-metric-unit { font-size: 10px; color: var(--text-muted); margin-bottom: 8px; }
.fast-hmi-bar { height: 3px; background: #091628; border-radius: 2px; overflow: hidden; }
.fast-hmi-bar-fill { height: 100%; background: var(--blue); border-radius: 2px; transition: width 1.2s ease; }
.fast-hmi-log { display: flex; flex-direction: column; }
.fast-hmi-log-line { display: flex; gap: 10px; font-size: 11px; font-family: 'IBM Plex Mono', 'Courier New', monospace; padding: 5px 0; border-bottom: 1px solid rgba(0,102,255,0.08); }
.fast-hmi-log-line:last-child { border-bottom: none; }
.fast-hmi-ts { color: var(--text-muted); min-width: 60px; flex-shrink: 0; }
.fast-hmi-ok { color: var(--text-dim); }
.fast-hmi-badge { font-size: 9px; font-weight: 600; letter-spacing: 0.1em; color: var(--text-muted); background: #091628; border: 1px solid rgba(0,102,255,0.15); border-radius: 2px; padding: 3px 8px; text-transform: uppercase; }

/* WHY US (Perché Noi) :FAST */
.fast-why { padding: 100px 48px; background: #061020; border-top: 1px solid rgba(0,102,255,0.1); }
.fast-why-inner { max-width: 1280px; margin: 0 auto; }
.fast-why-label { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); margin-bottom: 20px; }
.fast-why-title { font-family: var(--font-head); font-size: clamp(28px,3.5vw,46px); font-weight: 800; color: var(--text); line-height: 1.1; margin-bottom: 64px; }
.fast-why-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: rgba(0,102,255,0.1); border: 1px solid rgba(0,102,255,0.1); border-radius: 4px; overflow: hidden; }
.fast-why-card { background: #081428; padding: 40px 32px; display: flex; flex-direction: column; gap: 14px; }
.fast-why-icon { font-size: 32px; line-height: 1; }
.fast-why-card-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--text); }
.fast-why-card-body { font-size: 15px; color: var(--text-dim); line-height: 1.7; font-weight: 300; }
.fast-check { color: var(--blue); font-weight: 700; }

/* CTA :FAST */
.fast-cta-section { padding: 100px 48px; background: var(--surface); text-align: center; border-top: 1px solid rgba(0,102,255,0.1); }
.fast-cta-inner { max-width: 720px; margin: 0 auto; }
.fast-cta-headline { font-family: var(--font-head); font-size: clamp(26px,3.5vw,48px); font-weight: 800; color: var(--text); line-height: 1.15; margin-bottom: 20px; }
.fast-cta-sub { font-size: 17px; color: var(--text-dim); line-height: 1.65; font-weight: 300; margin-bottom: 40px; }
.fast-cta-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--blue); color: #fff; padding: 16px 36px; border-radius: 4px; font-family: var(--font-head); font-weight: 700; font-size: 16px; text-decoration: none; letter-spacing: 0.02em; box-shadow: 0 0 32px var(--blue-glow); transition: background 0.2s, box-shadow 0.2s; width: fit-content; margin: 0 auto; }
.fast-cta-btn:hover { background: var(--blue-bright); box-shadow: 0 0 48px var(--blue-glow); }
.fast-cta-note { margin-top: 16px; font-size: 13px; color: var(--text-muted); }

/* FOOTER :FAST */
.fast-footer { padding: 40px 48px; border-top: 1px solid rgba(0,102,255,0.1); }
.fast-footer-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.fast-footer-brand { display: flex; align-items: center; gap: 10px; }
.fast-footer-logo { color: var(--blue); font-size: 16px; }
.fast-footer-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.fast-footer-meta { font-size: 12px; color: var(--text-muted); }

/* RESPONSIVE :FAST */
@media (max-width: 900px) {
  .fast-hero-content { grid-template-columns: 1fr; gap: 48px; }
  .fast-why-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .fast-hero-content { padding: 100px 20px 60px; }
  .fast-why, .fast-cta-section { padding: 60px 20px; }
  .fast-footer { padding: 40px 20px; }
  .fast-why-grid { grid-template-columns: 1fr; }
  .fast-hmi-metrics { grid-template-columns: 1fr; }
  .fast-footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .fast-hero-headline { font-size: 28px; }
  .fast-hero-sub { font-size: 16px; }
}