:root {
  --ink: #43241f;
  --paper: #ffffff;
  --pad: clamp(16px, 2.2vw, 32px);
  --serif: "Newsreader", "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); font-family: var(--sans); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* Barra in alto */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: var(--pad);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar-right { display: flex; align-items: center; gap: 12px; }

/* Selettore lingua: serif del brand, marrone sulla pagina, terracotta per l'altra lingua */
.lang {
  --lang-on: #280805; --lang-off: #b06453;
  display: flex; align-items: baseline; gap: .3em;
  font-family: var(--serif); font-weight: 500; font-size: clamp(18px, 1.5vw, 22px); line-height: 1;
  transition: color .3s ease;
}
.lang a { padding: 10px 4px; color: var(--lang-off); text-decoration: none; transition: color .3s ease; }
.lang a[aria-current="page"] { color: var(--lang-on); }
.lang a:hover { font-style: italic; color: var(--lang-on); }
.lang span { color: var(--lang-off); }
.bar[data-tone="red"] .lang  { --lang-on: #ffffff; --lang-off: #280805; }
.bar[data-tone="dark"] .lang { --lang-on: #ffffff; --lang-off: #b06453; }
.logo { display: block; width: clamp(44px, 5vw, 72px); color: var(--ink); }
.logo svg { display: block; width: 100%; height: auto; }

.burger {
  display: none; /* menu nascosto: rimuovi questa riga per riattivarlo */
  width: 40px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; gap: 6px; color: var(--ink);
}
.burger span { display: block; height: 2px; background: currentColor; transition: transform .3s ease, opacity .2s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Menu a tutto schermo */
.menu {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; justify-content: center; gap: .1em;
  padding: 0 var(--pad);
  background: var(--ink);
  font-family: var(--serif); font-weight: 500; font-size: clamp(48px, 11vw, 150px); line-height: 1;
}
.menu[hidden] { display: none; }
.menu a { color: var(--paper); text-decoration: none; width: fit-content; }
.menu a:hover { font-style: italic; }
.bar:has(.burger[aria-expanded="true"]) { color: var(--paper); }
.bar:has(.burger[aria-expanded="true"]) .logo,
.bar:has(.burger[aria-expanded="true"]) .burger { color: var(--paper); }

/* Hero */
.hero-wrap { --p: 0; height: 150vh; }
.hero {
  position: sticky; top: 0; overflow: hidden;
  height: 100vh; height: 100svh; min-height: 560px;
}
.photos { position: absolute; inset: 0; z-index: 1; opacity: calc(1 - var(--p) * 1.3); }

.title {
  position: absolute; z-index: 2; left: 50%; top: clamp(60px, 8vh, 110px);
  transform: translateX(-50%);
  translate: 0 calc(var(--p) * -10vh); opacity: calc(1 - var(--p) * 1.25);
  margin: 0; width: max-content; max-width: 94vw;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(52px, 9.4vw, 150px); line-height: .88; letter-spacing: -.035em;
  text-align: center;
}
.title span { display: block; }

/* Foto */
.photo {
  position: absolute; margin: 0;
  aspect-ratio: 4 / 5;
  translate: calc(var(--p) * var(--dx, 0) * 1vw) calc(var(--p) * var(--dy, 0) * 1vh);
  opacity: 0; transform: translate3d(var(--x, 0), var(--y, 0), 0) rotate(var(--r, 0deg));
  animation: arrive .9s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 110ms + 150ms);
  will-change: transform;
}
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.p1 { --dx: -30; --dy: -10; --i: 0; --r: -1deg; left: 0;   top: 31%; width: min(22vw, 40svh); }
.p2 { --dx: -12; --dy: -30; --i: 1; --r: -3deg; left: 30%; top: 13%; width: min(12vw, 22svh); aspect-ratio: 1 / 1.1; }
.p3 { --dx: 0;   --dy: 30;  --i: 2; --r: 0deg;  left: 46%; top: 38%; width: min(17vw, 30svh); }
.p4 { --dx: 14;  --dy: -30; --i: 3; --r: 0deg;  left: 70%; top: 18%; width: min(11.5vw, 21svh); aspect-ratio: 3 / 4; }
.p5 { --dx: 30;  --dy: 8;   --i: 4; --r: 0deg;  right: 0;  top: 34%; width: min(13vw, 24svh); aspect-ratio: 1 / 1.05; }

@keyframes arrive {
  from { opacity: 0; transform: translate3d(var(--x, 0), calc(var(--y, 0px) + 24px), 0) rotate(var(--r, 0deg)); }
  to   { opacity: 1; transform: translate3d(var(--x, 0), var(--y, 0), 0) rotate(var(--r, 0deg)); }
}

/* Wordmark (SVG) */
.wordmark {
  position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: 0;
  margin: 0; line-height: 0;
  translate: 0 calc(var(--p) * 6vh); opacity: calc(1 - var(--p) * 1.25);
}
.wordmark img { display: block; width: 100%; height: auto; }

/* La strada: il foglio scuro sale sopra la hero */
.road {
  --bg: #b06453; --fg: #ffffff; --accent: #280805; --rp: 0;
  position: relative; z-index: 3;
  margin-top: -50vh; height: 320vh;
  background: var(--bg); color: var(--fg);
  border-radius: clamp(20px, 3vw, 48px) clamp(20px, 3vw, 48px) 0 0;
}
.road-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.road-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.road .traveller .st0 { fill: var(--accent); }

.road-copy {
  position: absolute; z-index: 2; left: var(--pad); right: var(--pad); top: 50%; translate: 0 -50%;
  max-width: 18em;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 5.4vw, 88px); line-height: 1.06; letter-spacing: -.03em;
}
.road .line { margin: 0 0 .9em; max-width: none; font: inherit; letter-spacing: inherit; opacity: var(--a); translate: 0 calc((1 - var(--a)) * 3rem); }
.js .road .l1 { --a: clamp(0, calc((var(--rp) - .08) * 7), 1); }
.hl { font-style: normal; color: var(--accent); }

/* Header leggibile sulle sezioni scure */
.bar.on-dark .logo .st0 { fill: var(--paper); }
.bar:has(.burger[aria-expanded="true"]) .logo .st0 { fill: var(--paper); }

/* Sezioni */
.section {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 6vw, 96px);
  padding: clamp(72px, 14vh, 160px) var(--pad);
  background: var(--paper);
  border-top: 1px solid rgba(67, 36, 31, .18);
}
.section h2 {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(44px, 7vw, 112px); line-height: .95; letter-spacing: -.035em;
}
.section p { margin: 0 0 1.2em; max-width: 62ch; font-family: var(--serif); font-size: clamp(18px, 1.5vw, 22px); line-height: 1.6; }
.section a.mail { color: inherit; font-family: var(--sans); font-weight: 800; font-size: clamp(22px, 2.4vw, 36px); letter-spacing: -.03em; }

/* Contatti: solo testo, stessa voce della sezione "strada" */
.section--solo { border-top: 0; padding-top: clamp(96px, 18vh, 200px); padding-bottom: clamp(96px, 18vh, 200px); }
.section--solo .text { grid-column: 1 / -1; min-width: 0; }
.section--solo p { max-width: 20em; font-weight: 500; font-size: clamp(24px, 3.2vw, 52px); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .8em; }
.section--solo a.mail { font-family: var(--serif); font-weight: 500; font-size: .8em; overflow-wrap: anywhere; letter-spacing: inherit; color: #b5655a; text-underline-offset: .12em; }

/* Footer */
.footer { padding: clamp(40px, 7vh, 80px) var(--pad) var(--pad); background: #b06453; color: var(--paper); }
.footer a { color: inherit; text-underline-offset: 3px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1em 2em; }
.legal { margin: clamp(32px, 6vh, 64px) 0 0; max-width: 78ch; font-style: normal; font-size: 13px; line-height: 1.7; opacity: .7; overflow-wrap: anywhere; }
.social { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .4em 1.6em; font-family: var(--serif); font-size: clamp(24px, 3vw, 44px); }
.social a { text-decoration: none; }
.social a:hover { font-style: italic; }
.footer :focus-visible { outline-color: var(--paper); }
.copy { margin: 1em 0 0; font-size: 13px; opacity: .7; }

@media (max-width: 720px) {
  .section { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .section--solo .text { grid-column: 1; }
  .section--solo p { font-size: clamp(26px, 7vw, 40px); }
  .road-copy { max-width: 100%; font-size: clamp(28px, 8.6vw, 48px); }
  .footer .social { font-size: clamp(24px, 8vw, 36px); }

  .hero { min-height: 520px; }
  .title { top: clamp(72px, 13svh, 120px); font-size: clamp(48px, 16.5vw, 92px); }
  /* foto: raggruppate tra titolo e logotipo, in basso */
  .p1 { left: 0;    top: 48%; width: 34vw; }
  .p2 { left: 4%;   top: 15%; width: 20vw; }
  .p3 { left: 36%;  top: 60%; width: 30vw; }
  .p4 { left: auto; right: 4%; top: 17%; width: 19vw; }
  .p5 { right: 0;   top: 46%; width: 28vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .photo { animation: none; opacity: 1; }
  .hero-wrap { height: 100svh; }
  .road { margin-top: 0; height: auto; }
  .road-stage { position: relative; min-height: 100svh; }
  .burger span { transition: none; }
}
