@charset "utf-8";
/* ==========================================================================
   Puglia Bike Tour — pugliabiketour.com
   Foglio di stile unico, scritto per questo sito e per nessun altro.
   Identità costruita sul vento: la Puglia è piatta ed esposta, e la direzione
   del vento cambia davvero la difficoltà di ogni tappa. Da lì nascono
   l'accento cromatico e l'elemento firma (rosa dei venti).
   Palette e tipografia da 03-siti-pronti/05-pugliabiketour-com.md
   ========================================================================== */

/* --- Font self-hosted. Nessuna richiesta a terze parti, nessun cookie. ---- */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-600-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-700-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-400-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter-500-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-400-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Token ------------------------------------------------------------- */

:root {
  --inchiostro: #201F26;   /* testo primario, near-black caldo */
  --pietra: #E8E4D9;       /* fondo pagina, grigio-pietra freddo */
  --indaco: #2E3A66;       /* accento primario: link, bottoni, stati attivi */
  --vento: #C9D400;        /* hi-vis: SOLO dati sul vento, rosa dei venti, focus */
  --ferro: #6E7269;        /* filetti, bordi, stati disabilitati */

  /* Derivati. --ferro non raggiunge AA come testo su --pietra (3,8:1):
     per le didascalie serve una variante più scura. */
  --ferro-testo: #565A52;  /* 5,3:1 su --pietra — AA per testo normale */
  --pietra-scura: #DAD5C7; /* fondo alternato per sezioni e celle */
  --indaco-chiaro: #46538A;
  --bianco: #F7F5F0;

  --misura: 38rem;         /* lunghezza di riga per la lettura */
  --wrap: 70rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

/* --- Reset mirato ------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--pietra);
  color: var(--inchiostro);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
img { background: var(--pietra-scura); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.12;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5.2vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.125rem); margin-top: 2.5em; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.375rem); font-weight: 600; margin-top: 2em; }
h4 { font-size: 1.0625rem; font-weight: 600; margin-top: 1.75em; }

h1 + .sommario { margin-top: -0.3em; }

p, ul, ol, dl { margin: 0 0 1.15em; }
li { margin-bottom: 0.4em; }

.sommario {
  font-size: clamp(1.0625rem, 1.9vw, 1.25rem);
  line-height: 1.5;
  color: var(--inchiostro);
  max-width: 34rem;
}

strong, b { font-weight: 500; }

/* Ogni numero del sito è in mono: prezzi, distanze, giorni, vento, taglie. */
.n, .num, td.n, .prezzo, time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.94em;
  letter-spacing: -0.01em;
}

.didascalia {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ferro-testo);
  max-width: 32rem;
}

.etichetta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ferro-testo);
  display: block;
  margin-bottom: 0.75rem;
}

a {
  color: var(--indaco);
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--inchiostro);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--vento);
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--inchiostro);
  color: var(--bianco);
  padding: 0.75rem 1.25rem;
  z-index: 50;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* --- Struttura ---------------------------------------------------------- */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.misura { max-width: var(--misura); }

section { margin-block: clamp(3rem, 7vw, 5rem); }
section > h2:first-child { margin-top: 0; }

.regola {
  border: 0;
  border-top: 1px solid var(--ferro);
  opacity: 0.5;
  margin-block: 3rem;
}

/* --- Testata ------------------------------------------------------------ */

.site-head {
  border-bottom: 1px solid var(--ferro);
  background: var(--pietra);
}

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2rem;
  padding-block: 1.1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--inchiostro);
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  white-space: nowrap;
}
.wordmark-a { color: var(--indaco); }
.wordmark::after {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--vento);
  transform: rotate(45deg);
  margin-left: 0.15rem;
}

.nav { margin-left: auto; }
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
}
.nav li { margin: 0; }
.nav a {
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--inchiostro);
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  display: inline-block;
}
.nav a:hover { border-bottom-color: var(--vento); }
.nav a[aria-current="page"] {
  border-bottom-color: var(--indaco);
  font-weight: 500;
}

/* --- Briciole ----------------------------------------------------------- */

.crumbs { border-bottom: 1px solid var(--pietra-scura); }
.crumbs ol {
  list-style: none;
  margin: 0;
  padding-block: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--ferro-testo);
}
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--ferro); }
.crumbs a { color: var(--ferro-testo); }

/* --- Hero --------------------------------------------------------------- */

.hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--ferro);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* --- Bottoni ------------------------------------------------------------ */

.azioni {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--indaco);
  border-radius: 2px;
  background: var(--indaco);
  color: var(--bianco);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s linear, color 0.12s linear;
}
.btn:hover { background: var(--indaco-chiaro); border-color: var(--indaco-chiaro); }

.btn-secondario {
  background: transparent;
  color: var(--indaco);
}
.btn-secondario:hover { background: var(--vento); border-color: var(--inchiostro); color: var(--inchiostro); }

.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--ferro);
  border-color: var(--ferro);
  cursor: not-allowed;
}

/* --- Rosa dei venti: elemento firma ------------------------------------- */
/* Usata in tre posti soltanto: hero della home, ogni pagina tappa, e la
   pagina /wind-and-weather/. Mai come decorazione. */

.rosa { width: 100%; max-width: 20rem; }
.rosa-piccola { max-width: 8.5rem; }

.rosa .telaio { fill: none; stroke: var(--ferro); stroke-width: 1; }
.rosa .raggio { stroke: var(--ferro); stroke-width: 1; }
.rosa .raggio-cardine { stroke: var(--inchiostro); stroke-width: 1.5; }
.rosa .lettera {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--ferro-testo);
  text-anchor: middle;
  dominant-baseline: middle;
}
.rosa .lettera-viva { fill: var(--inchiostro); font-weight: 700; }

.rosa .arco {
  fill: none;
  stroke: var(--vento);
  stroke-width: 9;
  stroke-linecap: butt;
}
.rosa .ago { fill: var(--inchiostro); }

/* L'arco si disegna una volta sola quando entra nel viewport. */
.rosa[data-anima="attesa"] .arco {
  stroke-dasharray: var(--lung, 400);
  stroke-dashoffset: var(--lung, 400);
}
.rosa[data-anima="corri"] .arco {
  stroke-dasharray: var(--lung, 400);
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .rosa[data-anima] .arco {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transition: none;
  }
}

.rosa-blocco { display: grid; gap: 0.9rem; justify-items: start; }

/* Il valore del vento: testo scuro su fondo chartreuse.
   Chartreuse come testo su pietra sarebbe illeggibile (1,3:1);
   come fondo con testo inchiostro dà 9,7:1. */
.vento-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--vento);
  color: var(--inchiostro);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
}

/* --- Blocco incluso / non incluso --------------------------------------- */

.doppia {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1px;
  background: var(--ferro);
  border: 1px solid var(--ferro);
  border-radius: 2px;
  overflow: hidden;
}
.doppia > div { background: var(--pietra); padding: 1.5rem; }
.doppia h3 { margin-top: 0; }
.doppia ul { list-style: none; padding: 0; margin: 0; }
.doppia li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9375rem;
}
.doppia .si li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--vento);
  border: 1px solid var(--inchiostro);
}
.doppia .no li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid var(--ferro);
}

/* --- Schede tappa ------------------------------------------------------- */

.tappe { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--ferro); border-block: 1px solid var(--ferro); }
.tappe > li { margin: 0; background: var(--pietra); }

.tappa {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.4rem var(--gutter);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.12s linear;
}
.tappa:hover { background: var(--pietra-scura); }
.tappa .indice {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--ferro);
}
.tappa h3 { margin: 0 0 0.3rem; font-size: 1.0625rem; }
.tappa p { margin: 0; font-size: 0.9375rem; color: var(--ferro-testo); }
.tappa .dati { text-align: right; white-space: nowrap; }
@media (max-width: 40rem) {
  .tappa { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .tappa .dati { grid-column: 2; text-align: left; margin-top: 0.5rem; }
}

/* --- Tabelle dati ------------------------------------------------------- */

.tabella-scorre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-block: 1.75rem;
  border: 1px solid var(--ferro);
  border-radius: 2px;
}

table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }

caption {
  text-align: left;
  font-size: 0.875rem;
  color: var(--ferro-testo);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ferro);
  background: var(--pietra-scura);
}

th, td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--pietra-scura);
  vertical-align: top;
}
thead th {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ferro-testo);
  border-bottom: 1px solid var(--ferro);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td.n, th.n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --- Specifiche tecniche ------------------------------------------------ */

.specifiche {
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0 1.25rem;
  font-size: 0.9375rem;
  border-top: 1px solid var(--pietra-scura);
}
.specifiche dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ferro-testo);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--pietra-scura);
}
.specifiche dd {
  margin: 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--pietra-scura);
}

/* --- Nota / avviso ------------------------------------------------------ */

.nota {
  border-left: 3px solid var(--indaco);
  padding: 0.15rem 0 0.15rem 1.15rem;
  margin-block: 1.75rem;
  font-size: 0.9375rem;
}
.nota-vento { border-left-color: var(--vento); }
.nota p:last-child { margin-bottom: 0; }

/* --- Prezzo ------------------------------------------------------------- */

.listino { max-width: 34rem; }
.listino .riga {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--pietra-scura);
}
.listino .riga .fill {
  flex: 1;
  border-bottom: 1px dotted var(--ferro);
  transform: translateY(-0.25em);
}
.listino .cifra {
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  white-space: nowrap;
}

/* --- Form --------------------------------------------------------------- */

.modulo {
  display: grid;
  gap: 1.15rem;
  max-width: 34rem;
  margin-top: 1.75rem;
}
.campo { display: grid; gap: 0.35rem; }
.campo label { font-size: 0.875rem; font-weight: 500; }
.campo .aiuto { font-size: 0.8125rem; color: var(--ferro-testo); }

input[type="text"], input[type="email"], input[type="date"], input[type="number"], select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--inchiostro);
  background: var(--bianco);
  border: 1px solid var(--ferro);
  border-radius: 2px;
  padding: 0.6rem 0.7rem;
  width: 100%;
}
textarea { min-height: 7rem; resize: vertical; }
select { font-family: var(--font-mono); font-size: 0.9375rem; }
input:invalid, select:invalid { border-color: var(--ferro); }

.campo-doppio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1.15rem;
}

.esito {
  font-size: 0.9375rem;
  padding: 0.9rem 1.1rem;
  border-radius: 2px;
  border: 1px solid var(--ferro);
}
.esito[hidden] { display: none; }
.esito-ok { border-color: var(--inchiostro); border-left: 4px solid var(--vento); background: var(--pietra-scura); }
.esito-ko { border-color: var(--inchiostro); border-left: 4px solid var(--indaco); background: var(--pietra-scura); }

/* --- WhatsApp: secondario, appiccicato in basso su mobile ---------------- */

.wa-fisso { display: none; }
@media (max-width: 40rem) {
  .wa-fisso {
    display: block;
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: var(--inchiostro);
    color: var(--bianco);
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 0.9375rem;
    text-decoration: none;
    border-top: 2px solid var(--vento);
  }
}

/* --- Pié di pagina ------------------------------------------------------ */

.site-foot {
  border-top: 1px solid var(--ferro);
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding-block: 2.5rem 3rem;
  background: var(--pietra-scura);
}
.foot-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 2rem;
}
@media (max-width: 44rem) {
  .foot-inner { grid-template-columns: 1fr; }
}
.foot-legal p {
  margin: 0 0 0.2em;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ferro-testo);
}
.foot-legal p:first-child { color: var(--inchiostro); font-weight: 500; }
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.foot-nav li { margin: 0; }
.foot-nav a { font-size: 0.8125rem; color: var(--inchiostro); }

/* --- Stampa ------------------------------------------------------------- */

@media print {
  .site-head, .site-foot, .wa-fisso, .crumbs, .modulo { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { text-decoration: none; color: #000; }
  .tabella-scorre { overflow: visible; }
}
