:root {
  --yellow: #FFD400;
  --ink: #111111;
  --cream: #FFFBEA;
  --surface: #FFFFFF;
  --text: #111111;
  --text-2: #4A4533;
  --line: #111111;
  --bar-bg: #111111;
  --bar-fg: #FFFBEA;
  --bar-on: #FFD400;
  --hero-bg: #FFD400;
  --hero-fg: #111111;
  --accent: #FFD400;
  --line-w: 2px;
  --wave: #111111;
  --band-bg: #111111;
  --band-fg: #FFFBEA;
  --band-line: #3A3A3A;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #07090C;
    --surface: #12171D;
    --text: #F2E8D9;
    --text-2: #8F8570;
    --line: #242B33;
    --bar-bg: #12171D;
    --bar-fg: #8F8570;
    --bar-on: #FFB020;
    --hero-bg: #12171D;
    --hero-fg: #F2E8D9;
    --accent: #FFB020;
    --line-w: 1px;
    --wave: #FFB020;
    --band-bg: #12171D;
    --band-fg: #F2E8D9;
    --band-line: #242B33;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--cream);
}

.wrap {
  max-width: 67.5rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* === Bar nera === */
.bar {
  background: var(--bar-bg);
}

.bar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 900;
  font-size: 1.25rem;
  color: #FFFBEA;
  text-decoration: none;
}

.brand-icon {
  border-radius: 8px;
}

.lang {
  border: 2px solid var(--bar-fg);
  color: var(--bar-fg);
  padding: 0.25rem 0.85rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

nav a {
  color: var(--bar-fg);
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 0.85rem 0;
  border-bottom: 3px solid transparent;
}

nav a[aria-current="page"] {
  color: var(--bar-on);
  border-bottom-color: var(--bar-on);
}

/* === Hero === */
.hero {
  background: var(--hero-bg);
  color: var(--hero-fg);
  padding: 2rem 0 1.25rem;
}

.page-home .hero {
  padding-top: 4.5rem;
}

.hero-icon {
  border-radius: 17px;
  border: 3px solid var(--ink);
  display: block;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 1rem;
}

@media (min-width: 48rem) {
  .hero h1 {
    font-size: 3rem;
  }
}

.page-home h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.02;
  max-width: 50rem;
  text-wrap: balance;
}

.lead {
  font-size: 1.3rem;
  max-width: 32.5rem;
}

/* === Wave === */
.wave {
  display: block;
}

.wave path {
  fill: none;
  stroke: var(--wave);
  stroke-width: 6;
  stroke-linecap: round;
}

/* === Main === */
main {
  padding: 1.5rem 1.25rem 3rem;
}

.page-home main {
  padding: 0;
}

/* === Article card (pagine di testo) === */
.card {
  background: var(--surface);
  border: var(--line-w) solid var(--line);
  border-radius: 20px;
  padding: 1.25rem 1.4rem;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card.note {
  background: var(--ink);
  color: #FFFBEA;
  border: 2px solid var(--ink);
}

.card.note h2 {
  color: var(--yellow);
}

.card.note a {
  color: #FFFBEA;
}

@media (prefers-color-scheme: dark) {
  .card.note {
    border: 2px solid var(--accent);
  }
}

.card.cta {
  background: var(--accent);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.prose {
  max-width: 44rem;
}

/* === Typography === */
h2 {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

/* === Links === */
a {
  color: var(--text);
  text-decoration-thickness: 3px;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

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

/* === Lists === */
ul {
  list-style: none;
  padding-left: 0;
}

li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
}

li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border: 2px solid var(--ink);
}

/* === Band (presentazione) === */
.band {
  padding: 3rem 0;
}

@media (min-width: 48rem) {
  .band {
    padding: 5rem 0;
  }
}

.band.plain + .band.plain {
  padding-top: 0;
}

.two {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .two {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 3.5rem;
    align-items: start;
  }
}

.band.plain h2,
.band.dark h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.25rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}

.band.dark {
  background: var(--band-bg);
  color: var(--band-fg);
}

.band.dark h2 {
  color: var(--accent);
}

.band.dark a {
  color: inherit;
}

.band.cta {
  background: var(--accent);
  color: var(--ink);
}

.band.note {
  background: var(--band-bg);
  color: var(--band-fg);
  border-top: 2px solid var(--band-line);
}

.band.note a {
  color: inherit;
}

.band.cta h2,
.band.note h2 {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}

.band.note h2 {
  color: var(--accent);
}

.band.cta .band-body p {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  max-width: 40rem;
  margin: 0;
}

.band.note .band-body p {
  max-width: 51rem;
  margin: 0;
}

.band-body > p:only-child {
  font-size: 1.3rem;
  margin: 0;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rows li {
  padding: 1rem 0;
  border-top: 2px solid var(--line);
  margin: 0;
}

.rows li::before {
  display: none;
}

.rows li:last-child {
  border-bottom: 2px solid var(--line);
}

.band.dark .rows li {
  border-top-color: var(--band-line);
}

.band.dark .rows li:last-child {
  border-bottom-color: var(--band-line);
}

.band-body .rows + p {
  margin-top: 1.5rem;
}

/* === Page home font size === */
.page-home {
  font-size: 1.125rem;
}

/* === Hero grid === */
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-bottom: 3.5rem;
}

@media (min-width: 48rem) {
  .has-screen {
    grid-template-columns: 1fr auto;
  }
}

.phone {
  width: 17.5rem;
  margin: 0 auto;
  border: 4px solid var(--ink);
  border-radius: 46px;
  overflow: hidden;
  background: var(--cream);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
}

/* === Footer === */
.foot {
  background: var(--bar-bg);
  color: var(--bar-fg);
  padding: 1.5rem 0 2rem;
  font-size: 0.9rem;
}

.foot p {
  margin-bottom: 0.25rem;
}

/* === Root page === */
.page-root .hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0;
}

.page-root .wrap {
  text-align: center;
  width: 100%;
}

.page-root .hero h1 {
  font-size: 3.2rem;
  margin: 1rem 0 0.5rem;
}

.btn {
  display: inline-block;
  min-width: 9rem;
  padding: 0.9rem 1.5rem;
  border-radius: 16px;
  background: var(--ink);
  color: #FFFBEA;
  font-weight: 800;
  text-decoration: none;
  margin: 0.4rem;
}

@media (prefers-color-scheme: dark) {
  .btn {
    background: var(--accent);
    color: var(--ink);
  }
}

.page-root .foot {
  text-align: center;
}

.page-root .foot p {
  font-size: 0.85rem;
}

.foot .marchi {
  font-size: 0.8rem;
  margin-top: 0.75rem;
  max-width: 51rem;
}

/* Indirizzi lunghi (pagina Fonti): vanno a capo invece di uscire dallo schermo */
.card { overflow-wrap: anywhere; }

/* ============ Sito nuovo: presentazione ============ */
.page-home .hero-text .lead { margin-bottom: 1.5rem; }
.azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0; }
.invito {
  display: inline-block;
  padding: 0.95rem 1.6rem;
  border-radius: 16px;
  background: var(--ink);
  color: #FFFBEA;
  font-weight: 800;
  text-decoration: none;
}
.invito:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (prefers-color-scheme: dark) {
  .invito { background: var(--accent); color: #111111; }
  .invito:focus-visible { outline-color: var(--accent); }
}
.presto { font-weight: 700; max-width: 22rem; }
.page-home .phone { width: min(19rem, 78vw); border-radius: 48px; }

/* Prova interattiva in una fascia sua, con i colori della testata */
.band.prova-band { background: var(--hero-bg); color: var(--hero-fg); padding-top: 3rem; }
.band.prova-band .hero-grid { padding-bottom: 0; }

/* Racconto in quattro momenti */
.band.s-racconto h2,
.band.s-carte h2,
.band.s-connesso h2,
.band.s-tessere h2,
.band.s-radio h2,
.band.s-faro h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.25rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: none;
  letter-spacing: -0.01em;
  margin: 0 0 2rem;
  max-width: 44rem;
}
.momenti, .griglia { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.momenti { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.momenti li, .griglia li { padding: 0; margin: 0; }
.momenti li::before, .griglia li::before { display: none; }
.momenti .momento {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 24px;
  padding: 1.4rem 1.4rem 1.5rem;
}
.momento:last-child { background: var(--ink); color: #FFFBEA; }
.momento p { margin: 0; }
.momento strong { display: block; font-size: 1.35rem; line-height: 1.15; margin-bottom: 0.5rem; }
.momento-n {
  display: block;
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.75rem;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
}
.momento:last-child .momento-n { -webkit-text-stroke: 0; }

/* Schede */
.griglia { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.griglia li {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: 1.25rem 1.3rem;
}
.griglia strong { display: block; font-size: 1.2rem; line-height: 1.2; margin-bottom: 0.35rem; }
.band.s-carte { padding-top: 4rem; }
.band.s-connesso { background: var(--band-bg); color: var(--band-fg); }
.band.s-connesso h2 { color: var(--accent); }
.band.s-connesso .griglia li { background: transparent; border-color: var(--band-line); color: var(--band-fg); }
.band.s-connesso .griglia strong { color: var(--accent); }
.band.s-tessere .griglia li { background: transparent; border: 0; border-top: 4px solid var(--ink); border-radius: 0; padding: 1rem 0 0; }
.band.s-tessere .griglia strong { font-size: 1.5rem; }
.nota-dopo { margin: 1.5rem 0 0; }

/* Rete radio: messaggio che passa di radio in radio */
.band.s-radio { background: var(--band-bg); color: var(--band-fg); }
.band.s-radio h2 { color: var(--accent); }
.band.s-radio .band-body p { margin: 0 0 1rem; }
.radio-rete { display: block; width: 100%; height: auto; margin-top: 2.5rem; max-height: 16rem; }
.radio-filo { fill: none; stroke: var(--band-line); stroke-width: 3; stroke-dasharray: 10 8; }
.radio-nodo { fill: var(--accent); stroke: var(--accent); stroke-width: 3; }
.radio-msg { fill: var(--accent); opacity: 0; }

/* Faro: onde che si allargano */
.band.s-faro .two { align-items: center; }
.onde { position: relative; width: 16rem; height: 16rem; margin: 0 auto; border-radius: 50%; border: 3px solid var(--ink); background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.onde img { position: relative; border-radius: 22px; border: 3px solid var(--ink); }
.onde span { position: absolute; left: 50%; top: 50%; width: 7rem; height: 7rem; margin: -3.5rem 0 0 -3.5rem; border-radius: 50%; border: 3px solid var(--accent); opacity: 0; }
.band.s-faro .band-body p { margin: 0 0 1rem; }

@media (prefers-color-scheme: dark) {
  .momento, .griglia li { border-color: var(--line); }
  .momento:last-child { background: var(--accent); color: #111111; border-color: var(--accent); }
  .momento-n { color: var(--accent); -webkit-text-stroke: 0; }
  .momento:last-child .momento-n { color: #111111; }
  .band.s-tessere .griglia li { border-top-color: var(--accent); }
  .onde, .onde img { border-color: var(--line); }
  .radio-filo { stroke: var(--line); }
}
