/* ============================================
   HumanQ — Homepage Stylesheet
   Tech-product modern style
   ============================================ */

/* === 1. Design Tokens === */
:root {
  /* Background */
  --bg: #0A0E14;
  --surface-1: #11161F;
  --surface-2: #161D2B;
  --surface-3: #1E2638;

  /* Borders */
  --border: rgba(255, 255, 255, .06);
  --border-strong: rgba(255, 255, 255, .12);

  /* Text */
  --text: #F4F6FA;
  --text-mute: #9CA6B8;
  --text-dim: #5E6878;

  /* Accent — blu elettrico */
  --accent: #4F8BFF;
  --accent-bright: #6EA0FF;
  --accent-dim: rgba(79, 139, 255, .15);
  --accent-glow: rgba(79, 139, 255, .25);

  /* Status colors */
  --green: #34D399;
  --amber: #FBBF24;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Layout */
  --max-width: 1240px;
  --gutter: 32px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
}

/* === 2. Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

img { max-width: 100%; display: block; }

/* === 3. Layout === */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* === 4. Navigation === */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 14, 20, .7);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}

.nav-links a:hover { color: var(--text); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  transition: all .2s;
}

.lang-btn:hover { color: var(--text-mute); }

.lang-btn.active {
  background: var(--accent);
  color: var(--bg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-secondary {
  background: var(--surface-1);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-mute);
  padding: 10px 0;
}

.btn-ghost:hover { color: var(--accent); }

html[lang="it"] [data-lang="en"] { display: none; }
html[lang="en"] [data-lang="it"] { display: none; }

/* === 5. Hero === */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mute);
  margin-bottom: 32px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.hero-title {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.05;
  margin-bottom: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #A78BFA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--text-mute);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* === 6. Stats row === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 80px auto 0;
  padding-top: 60px;
  border-top: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 6px;
}

.stat-value .unit {
  color: var(--accent);
  font-size: .7em;
}

.stat-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

/* === 7. Sections === */
section {
  padding: 100px 0;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-lead {
  font-size: 17px;
  color: var(--text-mute);
  line-height: 1.6;
}

/* === 8. EQM Platform Showcase === */
.eqm-showcase {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 56px;
  margin-top: 48px;
  position: relative;
  overflow: hidden;
}

.eqm-showcase::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 60%);
  pointer-events: none;
}

.eqm-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.eqm-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: .1em;
}

.eqm-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.eqm-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 24px;
}

.eqm-desc {
  font-size: 16px;
  color: var(--text-mute);
  line-height: 1.7;
  margin-bottom: 32px;
}

.eqm-features {
  list-style: none;
  display: grid;
  gap: 14px;
  margin-bottom: 32px;
}

.eqm-features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--text);
}

.eqm-features li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Code/terminal mockup */
.eqm-visual {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .4);
}

.eqm-visual-bar {
  background: var(--surface-2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.eqm-visual-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.eqm-visual-bar .dot:nth-child(1) { background: #FF5F57; }
.eqm-visual-bar .dot:nth-child(2) { background: #FEBC2E; }
.eqm-visual-bar .dot:nth-child(3) { background: #28C840; }

.eqm-visual-bar .title {
  margin-left: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.eqm-visual-body {
  padding: 24px;
  color: var(--text-mute);
  line-height: 1.8;
  min-height: 280px;
}

.eqm-visual-body .comment { color: var(--text-dim); }
.eqm-visual-body .keyword { color: #C792EA; }
.eqm-visual-body .string { color: var(--green); }
.eqm-visual-body .accent { color: var(--accent-bright); }
.eqm-visual-body .number { color: var(--amber); }

.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* === 9. Pillars Grid (cards moderne) === */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.pillar {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}

.pillar:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
}

.pillar-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 12px;
}

.pillar-desc {
  font-size: 14px;
  color: var(--text-mute);
  line-height: 1.6;
}

/* === 10. Applications (alternating layout) === */
.app-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 100px;
}

.app-block:last-child { margin-bottom: 0; }

.app-block.reverse { grid-template-columns: 1fr 1fr; direction: rtl; }
.app-block.reverse > * { direction: ltr; }

.app-content .section-tag { margin-bottom: 12px; }

.app-content h3 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.app-content p {
  font-size: 16px;
  color: var(--text-mute);
  line-height: 1.7;
  margin-bottom: 24px;
}

.app-bullets {
  list-style: none;
  display: grid;
  gap: 12px;
}

.app-bullets li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
  align-items: flex-start;
}

.app-bullets li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
}

.app-visual {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.app-visual svg {
  width: 100%;
  height: auto;
  max-width: 320px;
}

/* === 11. Ecosystem Strip === */
.ecosystem {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.eco-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: all .3s;
}

.eco-card:hover {
  border-color: var(--accent);
}

.eco-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
  letter-spacing: .1em;
}

.eco-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 12px;
}

.eco-desc {
  font-size: 14px;
  color: var(--text-mute);
  line-height: 1.7;
}

/* === 12. Compliance === */
.compliance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.compliance-box {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
}

.compliance-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: .05em;
  font-weight: 500;
}

.compliance-name {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 600;
}

.compliance-desc {
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.6;
}

/* === 13. CTA Banner === */
.cta-banner {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-1) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
}

.cta-banner > * { position: relative; }

.cta-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.cta-sub {
  font-size: 17px;
  color: var(--text-mute);
  max-width: 520px;
  margin: 0 auto 32px;
}

/* === 14. Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 40px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-row a {
  color: var(--text-dim);
  text-decoration: none;
  margin-right: 16px;
  transition: color .2s;
}

.footer-row a:hover { color: var(--accent); }

/* === 15. Quantum field background (subtle) === */
.quantum-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .25;
}

.quantum-field span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: .3; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.4); }
}

/* === 16. Animations === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  animation: fadeUp .8s ease-out forwards;
}

.reveal-2 { animation-delay: .1s; }
.reveal-3 { animation-delay: .2s; }
.reveal-4 { animation-delay: .3s; }

/* === 17. Responsive === */
@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .ecosystem { grid-template-columns: 1fr; }
  .compliance { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .eqm-grid { grid-template-columns: 1fr; gap: 40px; }
  .eqm-showcase { padding: 40px; }
  .app-block { grid-template-columns: 1fr; gap: 32px; }
  .app-block.reverse { direction: ltr; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .nav-links { display: none; }
  .nav-right { gap: 8px; }
  .hero { padding: 60px 0; }
  section { padding: 60px 0; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 32px; }
  .pillars { grid-template-columns: 1fr; }
  .compliance { grid-template-columns: 1fr; }
  .eqm-showcase, .cta-banner { padding: 32px 24px; border-radius: var(--r-lg); }
  .app-visual { padding: 24px; min-height: 240px; }
}
