/* ===== ASAP – stile ===== */
:root {
  --bg: #0b0d10;
  --bg-alt: #111419;
  --surface: #161a20;
  --border: #252b33;
  --text: #e8ebef;
  --muted: #9aa3ae;
  --accent: #f5b83d;      /* luce della lampadina */
  --accent-2: #3ddc97;    /* verde PCB */
  --radius: 14px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.accent { color: var(--accent); }
.eyebrow {
  font-family: var(--mono);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent-2);
  margin-bottom: .8rem;
}
.eyebrow::before { content: "// "; opacity: .6; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.placeholder { color: #ff6b6b; font-family: var(--mono); font-size: .9em; }

/* ===== Bottoni ===== */
.btn {
  display: inline-block;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -8px rgba(245,184,61,.6); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--text); box-shadow: none; }
.btn--small { padding: .5rem 1.1rem; font-size: .9rem; }

/* ===== Navbar ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,16,.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand__text { font-family: var(--mono); font-weight: 600; letter-spacing: .2em; font-size: 1.05rem; }
.nav__menu { display: flex; align-items: center; gap: 1.8rem; }
.nav__menu a:not(.btn) { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .15s; }
.nav__menu a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: .5rem 1.25rem 1.25rem;
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a:not(.btn) { padding: .8rem 0; border-bottom: 1px solid var(--border); }
  .nav__menu .btn { margin-top: 1rem; text-align: center; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: clamp(5rem, 12vh, 9rem) 0 clamp(4rem, 10vh, 7rem); }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 20% 30%, transparent 0%, var(--bg) 75%);
}
.hero__inner { position: relative; z-index: 1; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 2.5rem; }
.hero__tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.hero__tags li {
  font-family: var(--mono); font-size: .8rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: .3rem .65rem;
  background: rgba(22,26,32,.7);
}

/* ===== Sezioni ===== */
.section { padding: clamp(4rem, 10vh, 6.5rem) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

/* Cards servizi */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); }
.card p { color: var(--muted); font-size: .95rem; }
.card__icon {
  width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(245,184,61,.1); margin-bottom: 1.2rem;
}
.card__icon svg, .contact__item svg {
  width: 24px; height: 24px; fill: none; stroke: var(--accent);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.ticks { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.ticks li { padding-left: 1.4rem; position: relative; margin-top: .4rem; }
.ticks li::before { content: "▸"; position: absolute; left: 0; color: var(--accent-2); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; counter-reset: s; }
.steps li { border-top: 2px solid var(--border); padding-top: 1.25rem; position: relative; }
.steps li::before {
  content: ""; position: absolute; top: -2px; left: 0; width: 40px; height: 2px; background: var(--accent);
}
.steps__n { font-family: var(--mono); color: var(--accent); font-size: .9rem; display: block; margin-bottom: .5rem; }
.steps p { color: var(--muted); font-size: .95rem; }

/* Progetti */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.project {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; background: linear-gradient(160deg, var(--surface), var(--bg));
}
.project p { color: var(--muted); font-size: .95rem; flex: 1; }
.project__tag { font-family: var(--mono); font-size: .75rem; color: var(--accent-2); margin-bottom: .6rem; display: block; }
.project__client { font-size: .85rem; color: var(--text); opacity: .8; border-top: 1px solid var(--border); padding-top: .8rem; }

/* Chi sono */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.about__text > p { color: var(--muted); }
.about__text strong { color: var(--text); }
.skills { margin: 2rem 0 0; display: grid; gap: .75rem; }
.skills div { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; border-bottom: 1px dashed var(--border); padding-bottom: .6rem; }
.skills dt { font-family: var(--mono); font-size: .85rem; color: var(--accent-2); }
.skills dd { margin: 0; }
.badge-card {
  background: #fff; color: #333; border-radius: var(--radius); padding: 2rem; text-align: center;
}
.badge-card img { margin: 0 auto 1rem; width: 230px; }
.badge-card p { margin: 0; font-size: .95rem; }
.badge-card__num { margin-top: .6rem !important; font-family: var(--mono); font-size: .85rem !important; }
.pub { margin-top: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.pub p { margin: 0; color: var(--muted); font-size: .92rem; }

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .skills div { grid-template-columns: 1fr; gap: .2rem; }
}

/* Contatti */
.contact { background: radial-gradient(ellipse at 80% 100%, rgba(245,184,61,.12), transparent 60%); }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.contact__list { display: grid; gap: .9rem; }
.contact__item {
  display: flex; align-items: center; gap: 1rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; transition: border-color .2s, transform .2s;
}
a.contact__item:hover { border-color: var(--accent); transform: translateX(4px); }
.contact__item span { display: flex; flex-direction: column; word-break: break-word; }
.contact__item small { font-family: var(--mono); color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.contact__item svg { flex-shrink: 0; }
@media (max-width: 860px) { .contact__inner { grid-template-columns: 1fr; } }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 2.5rem 0; font-size: .88rem; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; }
.footer__logo { width: 44px; height: auto; }
.footer__info { flex: 1; min-width: 220px; }
.footer__info p, .footer__legal p { margin: 0 0 .2rem; }
.footer__info strong { color: var(--text); }
.footer__legal { text-align: right; }
.footer__legal a { color: var(--text); }
@media (max-width: 600px) { .footer__legal { text-align: left; } }

/* Animazioni comparsa */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Pagina privacy */
.legal { padding: 4rem 0; max-width: 760px; }
.legal h2 { font-size: 1.3rem; margin-top: 2rem; }
.legal p, .legal li { color: var(--muted); }
.nav__back a { color: var(--muted); text-decoration: none; }
.nav__back a:hover { color: var(--text); }

/* Selettore lingua */
.nav__menu a.lang {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .08em;
  border: 1px solid var(--border); border-radius: 6px; padding: .2rem .5rem;
}
.nav__menu a.lang:hover { border-color: var(--text); }
@media (max-width: 760px) { .nav__menu a.lang { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: .8rem 0; } }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: .5rem; }
.notfound .btn { justify-self: center; margin-top: 1rem; }
