/* ===== Design tokens ===== */
:root {
  --bg: #0a0a0f;
  --bg-alt: #0e0e16;
  --surface: #14141f;
  --surface-2: #181826;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef0f6;
  --muted: #9aa0b4;
  --brand: #7c8cff;
  --brand-2: #33e0d0;
  --grad: linear-gradient(120deg, #7c8cff 0%, #33e0d0 100%);
  --radius: 16px;
  --maxw: 1140px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

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

/* Focus visibile per navigazione da tastiera (accessibilità) */
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: "Sora", "Inter", sans-serif; line-height: 1.15; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  background: var(--grad); color: #07070c; border: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease; box-shadow: 0 10px 30px -10px rgba(124, 140, 255, .6);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(51, 224, 208, .55); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn--ghost:hover { background: rgba(255,255,255,.04); }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--full { width: 100%; }

/* ===== Navbar ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 10, 15, .75); backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__name { font-family: "Sora", sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta { display: inline-flex; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { position: relative; padding: 168px 0 110px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.orb--1 { width: 520px; height: 520px; background: #4a55c9; top: -160px; left: -120px; }
.orb--2 { width: 460px; height: 460px; background: #178c83; top: 40px; right: -140px; opacity: .4; }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  opacity: .5;
}
.hero__inner { position: relative; z-index: 1; text-align: center; max-width: 880px; margin: 0 auto; }
.pill {
  display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--brand-2); border: 1px solid var(--border); background: rgba(255,255,255,.03); margin-bottom: 26px;
}
.hero__title { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; margin-bottom: 22px; }
.hero__sub { font-size: clamp(1rem, 2.2vw, 1.2rem); color: var(--muted); max-width: 640px; margin: 0 auto 36px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.stats { display: flex; gap: 44px; justify-content: center; flex-wrap: wrap; margin-top: 64px; }
.stat { text-align: center; }
.stat strong { display: block; font-family: "Sora", sans-serif; font-size: 2.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 14px; color: var(--muted); max-width: 160px; display: inline-block; }

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-alt); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 14px; }
.section__title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 700; }
.section__head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section__head .muted { margin-top: 14px; }
.lead { font-size: 1.18rem; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* ===== Cards (servizi) ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(124,140,255,.4); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(124,140,255,.12); color: var(--brand); margin-bottom: 20px;
}
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--muted); margin-bottom: 18px; }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; font-size: 14.5px; color: #c7cbdb; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand-2); font-weight: 700; }

/* ===== Steps (metodo) ===== */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; position: relative; }
.step__num { font-family: "Sora", sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--brand-2); letter-spacing: .05em; }
.step h3 { font-size: 1.2rem; margin: 12px 0 8px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ===== Projects ===== */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.proj {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 26px;
  transition: transform .25s, border-color .25s; min-height: 170px;
}
.proj:hover { transform: translateY(-5px); border-color: rgba(51,224,208,.35); }
.proj__tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--brand-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }
.proj h3 { font-size: 1.25rem; margin-bottom: 8px; }
.proj p { color: var(--muted); font-size: 15px; }
.proj--cta { background: linear-gradient(135deg, rgba(124,140,255,.14), rgba(51,224,208,.1)); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.proj--cta .btn { margin-top: auto; }

/* ===== Team ===== */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.member { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; text-align: center; }
.member__avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
  font-family: "Sora", sans-serif; font-weight: 800; font-size: 1.4rem; color: #07070c; background: var(--grad);
}
.member h3 { font-size: 1.2rem; }
.member__role { display: block; color: var(--brand-2); font-size: 14px; font-weight: 600; margin: 6px 0 12px; }
.member p { color: var(--muted); font-size: 14.5px; }

/* ===== Contact ===== */
.contact .section__title { text-align: left; }
.contact__info { list-style: none; margin: 28px 0 18px; display: grid; gap: 14px; }
.contact__info li { display: flex; gap: 16px; align-items: baseline; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.contact__info span { color: var(--muted); min-width: 70px; font-size: 14px; }
.note { font-size: 13.5px; color: var(--muted); font-style: italic; }

.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; display: grid; gap: 18px; box-shadow: var(--shadow); }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field textarea {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 13px 15px;
  color: var(--text); font: inherit; font-size: 15px; transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field textarea { resize: vertical; }
.form__hint { font-size: 12.5px; color: var(--muted); text-align: center; }
.form__status { font-size: 14px; text-align: center; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); }
.form__status--success { color: var(--brand-2); border-color: rgba(51,224,208,.4); background: rgba(51,224,208,.08); }
.form__status--error { color: #ff9b9b; border-color: rgba(255,107,107,.4); background: rgba(255,107,107,.08); }

/* ===== Footer ===== */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 56px 0 28px; }
.footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a { color: var(--muted); font-size: 15px; transition: color .2s; }
.footer__links a:hover { color: var(--text); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: 14px; color: var(--muted); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .cards, .steps, .projects, .team { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .nav__links.show {
    display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(10,10,15,.97); backdrop-filter: blur(14px); padding: 24px; gap: 20px; border-bottom: 1px solid var(--border);
  }
  .cards, .steps, .projects, .team { grid-template-columns: 1fr; }
  .stats { gap: 28px; }
  .section { padding: 72px 0; }
  .hero { padding: 130px 0 80px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
