/* EC Web Solution — stile del sito
   Nessun font esterno: si usa lo stack di sistema (niente chiamate a Google Fonts, meglio per GDPR e velocità). */

:root {
  --bg: #0b1020;
  --bg-alt: #10172b;
  --surface: #151d35;
  --border: #243055;
  --text: #e7ebf5;
  --muted: #9aa5c0;
  --accent: #4f8cff;
  --accent-2: #36d6b0;
  --radius: 14px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- bottoni ---------- */
.btn {
  display: inline-block;
  padding: .8em 1.4em;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  border: 1px solid var(--accent);
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: transform .15s, background .15s;
}
.btn:hover { text-decoration: none; background: #3c7af0; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { padding: .45em 1em; font-size: .92rem; }

/* ---------- navigazione ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 32, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: .6em; color: var(--text); font-weight: 750; }
.logo:hover { text-decoration: none; }
.logo-mark {
  font-family: var(--mono); font-size: .85rem;
  padding: .25em .5em; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1020; font-weight: 800;
}
.menu { display: flex; align-items: center; gap: 1.6em; }
.menu a { color: var(--muted); font-weight: 550; font-size: .97rem; }
.menu a:hover { color: var(--text); text-decoration: none; }
.menu a.btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* ---------- hero ---------- */
.hero {
  padding: 90px 0 80px;
  background:
    radial-gradient(700px 400px at 85% 10%, rgba(79,140,255,.18), transparent 60%),
    radial-gradient(500px 300px at 10% 90%, rgba(54,214,176,.10), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; font-weight: 700; color: var(--accent-2); margin-bottom: .8em;
}
.hl { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .97rem; }
.hero-points li { padding-left: 1.6em; position: relative; margin: .35em 0; }
.hero-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 800; }

.code-card {
  background: #0d1428; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  overflow: hidden;
}
.code-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: #111a33; }
.code-bar i { width: 11px; height: 11px; border-radius: 50%; background: #39445f; }
.code-bar i:nth-child(1) { background: #ff6b6b; }
.code-bar i:nth-child(2) { background: #ffd166; }
.code-bar i:nth-child(3) { background: #06d6a0; }
.code-bar span { margin-left: 10px; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.code-card pre { margin: 0; padding: 20px; overflow-x: auto; font-family: var(--mono); font-size: .86rem; line-height: 1.7; color: #cdd6f0; }
.c { color: #6c7a9c; } .k { color: #8fb4ff; } .f { color: #36d6b0; } .s { color: #ffcf7a; } .n { color: #ff9e7a; } .t { color: #d7a6ff; }

/* ---------- sezioni ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-lead { color: var(--muted); max-width: 40em; margin-bottom: 2.2em; }
.section h2 { margin-bottom: .9em; }
.section .section-lead { margin-top: -.6em; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card, .project {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: border-color .2s, transform .2s;
}
.card:hover, .project:hover { border-color: #3a4c80; transform: translateY(-2px); }
.card p, .project p { color: var(--muted); margin: 0; }
.icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(79,140,255,.12);
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* progetti */
.project { display: flex; flex-direction: column; gap: 14px; }
.project-head h3 { margin: .35em 0 0; font-size: 1.3rem; }
.tag {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-2); background: rgba(54,214,176,.1); padding: .25em .7em; border-radius: 99px;
}
.stack { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.stack li { font-family: var(--mono); font-size: .78rem; color: var(--text); border: 1px solid var(--border); padding: .2em .6em; border-radius: 6px; }
.link { font-weight: 650; margin-top: auto; }

/* tecnologie */
.tech-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tech-group h3 { font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.chips li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .55em .9em; font-weight: 600; }

/* metodo */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { border-top: 2px solid var(--accent); padding-top: 18px; }
.steps p { color: var(--muted); margin: 0; }
.step-n { font-family: var(--mono); color: var(--accent); font-weight: 700; display: block; margin-bottom: 8px; }

/* contatti */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; gap: 16px; }
.contact-list span { color: var(--muted); min-width: 60px; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
.opt { color: var(--muted); font-weight: 400; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: .7em .9em;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin: 6px 0 20px; }
.check input { width: auto; margin-top: .3em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: var(--accent-2); }
.form-status.err { color: #ff8080; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 32px 0; font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer p { margin: 0; }
.muted { color: var(--muted); }
.todo { background: #ffd16633; color: #ffd166; padding: 0 .3em; border-radius: 4px; }

/* pagina privacy */
.doc { max-width: 760px; padding: 60px 20px 90px; margin: 0 auto; }
.doc h1 { font-size: 2rem; }
.doc h2 { font-size: 1.25rem; margin-top: 1.8em; }
.doc p, .doc li { color: #c6cde0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .tech-groups, .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .menu {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 20px 20px;
  }
  .menu.open { display: flex; }
  .menu a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .menu a.btn { margin-top: 12px; text-align: center; border-bottom: 0; }
  .hero { padding: 56px 0; }
  .section { padding: 64px 0; }
  .grid-3, .grid-2, .tech-groups, .steps { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .wrap { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
