/* ==========================================================================
   base.css — design tokens, reset, tipografia, utility
   ========================================================================== */

:root {
  /* Colori */
  --c-paper: #f4f1ec;
  --c-paper-deep: #ebe6dd;
  --c-ink: #14201f;
  --c-ink-soft: #4a5655;
  --c-lake: #1c3a3d;
  --c-lake-deep: #102426;
  --c-sand: #b79d7a;
  --c-line: rgba(20, 32, 31, 0.16);
  --c-line-light: rgba(244, 241, 236, 0.22);
  --c-placeholder: #d6d0c5;

  /* Tipografia */
  --f-serif: "Marcellus", "Times New Roman", serif;
  --f-hero: "Marcellus Hero", "Times New Roman", serif;
  --f-sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-eyebrow: 0.75rem;
  --fs-body: 1rem;
  --fs-small: 0.9375rem; /* testo secondario: descrizioni, dettagli, note */
  --fs-lead: 1.125rem; /* testo introduttivo */
  --fs-h4: clamp(1.75rem, 2.6vw, 2.5rem); /* titolo piccolo: mete, passaggi, titoli delle sezioni legali */
  --fs-h3: clamp(2.4rem, 3.6vw, 3.4rem); /* sottotitolo: nome della casa, domanda, scheda */
  --fs-h2: clamp(3.5rem, 6.8vw, 6.25rem); /* titolo di sezione: stessa misura in tutte le sezioni (100 px su schermo largo) */
  --fs-h1: clamp(4rem, 7.5vw, 6.75rem); /* titolo della pagina (pagine interne) */

  /* Layout */
  --container: 1320px;
  --gutter: 3rem;
  --section-y: 9rem;
  --bar-h: 6.5rem; /* barra con logo e menu */
  --areas-h: 2.5rem; /* fascia con le tre attività: tour, case, chiosco */
  --header-h: calc(var(--bar-h) + var(--areas-h));

  /* Movimento */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.25s;
  --t-slow: 0.9s;
}

/* Caratteri ----------------------------------------------------------------
   Marcellus (titoli) e Jost (testi), scaricati in site-new/fonts: il sito non chiama piu Google.
   size-adjust: ogni carattere e ridimensionato in modo che le righe occupino la stessa larghezza
   di quello che sostituisce (Cormorant, Playfair, Inter), cosi gli spazi della pagina non cambiano.
   "Marcellus Hero" e lo stesso file con la correzione per il titolo maiuscolo e le cifre grandi. */

@font-face {
  font-family: "Marcellus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  size-adjust: 86.4%;
  src: url("../fonts/marcellus-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Marcellus Hero";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  size-adjust: 101%;
  src: url("../fonts/marcellus-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Marcellus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  size-adjust: 86.4%;
  src: url("../fonts/marcellus-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Marcellus Hero";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  size-adjust: 101%;
  src: url("../fonts/marcellus-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  size-adjust: 110%;
  src: url("../fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  size-adjust: 110%;
  src: url("../fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* Reset ------------------------------------------------------------------ */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  font-synthesis: none; /* niente grassetti o corsivi finti: Marcellus ha un solo peso */
}

body {
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--c-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--c-lake-deep);
  outline-offset: 3px;
}

/* sulle parti scure il bordo del focus è color sabbia */
.site-header :focus-visible,
.hero :focus-visible,
.routes :focus-visible,
.contact :focus-visible,
.site-footer--lake :focus-visible,
.wa-float:focus-visible {
  outline-color: var(--c-sand);
}

::selection {
  background: var(--c-lake);
  color: var(--c-paper);
}

/* Tipografia -------------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: var(--f-serif);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.15;
}

h4 {
  font-size: var(--fs-h4);
}

em {
  font-style: italic;
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.lead {
  font-size: var(--fs-lead);
  color: var(--c-ink-soft);
  max-width: 34rem;
}

/* Utility ----------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--c-ink);
  color: var(--c-paper);
  transform: translateY(-100%);
  transition: transform var(--t-fast) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Reveal on scroll (attivo solo se JS è disponibile) ----------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--t-slow) var(--ease),
    transform var(--t-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
