/* NearbyScore — pagina Metodologia (statica, scrollabile).
   Token in css/tokens.css. Design ref: docs/design/nearbyscore_metodologia. */

body { min-height: 100%; }

a { color: inherit; }

/* ---- header --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 32px;
  background: var(--card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand svg { width: 24px; height: 24px; color: var(--teal); }
.site-nav { display: flex; gap: 6px; margin-left: 8px; }
.site-nav a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover { background: var(--track); color: var(--ink); }
.site-nav a.active { color: var(--teal); }
.site-header .spacer { flex: 1; }
.btn-map {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.btn-map:hover { background: var(--teal-dark); }

/* hamburger mobile (checkbox-hack): nascosti su desktop, attivati nel media query.
   Il checkbox è visually-hidden (resta focusabile da tastiera). */
.nav-toggle-cb { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--ink-soft);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--track); color: var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle-cb:focus-visible ~ .nav-toggle { outline: 2px solid var(--teal); outline-offset: 2px; }
.nav-map-link { display: none; } /* solo nel dropdown mobile */

/* ---- contenitore ---------------------------------------------------- */
main { max-width: 1080px; margin: 0 auto; padding: 0 24px 96px; }

.hero { text-align: center; padding: 72px 0 56px; }
.hero h1 {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hero p {
  max-width: 540px;
  margin: 18px auto 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---- tre card metodo ------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 20px 24px;
  box-shadow: var(--shadow-1);
}
.step-art {
  height: 180px;
  border-radius: 12px;
  background: linear-gradient(160deg, #f0fdfa 0%, #e6f2f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.step-art svg { width: 100%; height: 100%; }
.step h2 {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--teal-dark);
}
.step p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

/* ---- sezione scala score ------------------------------------------- */
.score-scale {
  margin-top: 56px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px 48px;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.score-scale h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.score-scale > p { margin-top: 8px; font-size: 15px; color: var(--ink-soft); }
.scale-bar { height: 12px; border-radius: 999px; margin: 28px 0 12px; }
.scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
}
.scale-ticks b {
  display: block;
  font: 500 14px/1.6 "Geist Mono", monospace;
  color: var(--ink);
}
.scale-ticks span { letter-spacing: 0.06em; text-transform: uppercase; }
.scale-ticks .t-mid { text-align: center; }
.scale-ticks .t-hi { text-align: right; }

/* ---- pesi categorie ------------------------------------------------- */
.weights { margin-top: 56px; }
.weights h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; text-align: center; }
.weights > p { max-width: 620px; margin: 8px auto 0; text-align: center; font-size: 15px; color: var(--ink-soft); }
.weight-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
}
.weight-row { display: flex; align-items: center; gap: 14px; }
.weight-name { width: 108px; font-size: 14px; font-weight: 500; flex: none; }
.weight-track { flex: 1; height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.weight-fill { display: block; height: 100%; border-radius: 999px; background: var(--teal); }
.weight-val { width: 20px; font: 500 14px/1 "Geist Mono", monospace; color: var(--ink-soft); text-align: right; }

/* ---- fonti dati ----------------------------------------------------- */
.sources { margin-top: 64px; text-align: center; }
.sources h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.source-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}
.source {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
}
.source-icon {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.source-icon svg { width: 28px; height: 28px; }
.source b { font-size: 15px; font-weight: 600; }
.source small { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-soft); }
.source .lic { color: var(--ink-faint); }

/* ---- footer --------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.footer-inner .fb-brand { font-size: 15px; font-weight: 600; }
.footer-inner p { margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* ---- responsive ----------------------------------------------------- */
@media (max-width: 860px) {
  .steps, .source-grid { grid-template-columns: 1fr; }
  .weight-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }

  /* nav -> dropdown sotto l'hamburger; btn-map confluisce nel menu */
  .nav-toggle { display: inline-flex; }
  .btn-map { display: none; }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    flex-direction: column;
    gap: 2px;
    min-width: 200px;
    margin: 0;
    padding: 6px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-el);
    box-shadow: var(--shadow-1);
  }
  .nav-toggle-cb:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 10px 14px; border-radius: var(--radius-el); }
  .nav-map-link { display: block; }
}
