/* web2 — stile fedele al PDF copiaincolla */

:root {
  --bianco: #ffffff;
  --nero: #111111;
  --viola: #a453ac;
  --viola-light: rgba(164, 83, 172, 0.07);
  --grigio: #888888;
  --grigio-chiaro: #cccccc;
  --linea: #e5e5e5;
  --nav-w: 220px;
}

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

html { scroll-behavior: smooth; }

body {
  position: relative;
  background: var(--bianco);
  color: var(--nero);
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  cursor: none;
  overflow-x: hidden;
}

/* CURSOR */
.cursor {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--nero);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s, border 0.25s;
}
.cursor.link-hover {
  width: 30px; height: 30px;
  background: transparent;
  border: 1.5px solid var(--viola);
}

/* ── LOGO CORNER ── */
.logo-corner {
  position: absolute;
  top: 28px;
  right: 44px;
  width: 264px;
  pointer-events: none;
}
@media (max-width: 1200px) {
  .logo-corner { width: 180px; }
}
@media (max-width: 1024px) {
  .logo-corner { width: 140px; right: 28px; }
}
@media (max-width: 768px) {
  .logo-corner { display: none; }
}

/* ── NAV ── */
nav {
  position: fixed;
  left: 0; top: 0;
  height: 100vh;
  width: var(--nav-w);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 28px 40px 36px;
  border-right: 1px solid var(--linea);
  z-index: 100;
  background: var(--bianco);
  overflow-y: auto;
}

.nav-logo {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--viola);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-chapters {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 28px 0;
  flex: 1;
}

.nav-chapters li { position: relative; }

.nav-chapters a {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--grigio);
  text-decoration: none;
  display: block;
  padding: 5px 0 5px 12px;
  border-left: 2px solid transparent;
  margin-left: -12px;
  transition: color 0.2s, border-color 0.2s;
  line-height: 1.5;
}

.nav-chapters a:hover,
.nav-chapters a.active {
  color: var(--viola);
  border-left-color: var(--viola);
}

.nav-chapters a.chapter-link {
  color: var(--nero);
  font-weight: 800;
  margin-top: 10px;
}

.nav-chapters a.chapter-link:hover,
.nav-chapters a.chapter-link.active {
  color: var(--viola);
  border-left-color: var(--viola);
}

.nav-sub { padding-left: 10px; display: flex; flex-direction: column; }

.nav-footer {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grigio-chiaro);
  flex-shrink: 0;
}

/* ── MAIN ── */
main { margin-left: var(--nav-w); }

/* ── HERO (stile copertina PDF) ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 96px 88px;
  border-bottom: 1px solid var(--linea);
  position: relative;
}

/* Nascondo gli elementi decorativi che non ci sono nel PDF */
.hero-bg-letter { display: none; }

.hero-pretitle {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--grigio);
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero h1 {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 900;
  font-size: clamp(60px, 10vw, 128px);
  line-height: 0.93;
  letter-spacing: -0.03em;
  color: var(--nero);
  max-width: none;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.35s forwards;
}
.hero h1 em { font-style: normal; color: var(--viola); }

.hero-desc {
  margin-top: 44px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--grigio);
  max-width: 500px;
  font-weight: 400;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.55s forwards;
}

.hero-scroll {
  margin-top: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.75s forwards;
}
.scroll-line { width: 40px; height: 1px; background: var(--nero); }
.scroll-text {
  font-family: 'tt-travels-next', sans-serif;
  font-size: 9px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--grigio);
  font-weight: 400;
}

/* ── PAGE HERO (intestazione capitolo, stile pag. 3 PDF) ── */
.page-hero {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 96px 72px;
  border-bottom: 1px solid var(--linea);
  position: relative;
}

/* Numero decorativo: nascosto, non è nello stile PDF */
.page-hero .deco-num { display: none; }

.page-hero .section-label { margin-bottom: 16px; }

.page-hero h1 {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 900;
  font-size: clamp(44px, 7.5vw, 96px);
  line-height: 0.93;
  letter-spacing: -0.03em;
  color: var(--nero);
  max-width: none;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.15s forwards;
}
.page-hero h1 em { font-style: normal; color: var(--viola); }

.page-hero .hero-desc {
  margin-top: 28px;
  animation-delay: 0.3s;
}

/* ── SECTION LABEL (header di pagina stile PDF — uppercase spaziato) ── */
.section-label {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--grigio);
  margin-bottom: 48px;
  display: block;          /* niente flexbox, niente linea decorativa */
}
.section-label::after { display: none; }

/* ── SEZIONI ── */
section {
  padding: 80px 96px;
  border-bottom: 1px solid var(--linea);
  position: relative;
}
section:last-child { border-bottom: none; }

/* Numero decorativo di background: nascosto */
.deco-num { display: none; }

/* ── HEADINGS ── */
h2 {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 900;
  font-size: clamp(26px, 4vw, 52px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin-bottom: 48px;
  color: var(--nero);
}
h2 em { font-style: normal; color: var(--viola); }

h3 {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  margin-top: 48px;
  color: var(--nero);
}
h3:first-child { margin-top: 0; }

h4 {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0;
  margin-bottom: 10px;
  margin-top: 36px;
  color: var(--nero);
}
h4:first-child { margin-top: 0; }
/* Nessun pseudo-elemento "—" prima dell'h4 */
h4::before { content: none; }

p {
  font-family: 'tt-travels-next', sans-serif;
  font-size: 15px;
  line-height: 1.82;
  color: var(--nero);
  max-width: 680px;
  margin-bottom: 24px;
  font-weight: 400;
}
p:last-child { margin-bottom: 0; }
p strong { font-weight: 700; color: var(--nero); }
p em { font-style: italic; color: var(--grigio); }

/* DIVISORE — linea sottile full-width come nel PDF */
.divider {
  width: 100%;
  max-width: 680px;
  height: 1px;
  background: var(--linea);
  margin: 40px 0;
}

/* LISTE */
ul { list-style: none; padding: 0; margin-bottom: 24px; }
ul li {
  font-family: 'tt-travels-next', sans-serif;
  font-size: 15px;
  line-height: 1.82;
  padding: 2px 0 2px 22px;
  position: relative;
  max-width: 680px;
  font-weight: 400;
  color: var(--nero);
}
ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--viola);
  font-weight: 700;
}

/* BLOCKQUOTE */
blockquote {
  border-left: 3px solid var(--viola);
  padding-left: 24px;
  margin: 40px 0;
}
blockquote p {
  font-size: 15px;
  font-weight: 700;
  color: var(--nero);
  max-width: none;
  margin: 0;
}

/* BOX SCURO */
.box-dark {
  background: var(--nero);
  padding: 36px 44px;
  margin: 32px 0;
}
.box-dark p {
  font-family: 'tt-travels-next', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--bianco);
  max-width: none;
  margin: 0;
}
.box-dark strong { color: var(--bianco); }

/* ── TSEC HEADER (stile pag. 7 PDF: numero grande + linea + titolo) ── */
.tsec-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 56px;
  padding-bottom: 0;
  border-bottom: none;
  gap: 0;
}

.tsec-num {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 900;
  font-size: clamp(72px, 13vw, 160px);
  color: var(--nero);
  line-height: 1;
  letter-spacing: -0.04em;
  display: block;
}

/* Linea sotto il numero, esattamente come nel PDF */
.tsec-num::after {
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  background: var(--nero);
  margin-top: 6px;
  margin-bottom: 20px;
}

.tsec-title {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 900;
  font-size: clamp(22px, 3.5vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.0;
  margin: 0;
  color: var(--nero);
}
.tsec-title em { font-style: normal; color: var(--viola); }

/* ── INDEX: CHAPTER GRID ── */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--linea);
  margin-top: 48px;
}

.chapter-card {
  padding: 48px 52px;
  border-bottom: 1px solid var(--linea);
  border-right: 1px solid var(--linea);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}
.chapter-card:nth-child(2n) { border-right: none; }
.chapter-card:nth-last-child(-n+2) { border-bottom: none; }
.chapter-card:hover { background: var(--viola-light); }

.chapter-card-num {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--viola);
  margin-bottom: 20px;
}

.chapter-card-title {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 900;
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  color: var(--nero);
}
.chapter-card-title em { font-style: normal; color: var(--viola); }

.chapter-card-sub {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  font-size: 11px;
  color: var(--grigio);
  letter-spacing: 0.02em;
  line-height: 1.65;
}

.chapter-card-arrow {
  position: absolute;
  bottom: 28px; right: 36px;
  font-size: 22px;
  color: var(--viola);
  opacity: 0;
  font-weight: 900;
  transform: translateX(-8px);
  transition: opacity 0.2s, transform 0.2s;
}
.chapter-card:hover .chapter-card-arrow { opacity: 1; transform: none; }

/* ── TEMPLATE / CASE OVERVIEW GRID ── */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--linea);
  margin-top: 40px;
}

.template-item {
  padding: 28px 36px;
  border-bottom: 1px solid var(--linea);
  border-right: 1px solid var(--linea);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.2s;
}
.template-item:nth-child(2n) { border-right: none; }
.template-item:nth-last-child(-n+2) { border-bottom: none; }
.template-item:hover { background: var(--viola-light); }

.template-item-num {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--viola);
  margin-bottom: 10px;
}
.template-item-title {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--nero);
}
.template-item-sub {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  font-size: 11px;
  color: var(--grigio);
  letter-spacing: 0.02em;
  line-height: 1.65;
}

/* ── BELIEF GRID ── */
.belief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-top: 40px;
}
.belief-grid .lead p {
  font-size: clamp(15px, 1.8vw, 20px);
  max-width: none;
}

.tagline {
  margin-top: 64px;
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 900;
  font-size: clamp(20px, 3vw, 40px);
  color: var(--viola);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

/* ── CONCLUSIONI ── */
.conclusioni-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-top: 40px;
}
.conclusioni-grid .manifesto p {
  font-size: clamp(15px, 1.8vw, 20px);
  max-width: none;
}

/* ── BRIEF CASE TABS ── */
.case-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--linea);
  margin-top: 48px;
}
.case-tab {
  padding: 20px 24px;
  border-bottom: 1px solid var(--linea);
  border-right: 1px solid var(--linea);
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  background: none;
  border-top: none; border-left: none;
  text-align: left;
  transition: background 0.2s, color 0.2s;
  color: var(--nero);
  line-height: 1.3;
}
.case-tab:nth-child(3n) { border-right: none; }
.case-tab:hover, .case-tab.active {
  background: var(--nero);
  color: var(--bianco);
}

.case-panel { display: none; padding-top: 56px; }
.case-panel.active { display: block; }

.case-intro {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.82;
  max-width: 680px;
  margin-bottom: 40px;
}

/* ── TABELLE ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 24px;
}
thead tr { border-bottom: 2px solid var(--nero); }
th {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grigio);
  padding: 0 16px 12px 0;
  text-align: left;
}
th:first-child { width: 36px; }
th:nth-child(2) { width: 240px; }
tbody tr { border-bottom: 1px solid var(--linea); transition: background 0.15s; }
tbody tr:hover { background: var(--viola-light); }
td {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  padding: 15px 16px 15px 0;
  vertical-align: top;
  line-height: 1.45;
  color: var(--nero);
}
td:first-child {
  font-weight: 700;
  font-size: 11px;
  color: var(--grigio);
}

.focus {
  display: inline-block;
  background: var(--viola);
  color: var(--bianco);
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 700;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  margin-left: 7px;
  vertical-align: middle;
}

/* ── PAGER ── */
.pager {
  padding: 56px 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--viola);
}
.pager-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pager-label {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}
.pager-title {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: #ffffff;
  transition: opacity 0.2s;
  letter-spacing: -0.01em;
}
.pager-link:hover .pager-title { opacity: 0.75; }
.pager-link.next { text-align: right; }

/* ── FOOTER ── */
footer {
  margin-left: var(--nav-w);
  padding: 32px 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--linea);
}
footer a {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--viola);
  text-decoration: none;
}
footer a:hover { text-decoration: underline; }
footer span {
  font-family: 'tt-travels-next', sans-serif;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--grigio-chiaro);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  :root { --nav-w: 190px; }
  .hero, .page-hero, section, .pager, footer { padding-left: 48px; padding-right: 48px; }
  .belief-grid, .conclusioni-grid { grid-template-columns: 1fr; gap: 40px; }
  .chapter-grid, .template-grid { grid-template-columns: 1fr; }
  .chapter-card:nth-child(n), .template-item:nth-child(n) { border-right: none; }
  .chapter-card:nth-last-child(-n+2), .template-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--linea); }
  .chapter-card:last-child, .template-item:last-child { border-bottom: none; }
  .case-tabs { grid-template-columns: 1fr 1fr; }
  .case-tab:nth-child(3n) { border-right: 1px solid var(--linea); }
  .case-tab:nth-child(2n) { border-right: none; }
}
@media (max-width: 768px) {
  nav { display: none; }
  main, footer { margin-left: 0; }
  .hero, .page-hero, section, .pager, footer { padding-left: 28px; padding-right: 28px; }
  .case-tabs { grid-template-columns: 1fr; }
  .case-tab:nth-child(n) { border-right: none; }
  .pager { flex-direction: column; gap: 28px; align-items: flex-start; }
}

/* Touch devices: ripristina cursore di sistema e nascondi il cursore custom */
@media (hover: none) and (pointer: coarse) {
  body { cursor: auto; }
  .cursor { display: none; }
}

/* Rispetta la preferenza di riduzione del movimento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { transition: none; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
