/*
  Demerdificazione: stesso stile grafico delle guide in PDF.
  Carta color crema, Lora per il testo e i titoli, Inter per etichette e tabelle,
  numeri romani per le parti, colori del servizio di arrivo per ogni tappa.
  Caratteri inclusi nel sito (licenza SIL OFL), nessuna risorsa esterna.
*/

@font-face {
  font-family: "Lora";
  src: url("fonts/lora.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lora";
  src: url("fonts/lora-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fbf8f3;
  --card: #ffffff;
  --ink: #1d1c1a;
  --text: #2d2b28;
  --muted: #6a655d;
  --line: #e5dfd4;
  --a: #7c1f2c;
  --b: #7f3d98;
  --acc: #c0392b;
  --tint: #f5e5df;
}

/* colori delle tappe, presi dalle copertine dei PDF */
.c1 { --a: #7c1f2c; --b: #7f3d98; --acc: #c0392b; --tint: #f5e5df; }
.c2 { --a: #0094f9; --b: #7361da; --acc: #4b5bdc; --tint: #e9e8f1; }
.c3 { --a: #fa853a; --b: #af4784; --acc: #cc3318; --tint: #f8e5dd; }
.c4 { --a: #128a7c; --b: #4e81ec; --acc: #3368d4; --tint: #e8ebf3; }
.c5 { --a: #5439c9; --b: #2c91fb; --acc: #4b4fd8; --tint: #e9e7f0; }
.c6 { --a: #1873ec; --b: #da438c; --acc: #aa5128; --tint: #f4e8df; }
.c7 { --a: #0a2a65; --b: #417fed; --acc: #175ddc; --tint: #e4e9f1; }
.c8 { --a: #107c6a; --b: #ac7a3e; --acc: #0e7c6b; --tint: #e3ece5; }
.c9 { --a: #a4253b; --b: #c87024; --acc: #a3243b; --tint: #f2e3e1; }
.c10 { --a: #3d3b8c; --b: #258287; --acc: #3d3a8c; --tint: #e8e5e9; }
.c11 { --a: #15161a; --b: #303237; --acc: #0b5cad; --tint: #e3e8ec; }
.c12 { --a: #216b51; --b: #92762c; --acc: #1f6b52; --tint: #e5eae3; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fbf8f3;
  color: #2d2b28;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--acc); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }

strong { color: var(--ink); font-weight: 700; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.1rem; }

.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: #1d1c1a;
  color: #ffffff;
  border-radius: 6px;
  font-family: "Inter", Arial, sans-serif;
}
.skip:focus { top: 0.5rem; }

/* etichette in maiuscoletto spaziato, come nei PDF */
.label {
  margin: 0 0 0.6rem;
  color: var(--acc);
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* barra in alto */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fbf8f3;
  border-bottom: 1px solid #e5dfd4;
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #1d1c1a;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}
.logo { width: 30px; height: 30px; flex: none; }
.l-bg { fill: #1d1c1a; }
.l-fg { fill: none; stroke: #fbf8f3; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid #e5dfd4;
  border-radius: 999px;
  color: #1d1c1a;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.lang:hover { background: #ffffff; }

/* copertina */
.cover { padding-bottom: 0.5rem; }
.cover-grid { display: grid; gap: 1.25rem; padding-top: 0; }
.cover-img { width: calc(100% + 2.2rem); max-width: none; margin: 0 -1.1rem; }
.cover-text { padding-bottom: 0.5rem; }

h1, h2, h3 { color: #1d1c1a; font-family: "Lora", Georgia, serif; font-weight: 400; line-height: 1.1; }
h1 { font-size: 2.5rem; margin: 0.2rem 0 1rem; letter-spacing: -0.01em; }
h1 em, .t em { color: var(--acc); font-style: italic; }
.sub { margin: 0; color: #3a3733; font-size: 1.15rem; font-style: italic; line-height: 1.6; max-width: 40rem; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.85rem;
  color: #6a655d;
}
.crumbs li + li::before { content: "›"; margin-right: 0.4rem; }

.progress { margin: 1.25rem 0 0; font-family: "Inter", Arial, sans-serif; font-size: 0.95rem; }

/* le parti, come la riga in fondo alla copertina */
.parts { border-top: 1px solid #d9d2c5; margin-top: 1.25rem; }
.parts ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0.9rem 0 0;
  list-style: none;
}
.parts a {
  display: block;
  min-height: 44px;
  padding: 0.3rem 0;
  color: #3a3733;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.8rem;
  line-height: 1.35;
  text-decoration: none;
}
.parts a:hover { color: var(--acc); }
.parts .r { display: block; color: #1d1c1a; font-size: 1.15rem; font-weight: 700; }

/* contenuto */
.content { padding-top: 0.5rem; padding-bottom: 2rem; }
.content > * { max-width: 48rem; }
h2 {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin: 2.6rem 0 1rem;
  font-size: 1.9rem;
  scroll-margin-top: 72px;
}
.roman { color: var(--acc); font-size: 2.6rem; line-height: 1; flex: none; }
h2.mini { display: block; font-size: 1.5rem; margin: 0 0 0.6rem; }
h2.label { display: block; font-size: 0.72rem; margin: 0 0 0.6rem; }
h3 { font-size: 1.2rem; }

.dropcap::first-letter {
  float: left;
  margin: 0.12em 0.1em 0 0;
  color: var(--acc);
  font-size: 3.6em;
  line-height: 0.8;
}

.list { padding-left: 1.2rem; }
.list li { margin-bottom: 0.6rem; padding-left: 0.2rem; }
ul.list li::marker { color: var(--acc); }
ol.list li::marker { color: var(--acc); font-family: "Inter", Arial, sans-serif; font-weight: 700; }

code { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: 0.88em; overflow-wrap: anywhere; }
.code {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border-radius: 12px;
  background: #1d1c1a;
  color: #f4f1ea;
  font-size: 0.9rem;
  line-height: 1.55;
}
.code code { overflow-wrap: normal; white-space: pre; }

.box, .limits, .msg, .check, .pdf { margin: 1.75rem 0; padding: 1.2rem 1.25rem 0.7rem; border-radius: 14px; }
.box { background: var(--tint); }
.box p { margin-top: 0; }
.limits { background: #ffffff; border: 1px solid #e5dfd4; }
.msg { background: #ffffff; border: 2px dashed var(--acc); }
.msg blockquote { margin: 0; color: #3a3733; font-size: 1.1rem; font-style: italic; }
.faq dt { margin-top: 1.1rem; color: #1d1c1a; font-weight: 700; }
.faq dd { margin: 0.25rem 0 0; }
.faq-s { margin-top: 2.2rem; }

/* tabelle */
.table { margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-family: "Inter", Arial, sans-serif; font-size: 0.88rem; line-height: 1.45; }
caption { padding-bottom: 0.6rem; color: #1d1c1a; font-family: "Lora", Georgia, serif; font-size: 1.1rem; text-align: left; }
th, td { padding: 0.6rem 0.6rem 0.6rem 0; border-bottom: 1px solid #e5dfd4; text-align: left; vertical-align: top; }
thead th {
  border-bottom: 1px solid #1d1c1a;
  color: #6a655d;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
tbody th { color: #1d1c1a; font-weight: 700; }

@media (max-width: 699px) {
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: block; padding: 0.7rem 0; border-bottom: 1px solid #e5dfd4; }
  tbody th, tbody td { display: block; padding: 0.15rem 0; border: 0; }
  tbody th { color: var(--acc); font-size: 1rem; }
  tbody td::before {
    content: attr(data-label);
    display: block;
    color: #6a655d;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
}

/* lista di controllo */
.check { background: #ffffff; border: 1px solid #e5dfd4; }
.note { color: #6a655d; font-family: "Inter", Arial, sans-serif; font-size: 0.85rem; }
.ticks { display: grid; gap: 0 2rem; margin: 0; padding: 0; list-style: none; }
.ticks li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-top: 1px solid #eee8de;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
}
.ticks input { flex: none; width: 1.3rem; height: 1.3rem; margin: 0.05rem 0 0; accent-color: var(--acc); }
.ticks label { flex: 1; cursor: pointer; }
.count { color: #6a655d; font-family: "Inter", Arial, sans-serif; font-size: 0.8rem; font-weight: 600; }
.count.full { color: var(--acc); }

/* la guida completa: la fascia colorata della copertina */
.pdf {
  background: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38)), linear-gradient(120deg, var(--a), var(--b));
  color: #ffffff;
}
.pdf h2 { color: #ffffff; }
.pdfs { margin: 0; padding: 0; list-style: none; }
.pdfs li { margin: 0 0 0.6rem; }
.pdf .btn { background: #ffffff; border-color: #ffffff; color: #1d1c1a; }
.pdf .btn.ghost { background: transparent; color: #ffffff; }

.btn {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border: 2px solid var(--acc);
  border-radius: 999px;
  background: var(--acc);
  color: #ffffff;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--acc); }
.btn .meta { font-weight: 400; }
.tools { margin: 0.4rem 0 0.7rem; }

.hint { padding-left: 0.9rem; border-left: 3px solid #e5dfd4; color: #6a655d; font-size: 0.95rem; font-style: italic; }

/* home */
.stops { padding-bottom: 1rem; }
.lead { max-width: 44rem; color: #3a3733; font-style: italic; }
.cards { display: grid; gap: 1rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #e5dfd4;
  border-radius: 14px;
  background: #ffffff;
  color: #2d2b28;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card a:hover { box-shadow: 0 10px 28px rgba(40, 30, 10, 0.12); transform: translateY(-2px); }
.card-img { width: 100%; aspect-ratio: 1000 / 666; object-fit: cover; object-position: top; }
.ct { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 1.1rem 1.1rem; }
.ct .label { margin: 0; }
.ct .t { color: #1d1c1a; font-size: 1.3rem; line-height: 1.2; }
.ct .k { color: #6a655d; font-family: "Inter", Arial, sans-serif; font-size: 0.82rem; line-height: 1.45; }

.twocol { display: grid; gap: 0 3rem; padding-bottom: 3rem; }
.twocol .box { align-self: start; margin-top: 2.6rem; }
.method li { margin-bottom: 0.6rem; }

/* fondo pagina */
.pager { display: grid; gap: 0.75rem; padding-bottom: 2.5rem; }
.pager a {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1.1rem;
  border: 1px solid #e5dfd4;
  border-radius: 12px;
  background: #ffffff;
  color: #1d1c1a;
  font-size: 1.05rem;
  text-decoration: none;
}
.pager a:hover { border-color: var(--acc); }
.pager span { color: #6a655d; font-family: "Inter", Arial, sans-serif; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.pager .next { text-align: right; }

.foot { padding: 2rem 0 2.5rem; border-top: 1px solid #e5dfd4; color: #6a655d; font-family: "Inter", Arial, sans-serif; font-size: 0.85rem; }
.foot .label { color: #1d1c1a; }
.others { display: flex; flex-wrap: wrap; gap: 0.3rem 0; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.others li + li::before { content: "·"; margin: 0 0.5rem; color: #b5ad9f; }
.others a { color: #3a3733; }
.running { color: #1d1c1a; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }

/* video in prima pagina: copertina locale, YouTube solo dopo il clic */
.video {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid #e5dfd4;
  border-bottom: 1px solid #e5dfd4;
}
.video-text p { margin-top: 0; }
.video-text .mini { margin-bottom: 0.6rem; }
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #1d1c1a;
}
.player iframe { display: block; width: 100%; height: 100%; border: 0; }
.poster {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  height: 100%;
  padding: 1rem;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), linear-gradient(120deg, #7c1f2c, #7f3d98);
  color: #ffffff;
  text-align: center;
  text-decoration: none;
}
.vcard + .vcard .poster { background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), linear-gradient(120deg, #0f5e66, #3d3b8c); }
.vcard + .vcard .play-fg { fill: #0f5e66; }
.play { width: 68px; height: 48px; }
.play-bg { fill: #ffffff; }
.play-fg { fill: #7c1f2c; }
.poster:hover .play-bg { fill: #f3e6d8; }
.poster-t { font-family: "Lora", Georgia, serif; font-size: 1.35rem; }
.poster-s { font-family: "Inter", Arial, sans-serif; font-size: 0.75rem; letter-spacing: 0.08em; opacity: 0.9; }

.video-text { max-width: 48rem; }
.video-grid { display: grid; gap: 1.75rem; }
.vcard h3 { margin: 0.9rem 0 0.3rem; font-size: 1.25rem; }
.vcard p { margin: 0 0 0.4rem; }

@media (min-width: 760px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

.copy-area { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* tablet */
@media (min-width: 600px) {
  .wrap { padding: 0 1.75rem; }
  .cover-img { width: calc(100% + 3.5rem); margin: 0 -1.75rem; }
  h1 { font-size: 3.1rem; }
  .parts ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* computer */
@media (min-width: 960px) {
  .cover-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding-top: 2.5rem; }
  .cover-img { order: 2; width: 100%; margin: 0; border-radius: 16px; box-shadow: 0 18px 40px rgba(40, 30, 10, 0.16); }
  .cover-text { order: 1; }
  h1 { font-size: 3.6rem; }
  .parts ol { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .twocol { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .content { padding-top: 1rem; }
}

@media (min-width: 1180px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card a { transition: none; }
  .card a:hover { transform: none; }
}

@media print {
  .top, .skip, .parts, .pager, .tools, .foot nav { display: none; }
  .pdf { background: none; color: #000000; border: 1px solid #999999; }
  .pdf h2, .pdf .btn { color: #000000; }
  body { font-size: 11pt; background: #ffffff; }
}
