/* =========================================================
   Viaggi da sogno — diario di viaggi (versione di lancio)
   Direzione: "Il diario del bracciante che sogna"
   Display: Bricolage Grotesque · Body: Newsreader (serif lettura)
   Palette guidata da azzurro + verde su carta calda
   ========================================================= */

:root {
  /* superfici */
  --paper:      #f7f3ea;   /* carta calda, sfondo */
  --sand:       #efe6d3;   /* sezione alternata, più calda */
  --card:       #fffdf7;   /* superficie card */
  /* inchiostro */
  --ink:        #1d2922;   /* verde-nero caldo, testo */
  --ink-soft:   #4c574f;   /* testo secondario (AA su carta) */
  --line:       #e1d6bf;   /* bordi caldi */
  /* colori brand */
  --verde:      #15735a;
  --verde-deep: #0f5743;
  --azzurro:    #176f9e;
  --azzurro-deep:#11597f;
  --sole:       #e7a93c;   /* spark caldo, sole/tram */
  --sole-soft:  #f2cb7e;   /* sole schiarito per AA su fondo scuro */
  --tape:       rgba(231,169,60,.42); /* washi tape */

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;

  --header-h: 64px;
  --maxw: 1120px;
  --pad: clamp(1.15rem, 5vw, 2rem);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 14px 36px -22px rgba(29,41,34,.55);
  --shadow-soft: 0 6px 20px -14px rgba(29,41,34,.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;      /* 17px base, lettura comoda */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-optical-sizing: auto;
}

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

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  color: var(--ink);
}

p { margin: 0 0 1rem; }

a { color: var(--azzurro-deep); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

section { padding-block: clamp(3.2rem, 9vw, 6rem); }

/* etichetta sezione, sobria (no mono uppercase tracked, no linea decorativa) */
.kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--verde-deep);
  margin: 0 0 .8rem;
}

.section-title {
  font-size: clamp(1.85rem, 5.5vw, 3rem);
}
.section-lead {
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

/* ---------- bottoni / CTA ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 48px;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--azzurro); color: #fff; }
.btn-primary:hover { background: var(--azzurro-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--verde); color: var(--verde-deep); }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(247,243,234,.96);  /* solido, niente backdrop-filter (trappola fixed) */
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand svg { width: 32px; height: 32px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -.02em;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  background: var(--paper);                 /* solido, alpha 1 */
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: .6rem var(--pad) 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  transform: translateY(calc(-100% - var(--header-h) - 24px));
  visibility: hidden;
  transition: transform .34s ease, visibility .34s ease;
}
.nav.is-open { transform: translateY(0); visibility: visible; }
.nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: .3rem .2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav a:last-child { border-bottom: 0; }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-top: clamp(2.4rem, 7vw, 4rem); padding-bottom: 0; }
.hero-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--verde-deep);
  font-size: 1rem;
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 8.5vw, 5rem);
  font-weight: 800;
  max-width: 14ch;
  margin-bottom: 1rem;
}
.hero h1 .accent { color: var(--azzurro); }
.hero-sub {
  font-size: clamp(1.1rem, 2.4vw, 1.32rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 1.6rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem 1.2rem;
  margin-bottom: clamp(2.4rem, 6vw, 3.4rem);
}
.hero-note {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 1rem;
}

/* foto hero come grande cartolina del quaderno */
.hero-photo {
  position: relative;
  margin: 0;
}
.hero-photo .frame {
  position: relative;
  background: var(--card);
  padding: 12px 12px 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-inline: var(--pad);
  border-radius: 6px;
  transform: rotate(-1.1deg);
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 3px;
}
.hero-photo .caption {
  font-style: italic;
  color: var(--ink-soft);
  font-size: .98rem;
  padding-top: .55rem;
}
.tape {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 116px;
  height: 26px;
  background: var(--tape);
  border-radius: 2px;
}

/* =========================================================
   INTRO — "Ciao, sono Gianluca"
   ========================================================= */
.intro { background: var(--sand); }
.intro-grid { display: grid; gap: clamp(2rem, 5vw, 3.4rem); }
.intro-text h2 { font-size: clamp(1.9rem, 5.5vw, 3rem); }
.intro-text p { font-size: 1.14rem; color: var(--ink); max-width: 56ch; }
.intro-text .signoff {
  font-style: italic;
  color: var(--verde-deep);
  font-size: 1.18rem;
  margin-top: .4rem;
}
.snapshot {
  background: var(--card);
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  max-width: 420px;
  transform: rotate(1.4deg);
}
.snapshot img { border-radius: 3px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.snapshot .caption {
  font-style: italic;
  color: var(--ink-soft);
  font-size: .96rem;
  padding-top: .5rem;
}

/* =========================================================
   CATEGORIE — "Cosa troverai"
   ========================================================= */
.cats-head { margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.cats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.cat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
}
.cat .ico {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(23,111,158,.10);
  color: var(--azzurro-deep);
  margin-bottom: 1rem;
}
.cat .ico svg { width: 26px; height: 26px; }
.cat h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.cat p { color: var(--ink-soft); margin: 0; font-size: 1.02rem; }

/* =========================================================
   METE — snapshot del quaderno
   ========================================================= */
.mete { background: var(--sand); }
.mete-head { margin-bottom: clamp(2rem, 5vw, 3rem); }
.mete-grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 2.2rem);
  grid-template-columns: 1fr;
}
.meta-card {
  position: relative;
  background: var(--card);
  padding: 12px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  transform: rotate(var(--tilt, -1deg));
  transition: transform .25s ease, box-shadow .25s ease;
}
.meta-card:nth-child(even) { --tilt: 1.2deg; }
.meta-card:hover { transform: rotate(0deg) translateY(-4px); box-shadow: var(--shadow); }
.meta-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 3px;
}
.meta-card .tag {
  position: absolute;
  top: 22px; right: 22px;
  background: var(--paper);
  color: var(--verde-deep);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .8rem;
  padding: .28rem .66rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.meta-card .place {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.32rem;
  padding-top: .7rem;
}
.meta-card .caption {
  font-style: italic;
  color: var(--ink-soft);
  font-size: .98rem;
  margin: 0;
}

/* =========================================================
   MANIFESTO — momento a colore pieno
   ========================================================= */
.manifesto {
  background: var(--verde-deep);
  color: #f3efe4;
  text-align: center;
}
.manifesto .container { max-width: 880px; }
.manifesto h2 {
  color: #fff;
  font-size: clamp(2rem, 6.2vw, 3.6rem);
  font-weight: 800;
  margin-bottom: 1.1rem;
}
.manifesto h2 .spark { color: var(--sole); }
.manifesto .kicker { color: var(--sole-soft); }
.manifesto p {
  color: rgba(255,255,255,.86);
  font-size: 1.2rem;
  max-width: 56ch;
  margin-inline: auto;
}
.values {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  text-align: left;
}
.values li {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
}
.values strong {
  font-family: var(--font-display);
  display: block;
  color: #fff;
  font-size: 1.12rem;
  margin-bottom: .2rem;
}
.values span { color: rgba(255,255,255,.82); font-size: 1rem; }

/* =========================================================
   CLOSING
   ========================================================= */
.closing { text-align: center; }
.closing .container { max-width: 720px; }
.closing h2 { font-size: clamp(1.9rem, 5.5vw, 3rem); }
.closing p { color: var(--ink-soft); font-size: 1.16rem; }
.closing .btn { margin-top: 1rem; }
.soon-note {
  margin-top: 1.4rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: #d9d3c4;
  padding-block: clamp(2.6rem, 6vw, 3.6rem);
}
.footer-inner {
  display: grid;
  gap: 1.6rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
}
.footer-brand svg { width: 30px; height: 30px; }
.footer-brand .brand-name { color: #fff; }
.footer-tag { color: #b9b2a1; max-width: 40ch; margin: .6rem 0 0; }
.footer-social {
  display: flex;
  gap: .7rem;
  align-items: center;
}
.footer-social .label { color: #b9b2a1; font-size: .95rem; font-style: italic; }
.social-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  color: #e8e2d4;
  opacity: .55;   /* placeholder "in attesa", non cliccabile */
}
.social-icon svg { width: 20px; height: 20px; }
.footer-meta {
  border-top: 1px solid rgba(255,255,255,.13);
  padding-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.2rem;
  justify-content: space-between;
  align-items: center;
  color: #b9b2a1;
  font-size: .92rem;
}
.footer-credit { margin: 0; }
.footer-credit a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   FOCUS / ACCESSIBILITÀ
   ========================================================= */
:focus-visible {
  outline: 3px solid var(--azzurro);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1rem;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* =========================================================
   MOTION (reveal leggero)
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .meta-card, .btn, .btn .arrow { transition: none; }
}

/* =========================================================
   BREAKPOINT 768+  (desktop nav inline)
   ========================================================= */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav {
    position: static;
    transform: none;
    visibility: visible;
    flex-direction: row;
    align-items: center;
    gap: .4rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .nav a {
    min-height: 40px;
    border-bottom: 0;
    padding: .4rem .8rem;
    font-size: 1rem;
    border-radius: 8px;
  }
  .nav a:hover { color: var(--verde-deep); }

  .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
  .mete-grid { grid-template-columns: repeat(2, 1fr); }

  .intro-grid {
    grid-template-columns: 1.25fr .9fr;
    align-items: center;
  }
  .snapshot { transform: rotate(2deg); justify-self: end; }

  .hero h1 { font-size: clamp(3.4rem, 7vw, 5.4rem); }
  .hero-photo .frame { transform: rotate(-1.1deg); }
}

/* =========================================================
   BREAKPOINT 1024+
   ========================================================= */
@media (min-width: 1024px) {
  .cats-grid { grid-template-columns: repeat(4, 1fr); }
  .mete-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-photo .frame { max-width: var(--maxw); margin-inline: auto; }
  .hero-photo img { aspect-ratio: 21 / 9; }
  .values { grid-template-columns: repeat(3, 1fr); }
}
