/* niccolopodda.it — stile. Pensato prima per telefono.
   Nessun font esterno: si usano quelli già presenti sul dispositivo. */

:root {
  --bg: #f7f5f0;
  --bg-alt: #efece4;
  --text: #1d2420;
  --muted: #5a645e;
  --accent: #1f5c46;
  --accent-text: #ffffff;
  --line: #d9d5ca;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141917;
    --bg-alt: #1b211e;
    --text: #ecebe6;
    --muted: #a3ada7;
    --accent: #7fcfae;
    --accent-text: #10201a;
    --line: #2e3733;
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Tipografia ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 7vw, 3rem); letter-spacing: -0.01em; margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.1rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ---------- Barra in alto ---------- */

.topbar {
  padding: 1.1rem 1.25rem;
  max-width: 44rem;
  margin: 0 auto;
}

.brand {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

/* ---------- Pulsante ---------- */

.btn {
  display: inline-block;
  max-width: 100%;
  padding: 0.9rem 1.6rem;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: opacity 0.15s;
}

.btn:hover { opacity: 0.88; }

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Sezioni ---------- */

.hero { padding: 3.5rem 0 4.5rem; }

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.section.alt { background: var(--bg-alt); }

/* L'idea in tre punti */

.points {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: punto;
  display: grid;
  gap: 2rem;
}

.points li {
  counter-increment: punto;
  padding-left: 3.25rem;
  position: relative;
}

.points li::before {
  content: counter(punto);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 600;
  display: grid;
  place-items: center;
  line-height: 1;
}


/* Cosa faccio */

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.4rem 1.25rem;
}

/* "Fonti e metodo" sotto ogni punto (apribile, senza JavaScript) */

.nota {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.nota summary {
  display: inline-block;
  padding: 0.35rem 0;
  cursor: pointer;
  list-style: none;
  text-decoration: underline dotted;
  text-underline-offset: 0.25em;
}

.nota summary::-webkit-details-marker { display: none; }

.nota summary::before { content: "+ "; }
.nota[open] summary::before { content: "− "; }

.nota summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.nota p {
  margin-top: 0.4rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--line);
  line-height: 1.55;
}

.nota a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.nota a:hover { text-decoration-thickness: 2px; }

/* Contatti */

.contact { text-align: center; padding: 4.5rem 0; }

.contact-note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer p { margin-bottom: 0.4rem; }

/* ---------- Schermi più larghi ---------- */

@media (min-width: 40rem) {
  .hero { padding: 6rem 0 7rem; }
  .section { padding: 5rem 0; }
}
