/* Sito di Dante. Colori dall'icona: rosso scuro e pergamena, con oro e inchiostro. Niente sfumature. */
/* font dentro il sito (dai pacchetti @fontsource, sottoinsieme latino): nessuna richiesta a Google */
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-latin-700-normal.woff2') format('woff2');
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('fonts/nunito-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('fonts/nunito-sans-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('fonts/nunito-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('fonts/nunito-sans-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #fbf8f2;
  --bg-2: #f4ead6;
  --fg: #2b1d1a;
  --fg-2: #65534c;
  --line: #e2d5bf;
  --accent: #8e2a2a;
  --accent-fg: #ffffff;
  --red: #8e2a2a;
  --yellow: #c08a2e;
  --green: #5f7a52;
  --lavender: #e7d3b0;
  --ink: #2f4f7a;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(43, 29, 26, 0.12);
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1d1715;
    --bg-2: #28201d;
    --fg: #f1e8dc;
    --fg-2: #bba99c;
    --line: #3f332e;
    --accent: #e3907f;
    --accent-fg: #1d1715;
    --red: #e3907f;
    --lavender: #5a4636;
    --ink: #8fb0dc;
    --card: #2b2320;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #1d1715;
  --bg-2: #28201d;
  --fg: #f1e8dc;
  --fg-2: #bba99c;
  --line: #3f332e;
  --accent: #e3907f;
  --accent-fg: #1d1715;
  --red: #e3907f;
  --lavender: #5a4636;
  --ink: #8fb0dc;
  --card: #2b2320;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 18px/1.55 var(--font-body);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--accent);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
}
p {
  margin: 0;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
section {
  padding-block: 64px;
}
section + section {
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  max-width: 60ch;
}
.section-head p {
  color: var(--fg-2);
}

/* barra in alto */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
}
.brand span {
  font-weight: 600;
  color: var(--fg-2);
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.top nav {
  margin-left: auto;
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top nav a {
  color: var(--fg-2);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 0;
}
.top nav a:hover,
.top nav a:focus-visible {
  color: var(--fg);
}
.lang {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.flag {
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--line);
}
.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  z-index: 6;
}

/* tasti grandi e visibili */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 26px;
  border-radius: 12px;
  font: 700 1.1rem var(--font-display);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-fg);
}
.btn:hover,
.btn:focus-visible {
  filter: brightness(1.08);
}
.btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
.btn small {
  font: 600 0.85rem var(--font-body);
  opacity: 0.85;
}
.btn.block {
  width: 100%;
  justify-content: flex-start;
  min-height: 60px;
  text-align: left;
}

/* apertura */
.hero {
  padding-block: 56px 72px;
  /* the sheets behind the screenshot must not widen the page on a phone */
  overflow-x: clip;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero-text p {
  font-size: 1.15rem;
  color: var(--fg-2);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.hero-note {
  font-size: 0.95rem;
  color: var(--fg-2);
}
.hero-shot {
  position: relative;
  isolation: isolate;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--card);
}
/* due fogli dietro la schermata, come pagine di un manoscritto */
.hero-shot::before,
.hero-shot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  z-index: -1;
}
.hero-shot::before {
  background: var(--lavender);
  transform: translate(16px, 16px) rotate(2deg);
}
.hero-shot::after {
  background: var(--yellow);
  transform: translate(-14px, 12px) rotate(-2.5deg);
}
.hero-shot img {
  border-radius: 13px;
}
.hero-shot img {
  width: 100%;
}
.logo {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

/* funzioni */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 36px;
}
.feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.feature .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--c);
  background: var(--bg-2);
  border: 1.5px solid var(--c);
  margin-bottom: 8px;
}
.ornament {
  display: block;
  margin-bottom: 14px;
}
.feature:nth-child(1) {
  --c: var(--red);
}
.feature:nth-child(2) {
  --c: var(--green);
}
.feature:nth-child(3) {
  --c: var(--yellow);
}
.feature:nth-child(4) {
  --c: var(--accent);
}
.feature:nth-child(5) {
  --c: var(--ink);
}
.feature:nth-child(6) {
  --c: var(--fg-2);
}
.feature p {
  color: var(--fg-2);
}

/* dati locali */
.local {
  background: var(--bg-2);
}
.local-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 36px;
}
.local-item {
  display: flex;
  gap: 14px;
  min-width: 0;
}
.local-item .icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--card);
  border: 1.5px solid var(--accent);
}
.local-item h3 {
  margin-bottom: 6px;
}
.local-item p,
.local-note {
  color: var(--fg-2);
}
.local-note {
  margin-top: 28px;
  font-size: 0.92rem;
  max-width: 70ch;
}

/* schermate */
.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.shots figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.shots img {
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.shots figcaption {
  color: var(--fg-2);
  font-size: 0.95rem;
}

/* download */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.dl {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.dl h3 {
  font-size: 1.4rem;
}
.dl .note {
  color: var(--fg-2);
  font-size: 0.95rem;
}
.dl-more {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  color: var(--fg-2);
}
.support {
  margin-top: 20px;
  color: var(--fg-2);
}
.dl .btn {
  border-color: var(--line);
  color: var(--fg);
}
.dl .btn.primary {
  border-color: var(--accent);
  color: var(--accent-fg);
}

/* web */
.web .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.web-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.web p + p {
  margin-top: 10px;
}
.web-limits {
  border-left: 4px solid var(--yellow);
  padding-left: 14px;
}

/* tutorial: i video divisi in gruppi; «Inizia qui» in un riquadro, gli altri in fila sotto */
.playlist {
  margin: 0 0 32px;
  text-align: center;
  font-weight: 600;
}
.video-group {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.video-group + .video-group {
  margin-top: 12px;
}
.video-group.start {
  border-left: 4px solid var(--yellow);
}
.video-group summary {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
}
.video-group summary::-webkit-details-marker {
  display: none;
}
.video-group summary::after {
  content: '';
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--fg-2);
  border-bottom: 3px solid var(--fg-2);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.video-group[open] summary::after {
  transform: rotate(-135deg);
}
.video-group h3 {
  font-size: 1.5rem;
}
.video-group .count {
  color: var(--fg-2);
  font-weight: 400;
  font-size: 1.1rem;
}
.video-group .group-text {
  color: var(--fg-2);
  margin: 4px 0 0;
}
.video-group .videos {
  padding: 0 24px 24px;
}
@media (max-width: 600px) {
  .video-group summary {
    padding: 16px;
  }
  .video-group .videos {
    padding: 0 16px 16px;
  }
}
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.video {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.video .thumb {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--fg-2);
  font-weight: 700;
  overflow: hidden;
}
.video .thumb {
  position: relative;
}
/* fuori dalla griglia: l'immagine riempie il riquadro 16:9 e non lo allunga con le sue proporzioni */
.video .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.video .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.video .meta span {
  color: var(--fg-2);
  font-size: 0.95rem;
  white-space: nowrap;
}
.video {
  color: inherit;
  text-decoration: none;
}
.video h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}
.video:hover h4 {
  color: var(--accent);
}
.video .num {
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}
.video p {
  color: var(--fg-2);
  font-size: 0.95rem;
}

/* guida e novità */
.links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.link-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
}
.link-card p {
  color: var(--fg-2);
  flex: 1;
}
.link-card a {
  font-weight: 700;
}

footer {
  border-top: 1px solid var(--line);
  padding-block: 36px;
  color: var(--fg-2);
  font-size: 0.95rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
}
footer .by {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
footer .by img {
  width: 44px;
  height: 44px;
}

@media (max-width: 900px) {
  .hero .wrap,
  .features,
  .local-items,
  .shots,
  .dl-grid,
  .links {
    grid-template-columns: minmax(0, 1fr);
  }
  .web .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .top nav {
    gap: 2px 14px;
    font-size: 0.95rem;
  }
}

/* immagini ingrandite */
img.zoomable {
  cursor: zoom-in;
}
.zoom {
  /* as wide as the window allows: a dialog shrinks to its content, so the width is set here */
  width: min(96vw, 1800px);
  max-width: none;
  max-height: 96vh;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow);
  cursor: zoom-out;
}
.zoom::backdrop {
  background: rgba(20, 17, 13, 0.78);
}
.zoom img {
  width: 100%;
  max-height: calc(96vh - 70px);
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}
.zoom-caption {
  margin-top: 10px;
  color: var(--fg-2);
  font-size: 0.95rem;
  text-align: center;
}
.zoom-close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-fg);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}
