:root {
  --wall: #e3ece6;
  --ink: #14261e;
  --soft: #40564b;
  --green: #0b6e4f;
  --block: #0b6e4f;
  --street: #3d8d72;
  --blue: #1d3f8f;
  --tile: #ffffff;
  --yellow: #f2c230;
  --display: "Avenir Next Condensed", "DIN Condensed", Bahnschrift, "Roboto Condensed", "Arial Narrow", sans-serif;
  --text: "Avenir Next", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --edge: clamp(1.25rem, 5vw, 5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --wall: #15352a;
    --ink: #eef6f1;
    --soft: #bdd2c7;
    --block: #0a5a41;
    --street: #2f7d63;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 1.125rem/1.55 var(--text);
}

h1, h2, h3, p, ol, dl, dd { margin: 0; }

h1, h2, h3, dt, .brand {
  font-family: var(--display);
  font-stretch: condensed;
  line-height: 1.05;
  text-wrap: balance;
}

p, dd { text-wrap: pretty; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1;
  padding: .6rem 1rem;
  background: var(--yellow);
  color: #14261e;
}

.skip:focus { top: 1rem; outline: 3px solid var(--blue); outline-offset: 2px; }

/* Apertura: testo a sinistra, mappa fino al bordo destro. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 7fr);
  min-height: min(46rem, 92vh);
}

.hero-text {
  display: flex;
  flex-direction: column;
  padding: 2rem clamp(1.5rem, 4vw, 4rem) 3rem var(--edge);
}

.brand { font-size: 1.5rem; font-weight: 700; color: var(--green); }

.hero h1 {
  margin-top: auto;
  padding-top: 3rem;
  font-size: clamp(3.25rem, 6.6vw, 6.5rem);
  font-weight: 800;
  line-height: .94;
  letter-spacing: -.015em;
}

.lead { max-width: 32rem; margin-top: 1.75rem; font-size: 1.3rem; line-height: 1.45; }

.status {
  max-width: 32rem;
  margin-top: 1.75rem;
  margin-bottom: auto;
  padding-left: 1rem;
  border-left: .4rem solid var(--yellow);
  font-weight: 600;
}

.map { min-height: 22rem; background: var(--block); }
.map svg { display: block; width: 100%; height: 100%; }

.streets path { fill: none; stroke: var(--street); stroke-width: 44; }
.streets .avenue { stroke-width: 34; }

.route {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 15;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  animation: draw 2.6s .3s cubic-bezier(.5, 0, .2, 1) backwards;
}

@keyframes draw { from { stroke-dashoffset: 1; } }

@media (prefers-reduced-motion: reduce) { .route { animation: none; } }

.start { fill: var(--ink); stroke: var(--yellow); stroke-width: 9; }
.tile-base { fill: var(--tile); }
.tile-line { fill: none; stroke: var(--blue); stroke-width: 4; }

.tiles text {
  fill: var(--blue);
  font: 800 44px var(--display);
  text-anchor: middle;
  dominant-baseline: central;
}

/* I passaggi: una strada con la linea tratteggiata e i civici. */
main section { padding: clamp(4rem, 9vw, 7.5rem) var(--edge); }

h2 { max-width: 18ch; font-size: clamp(2.25rem, 4.6vw, 3.75rem); font-weight: 800; }

.steps { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 3rem clamp(2rem, 6vw, 6rem); }

.steps ol { padding: 0; list-style: none; counter-reset: stop; }

.steps li {
  position: relative;
  min-height: 6rem;
  padding: 0 0 3.25rem 7.5rem;
  counter-increment: stop;
}

.steps li:last-child { padding-bottom: 0; }

.steps li::before {
  content: counter(stop);
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 5rem;
  height: 4.25rem;
  border: .45rem solid var(--tile);
  border-radius: .5rem;
  outline: 3px solid var(--blue);
  outline-offset: -.6rem;
  background: var(--tile);
  color: var(--blue);
  font: 800 2.3rem/1 var(--display);
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 2.3rem;
  top: 5rem;
  bottom: .75rem;
  width: .4rem;
  background: repeating-linear-gradient(var(--yellow) 0 1.1rem, transparent 1.1rem 1.8rem);
}

h3 { font-size: 1.85rem; font-weight: 700; }
.steps h3 + p { max-width: 36rem; margin-top: .6rem; color: var(--soft); }

.road { padding-top: 0 !important; }

.road dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 4vw, 4rem);
  margin-top: 2.75rem;
}

dt { font-size: 1.6rem; font-weight: 700; }
dd { margin-top: .6rem; color: var(--soft); }

.warning { max-width: 42rem; margin-top: 3.5rem; font-weight: 600; }

.privacy {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  background: #0b6e4f;
  color: #ffffff;
}

.privacy-text p { max-width: 40rem; }
.privacy-text p + p { margin-top: 1.25rem; }

footer { padding: 2.25rem var(--edge); color: var(--soft); font-size: 1rem; }
footer p { max-width: 46rem; }

.missing { display: grid; align-content: center; gap: 1.5rem; min-height: 100vh; padding: var(--edge); }
.missing h1 { font-size: clamp(2.75rem, 7vw, 5rem); font-weight: 800; }
.missing a { color: inherit; font-weight: 600; text-underline-offset: .2em; }
.missing a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

@media (prefers-color-scheme: dark) {
  .brand { color: #8fd9bd; }
}

@media (max-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-text { padding: 1.5rem var(--edge) 2.5rem; }
  .hero h1 { padding-top: 2.5rem; font-size: clamp(3rem, 15vw, 5rem); }
  .lead { font-size: 1.2rem; }
  .map { height: 84vw; max-height: 32rem; }
  .steps, .privacy { grid-template-columns: minmax(0, 1fr); }
  .steps li { padding-left: 6rem; }
  .steps li::before { width: 4.25rem; height: 3.75rem; font-size: 2rem; }
  .steps li:not(:last-child)::after { left: 1.95rem; top: 4.5rem; }
  .road dl { grid-template-columns: minmax(0, 1fr); }
}
