/* =========================================================
   10993 Srl — Sito vetrina
   Design system derivato dal documento di analisi redesign
   ========================================================= */

:root {
  --primary: #1da84e;
  --primary-hover: #15803b;
  --primary-soft: rgba(29, 168, 78, 0.10);
  --bg-light: #ffffff;
  --bg-accent: #f4f9f5;
  --text-dark: #1a1a1a;
  --text-muted: #555555;
  --border: #e6ece7;
  --white: #ffffff;

  --font-title: 'Sora', 'Roboto', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 50px rgba(29, 168, 78, 0.18);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-h: 70px;
  --maxw: 1140px;
}

/* ---------- Reset di base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 10px); }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--ghost:hover { background: var(--primary-soft); transform: translateY(-2px); }
.btn--sm { padding: 10px 18px; font-size: .92rem; }
.btn--block { width: 100%; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s ease;
}
.navbar.is-scrolled { box-shadow: var(--shadow-sm); }
.navbar__inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: inline-flex; align-items: baseline; gap: 4px; font-family: var(--font-title); }
.brand__mark { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -0.04em; }
.brand__sub { font-size: .9rem; font-weight: 600; color: var(--text-muted); }
.brand--light .brand__mark { color: #fff; }
.brand--light .brand__sub { color: rgba(255,255,255,.7); }

.nav { display: flex; gap: 2rem; }
.nav a { font-weight: 500; color: var(--text-dark); position: relative; padding: 4px 0; }
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--primary); transition: width .25s ease;
}
.nav a:hover::after, .nav a.is-active::after { width: 100%; }

.navbar__actions { display: flex; align-items: center; gap: .75rem; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text-dark); border-radius: 2px; transition: var(--transition); }
.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); }

/* ---------- Sezioni ---------- */
.section { padding: 96px 0; }
.section--accent { background: var(--bg-accent); }
.section__head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section__head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section__intro { color: var(--text-muted); font-size: 1.08rem; }
.eyebrow {
  display: inline-block; font-weight: 600; font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: .75rem;
}
.hl { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 90px;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(29,168,78,.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-accent) 100%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
.hero__lead { font-size: 1.15rem; color: var(--text-muted); max-width: 36ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 1.5rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .92rem; color: var(--text-muted); font-weight: 500; }

/* Visual hero */
.hero__visual { position: relative; min-height: 380px; }
.orb {
  position: absolute; inset: 10% 5%; border-radius: 50%;
  background: conic-gradient(from 180deg, var(--primary), #46d07f, #1da84e, #46d07f, var(--primary));
  filter: blur(8px); opacity: .25;
  animation: float 9s ease-in-out infinite;
}
.glass-card {
  position: absolute; background: rgba(255,255,255,.75);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.9); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 18px 20px; width: 220px;
}
.glass-card__title { font-family: var(--font-title); font-weight: 700; margin: 8px 0 4px; font-size: 1.02rem; }
.glass-card__text { font-size: .85rem; color: var(--text-muted); margin: 0; }
.glass-card--1 { top: 8%; left: 0; animation: float 7s ease-in-out infinite; }
.glass-card--2 { top: 46%; right: 0; animation: float 8s ease-in-out infinite .6s; }
.glass-card--3 { bottom: 4%; left: 14%; width: auto; text-align: center; animation: float 6.5s ease-in-out infinite .3s; }
.big-stat { font-family: var(--font-title); font-weight: 800; font-size: 2rem; color: var(--primary); display: block; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--green { background: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft); }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---------- Statistiche ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 48px; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 20px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat__num { display: block; font-family: var(--font-title); font-weight: 800; font-size: 2.6rem; color: var(--primary); line-height: 1; }
.stat__label { display: block; margin-top: 12px; font-size: .95rem; color: var(--text-muted); }
.about-text { max-width: 800px; margin: 0 auto; text-align: center; font-size: 1.08rem; color: var(--text-muted); }
.about-text strong, .about-text em { color: var(--text-dark); }

/* ---------- Card servizi / documenti ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 34px 30px; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(29,168,78,.35); }
.card__icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 20px;
}
.card h3 { font-size: 1.3rem; }
.card > p { color: var(--text-muted); }
.card__list { margin: 4px 0 22px; display: grid; gap: 10px; }
.card__list li { position: relative; padding-left: 26px; font-size: .95rem; color: var(--text-dark); }
.card__list li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 700;
}
.card__link { margin-top: auto; color: var(--primary); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.card__link:hover { color: var(--primary-hover); gap: 10px; }

/* ---------- Documenti / download ---------- */
.doc-card { text-align: left; }
.doc-card .card__icon { background: var(--primary-soft); }
.doc-card__meta { font-size: .82rem; color: var(--text-muted); margin: -8px 0 16px; }

/* ---------- Numero 178 ---------- */
.num178__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.num178__info h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.timeline { display: grid; gap: 24px; margin-top: 32px; }
.timeline li { display: flex; gap: 18px; align-items: flex-start; }
.timeline__step {
  flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff;
  font-family: var(--font-title); font-weight: 700; display: grid; place-items: center;
}
.timeline h4 { margin: 4px 0 2px; font-size: 1.05rem; }
.timeline p { margin: 0; color: var(--text-muted); font-size: .95rem; }

.num178__form {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow-md);
}
.num178__form h3 { font-size: 1.4rem; margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; display: flex; flex-direction: column; }
.field label { font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px; background: #fbfdfb; color: var(--text-dark);
  transition: var(--transition); width: 100%; resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.field input.is-invalid, .field textarea.is-invalid { border-color: #d8442f; box-shadow: 0 0 0 4px rgba(216,68,47,.12); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text-muted); margin: 6px 0 18px; }
.checkbox input { margin-top: 4px; accent-color: var(--primary); }
.checkbox a { color: var(--primary); text-decoration: underline; }
.form-note { font-size: .8rem; color: var(--text-muted); margin: 12px 0 0; }
/* Honeypot anti-spam: fuori dallo schermo, invisibile agli utenti reali */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-feedback { margin: 14px 0 0; font-size: .95rem; font-weight: 600; }
.form-feedback.is-ok { color: var(--primary-hover); }
.form-feedback.is-err { color: #d8442f; }

/* ---------- Ethics CTA ---------- */
.ethics {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--primary), #16c059);
  border-radius: var(--radius-lg); padding: 44px 48px; color: #fff;
}
.ethics h2 { color: #fff; font-size: 1.7rem; }
.ethics p { color: rgba(255,255,255,.92); margin: 0; max-width: 50ch; }
.ethics .btn--ghost { color: #fff; border-color: #fff; }
.ethics .btn--ghost:hover { background: rgba(255,255,255,.16); }

/* ---------- Footer ---------- */
.footer { background: #0f1a13; color: rgba(255,255,255,.78); padding-top: 64px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer__desc { font-size: .92rem; max-width: 34ch; margin: 16px 0; }
.footer a:hover { color: var(--primary); }
.footer ul { display: grid; gap: 10px; font-size: .94rem; }
.footer address { font-style: normal; font-size: .94rem; line-height: 1.9; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); font-size: .82rem; font-weight: 700; transition: var(--transition);
}
.socials a:hover { background: var(--primary); color: #fff; }
.footer__legal { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; font-size: .82rem; }
.footer__legal .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer__legal p { margin: 0; color: rgba(255,255,255,.55); }

/* ---------- Torna su ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 46px; height: 46px;
  border-radius: 50%; border: none; background: var(--primary); color: #fff; font-size: 1.2rem;
  cursor: pointer; box-shadow: var(--shadow-md); transition: var(--transition); opacity: 0; transform: translateY(10px);
}
.to-top:not([hidden]) { opacity: 1; transform: translateY(0); }
.to-top:hover { background: var(--primary-hover); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { min-height: 320px; order: -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
  .num178__grid { grid-template-columns: 1fr; gap: 36px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .nav {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 8px 24px 20px;
    transform: translateY(-120%); transition: transform .3s ease; box-shadow: var(--shadow-md);
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--border); width: 100%; }
  .nav a::after { display: none; }
  .nav-toggle { display: flex; }
  .navbar__actions .btn { display: none; }
  .cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .ethics { padding: 32px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
