:root {
  --bg: #0b0b0e;
  --bg-elevated: #13131a;
  --bg-card: #17171f;
  --bg-card-hover: #1d1d27;
  --border: #27272f;
  --border-bright: #36363f;
  --text: #ededf0;
  --text-soft: #b6b6c0;
  --text-muted: #71717a;
  --accent: #818cf8;
  --accent-strong: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-glow: rgba(99, 102, 241, 0.32);
  --accent-hover: #a5b4fc;
  --success: #4ade80;
  --on-accent: #0b0b0e;

  --font-display: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  --container: 1180px;
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
  font-weight: 600;
}
h1 { font-size: clamp(2.6rem, 5.5vw, 4.4rem); font-weight: 700; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0; }

a { color: var(--text); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

img { display: block; max-width: 100%; height: auto; }
em { font-style: normal; font-weight: 600; color: var(--accent); }

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  background: var(--bg-elevated);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

/* ===== HEADER (sticky, frosted) ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem clamp(1.2rem, 4vw, 2.5rem);
  background: rgba(11, 11, 14, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.85rem; }
.brand:hover { color: var(--text); }
.logo { width: 38px; height: 38px; flex-shrink: 0; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.015em;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 1px;
}

.site-nav { display: flex; align-items: center; gap: 1.85rem; }
.site-nav a {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent-strong);
  color: var(--text) !important;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.18s;
}
.nav-cta:hover { background: var(--accent); color: var(--on-accent) !important; }

/* ===== TERMINAL TAGLINE (pre-hero) ===== */
.term {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2.5rem clamp(1.2rem, 4vw, 2.5rem) 0;
}
.term-line {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.45rem 1rem 0.45rem 0.65rem;
}
.term-line .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}
.term-line .prompt { color: var(--accent); }
.term-line .caret {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ===== HERO ===== */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.2rem, 4vw, 2.5rem) clamp(5rem, 10vw, 8rem);
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}
.hero-inner { max-width: 820px; }
.hero h1 { margin-bottom: 1.75rem; }
.hero h1 .accent { color: var(--accent); }

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.22rem);
  color: var(--text-soft);
  max-width: 62ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2.5rem 0 3rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  transition: all 0.18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--accent-strong);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--accent-strong);
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 36px -10px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: fit-content;
  overflow: hidden;
}
.hero-meta li {
  padding: 0.6rem 1.1rem;
  border-right: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-meta li:last-child { border-right: none; }
.hero-meta .marker { color: var(--accent); }

/* ===== SECTIONS ===== */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6.5rem) clamp(1.2rem, 4vw, 2.5rem);
}
.section-head { max-width: 720px; margin: 0 0 3rem; }
.section-head h2 { margin-bottom: 1rem; }
.section-lead { color: var(--text-muted); font-size: 1.05rem; }

/* ===== SERVIZI ===== */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.85rem 1.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.22s, background 0.22s, transform 0.22s;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.service-card:hover {
  border-color: var(--accent-strong);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}
.service-card:hover::before { opacity: 1; }

.service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.service-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.service-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.18rem 0.55rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.service-card h3 { color: var(--text); }
.service-card p { color: var(--text-soft); }

.service-list {
  list-style: none;
  padding: 1.15rem 0 0;
  margin: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.service-list li { color: var(--text-soft); position: relative; padding-left: 1.2rem; }
.service-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== PERCHÉ ME (inline, sobrio, niente banda) ===== */
.reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.reason {
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  transition: background 0.2s;
}
.reason:last-child { border-right: none; }
.reason:hover { background: var(--bg-card-hover); }
.reason-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.reason h3 { color: var(--text); }
.reason p { color: var(--text-soft); font-size: 0.96rem; }

@media (max-width: 800px) {
  .reasons { grid-template-columns: 1fr; }
  .reason { border-right: none; border-bottom: 1px solid var(--border); }
  .reason:last-child { border-bottom: none; }
}

/* ===== STACK (nuova sezione, sobrio) ===== */
.stack-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  margin: 1rem 0;
}
.stack-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2rem clamp(1.2rem, 4vw, 2.5rem);
}
.stack-head {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.stack-head::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--accent);
}
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
}
.stack-item {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-soft);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  transition: border-color 0.18s, color 0.18s;
}
.stack-item:hover { border-color: var(--accent-strong); color: var(--accent); }

/* ===== CHI SONO ===== */
.about {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent-strong);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.about-photo:hover::after { opacity: 1; }
.about-photo img {
  aspect-ratio: 1;
  object-fit: cover;
  filter: contrast(1.05);
}
.about-text h2 { margin-bottom: 1.25rem; }
.about-text p { margin-bottom: 1rem; color: var(--text-soft); }
.about-text .lead { color: var(--text); }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  transition: gap 0.2s;
}
.link-arrow:hover { gap: 0.7rem; color: var(--accent-hover); }
@media (max-width: 640px) {
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 220px; }
}

/* ===== CONTATTI ===== */
.section-contact {
  background: var(--bg-elevated);
  max-width: none;
  margin: 0;
  border-top: 1px solid var(--border);
}
.contact-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6rem) clamp(1.2rem, 4vw, 2.5rem);
}
.contact-inner h2 { margin-bottom: 1.25rem; max-width: 20ch; }
.contact-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: all 0.2s;
}
.contact-card:hover {
  border-color: var(--accent-strong);
  transform: translateY(-2px);
  color: inherit;
}
.contact-card-static:hover { transform: none; border-color: var(--border); cursor: default; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.contact-card strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.faq-item:hover { border-color: var(--border-bright); }
.faq-item[open] { border-color: var(--accent-strong); background: var(--bg-card-hover); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  letter-spacing: -0.015em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.35rem;
  color: var(--accent);
  font-weight: 400;
  line-height: 1;
  transition: transform 0.25s ease, color 0.2s;
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent-hover);
}
.faq-item p {
  padding: 0 1.5rem 1.4rem;
  color: var(--text-soft);
  font-size: 0.96rem;
  margin: 0;
  line-height: 1.65;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2rem clamp(1.2rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.footer-brand span { color: var(--text-muted); font-size: 0.72rem; letter-spacing: 0.04em; }
.footer-status {
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-soft);
}
.footer-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.footer-legal { display: flex; flex-direction: column; gap: 0.2rem; text-align: center; }
.footer-legal em { color: var(--text-muted); font-weight: 500; }
.footer-links { display: flex; justify-content: flex-end; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-status, .footer-links { justify-content: center; }
  .footer-legal { text-align: center; }
  .site-header-inner { flex-wrap: wrap; gap: 1rem; }
  .site-nav { width: 100%; justify-content: space-between; gap: 1rem; font-size: 0.88rem; }
  .brand-tag { display: none; }
  .term-line { font-size: 0.78rem; }
}
