/* ==========================================================================
   Studio Emanuela Sequi — one page
   Stile istituzionale ispirato ai colori della Fondazione Consulenti del
   Lavoro: verde acqua #14a795, grigio-blu #222a33, bianco. Font: Lato.
   ========================================================================== */

/* ---------- Font (self-hosted, subset latin) ---------- */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/lato-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/lato-700.woff2') format('woff2');
}

/* ---------- Variabili ---------- */
:root {
  --brand: #14a795;
  --brand-bright: #45c9b8;
  --brand-dark: #0d7a6d;
  --brand-deep: #096157;
  --green: #2e9e5b;
  --green-deep: #1e7a45;
  --ink: #222a33;
  --ink-soft: #4a5560;
  --muted: #6b7680;
  --line: #e4e7ea;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --dark: #1c232b;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(28, 35, 43, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 35, 43, 0.1);
  --shadow-lg: 0 24px 60px rgba(28, 35, 43, 0.16);
  --header-h: 76px;
  --container: 1120px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Lato', 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 700;
}

h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; margin-bottom: 0.35em; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 0; }
li { list-style: none; }

a {
  color: var(--brand-deep);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--brand); }

img { max-width: 100%; height: auto; }
svg { display: block; }

address { font-style: normal; }

/* ---------- Accessibilità ---------- */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.container-narrow { max-width: 840px; }

.section {
  padding: 92px 0;
}
.section-soft { background: var(--bg-soft); }

/* Offset per l'ancoraggio con header sticky */
[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}
.section-head h2 { margin-bottom: 0.35em; }
.section-intro {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-dark);
}
.eyebrow-light { color: #d9f6f1; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-solid {
  background: var(--brand-dark);
  color: #fff;
}
.btn-solid:hover {
  background: var(--brand-deep);
  color: #fff;
}

.btn-outline {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover {
  background: var(--ink);
  color: #fff;
}

.btn-block { width: 100%; }

/* ---------- Header / navigazione ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: var(--brand-dark);
  color: #fff;
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 24px; height: 24px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.05rem; letter-spacing: 0.01em; }
.brand-text span { font-size: 0.74rem; color: var(--muted); font-weight: 400; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.site-nav a:not(.btn) {
  display: block;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.site-nav a:not(.btn):hover { color: var(--brand-deep); background: var(--bg-soft); }
.site-nav a.active { color: var(--brand-dark); background: rgba(20, 167, 149, 0.08); }

.nav-cta { padding: 10px 20px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, #f4faf8 0%, #ffffff 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 64px;
}

.hero-copy .lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
.hero-note::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
}

.hero-visual {
  margin: 0;
}
.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.hero-visual figcaption {
  margin-top: 12px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-align: center;
}

.trust-bar {
  border-top: 1px solid var(--line);
  background: #fff;
}
.trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.trust-inner img { height: 67px; width: auto; }
.trust-inner p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }
.trust-inner a { font-weight: 700; }

/* ---------- Statistiche ---------- */
.stats {
  background: var(--dark);
  color: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 44px;
  padding-bottom: 44px;
  text-align: center;
}
.stat-value {
  display: block;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--brand-bright);
  line-height: 1.1;
}
.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #c4ccd4;
}

/* ---------- Card servizi ---------- */
.service-group { margin-top: 56px; }
.service-group:first-of-type { margin-top: 0; }

.group-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.group-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-dark);
}
.group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(20, 167, 149, 0.35);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: rgba(20, 167, 149, 0.1);
  color: var(--brand-dark);
}
.card-icon svg { width: 26px; height: 26px; }

.card h4, .card h3 { margin-bottom: 0.3em; }
.card p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }

.card-feature { padding: 32px 28px; }

/* Card in evidenza (perizie CTP) */
.card-highlight {
  position: relative;
  background: linear-gradient(180deg, #f2fbf9 0%, #e9f7f4 100%);
  border-color: rgba(20, 167, 149, 0.45);
  box-shadow: var(--shadow-md);
}
.card-highlight:hover {
  border-color: var(--brand-dark);
  box-shadow: var(--shadow-lg);
}
.card-highlight .card-icon {
  background: var(--brand-dark);
  color: #fff;
}
.card-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card-highlight p { color: var(--ink); }
.card-highlight p strong { color: var(--brand-deep); }

/* Nota per i lavoratori (accento ridotto) */
.target-note {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 18px 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-soft);
}
.target-note svg {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  color: var(--brand);
}
.target-note p { margin: 0; font-size: 0.95rem; }
.target-note strong { color: var(--ink); }

/* ---------- Chi siamo ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: start;
}
.about-grid p { color: var(--ink-soft); }

.check-list li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
  color: var(--ink-soft);
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(20, 167, 149, 0.12);
}
.check-list li::after {
  content: '✓';
  position: absolute;
  left: 4px;
  top: 3px;
  width: 14px;
  height: 14px;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 14px;
  text-align: center;
}

.credential {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--dark);
  color: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.credential img {
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 22px;
  width: 100%;
  height: auto;
}
.credential h3 { color: #fff; font-size: 1.15rem; }
.credential p { color: #c4ccd4; margin-bottom: 18px; }
.credential ul { margin: 0; }
.credential li {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8ebee;
  font-size: 0.95rem;
}
.credential li span { color: var(--brand-bright); font-weight: 700; margin-right: 8px; }

/* ---------- Metodo ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  counter-reset: step;
}
.step {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 24px 24px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  position: absolute;
  top: -14px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.step h3 { margin-top: 8px; }
.step p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- Perché sceglierci ---------- */
.why {
  background: linear-gradient(120deg, var(--brand-deep) 0%, var(--brand-dark) 100%);
  color: #fff;
}
.why-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.why h2 { color: #fff; }
.why-list { margin: 0; }
.why-list li {
  position: relative;
  padding: 10px 0 10px 38px;
  font-size: 1.02rem;
  font-weight: 400;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.why-list li:last-child { border-bottom: 0; }
.why-list li span {
  position: absolute;
  left: 0;
  top: 11px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(20, 167, 149, 0.1);
  color: var(--brand-dark);
  font-size: 1.3rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
  background: var(--brand-dark);
  color: #fff;
}
.faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--ink-soft);
}

/* ---------- Contatti ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: start;
}

.contact-list { margin: 28px 0 0; }
.contact-list li {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list strong { display: block; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.contact-list p, .contact-list address { margin: 0; color: var(--ink); font-size: 1.02rem; }
.contact-list a { font-weight: 700; }

.contact-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(20, 167, 149, 0.1);
  color: var(--brand-dark);
}
.contact-icon svg { width: 22px; height: 22px; }

/* ---------- Form ---------- */
.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field { margin-bottom: 16px; }

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field textarea { resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(20, 167, 149, 0.15);
}
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: var(--brand-deep);
}

.form-note {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.form-status { font-size: 0.9rem; font-weight: 700; color: var(--green-deep); margin: 10px 0 0; min-height: 1.4em; }
.form-status.error { color: var(--brand-deep); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: #c4ccd4;
  padding-top: 56px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand { color: #fff; font-size: 1.15rem; }
.footer-title {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 14px;
}
.footer-col p, .footer-col address { margin: 0 0 8px; font-size: 0.95rem; }
.footer-col a { color: #fff; font-weight: 700; }
.footer-col a:hover { color: var(--brand); }
.footer-logo {
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  max-width: 220px;
  height: auto;
  margin-bottom: 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-bottom p { margin: 0; font-size: 0.86rem; color: #9aa4ad; }

/* Striscia finale GDPR */
.gdpr-strip {
  background: #141a20;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 14px 24px;
  text-align: center;
}
.gdpr-strip p {
  margin: 0;
  font-size: 0.82rem;
  color: #8f9aa3;
}

/* ---------- Animazioni reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover, .btn:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .why-inner { grid-template-columns: 1fr; gap: 24px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .credential { position: static; }
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 12px 24px 20px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a:not(.btn) { padding: 12px 14px; border-radius: 10px; }
  .nav-cta { margin: 12px 0 0; display: block; text-align: center; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-2 { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
  .brand-text span { display: none; }
  .hero-inner { padding-top: 48px; padding-bottom: 48px; }
  .hero-actions .btn { width: 100%; }
  .contact-form { padding: 24px; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}
