/* =========================================================================
   FotoHoliday — base.css
   Token di design, reset, tipografia editoriale, utilità di accessibilità.
   ========================================================================= */

:root {
  /* --- Colore ------------------------------------------------------------ */
  --sand-50:  #FDFAF5;
  --sand-100: #F7F0E5;
  --sand-200: #EFE4D4;
  --sand-300: #E2D2BC;
  --sand-400: #CDB89C;

  --ink-900: #17130F;
  --ink-800: #241E18;
  --ink-700: #3B332A;
  --ink-500: #6A6054;
  --ink-400: #8A8073;

  --terra-700: #97401F;
  --terra-600: #B4512A;
  --terra-500: #C86A3E;
  --terra-100: #F3DFD2;

  --ocean-800: #143F49;
  --ocean-700: #1D5A66;
  --ocean-200: #C9DDE0;

  --white: #FFFFFF;

  --bg: var(--sand-50);
  --bg-alt: var(--sand-100);
  --text: var(--ink-800);
  --text-muted: var(--ink-500);
  --accent: var(--terra-600);
  --line: rgba(23, 19, 15, 0.12);
  --line-strong: rgba(23, 19, 15, 0.24);

  /* --- Tipografia -------------------------------------------------------- */
  /* Nessun font remoto: stack di sistema con fallback ampi, così la pagina
     resta identica anche offline e in sottocartella. */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    "Hoefler Text", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.19rem, 1.12rem + 0.35vw, 1.4rem);
  --step-2:  clamp(1.42rem, 1.29rem + 0.63vw, 1.8rem);
  --step-3:  clamp(1.7rem, 1.47rem + 1.1vw, 2.35rem);
  --step-4:  clamp(2.02rem, 1.65rem + 1.85vw, 3.1rem);
  --step-5:  clamp(2.4rem, 1.78rem + 3.1vw, 4.2rem);

  /* --- Spazio e forma ---------------------------------------------------- */
  --space-2xs: 0.35rem;
  --space-xs: 0.6rem;
  --space-s: 1rem;
  --space-m: 1.6rem;
  --space-l: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8.5rem;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 22px;
  --radius-pill: 999px;

  --shadow-s: 0 1px 2px rgba(23, 19, 15, 0.05), 0 4px 14px rgba(23, 19, 15, 0.05);
  --shadow-m: 0 2px 6px rgba(23, 19, 15, 0.06), 0 18px 40px rgba(23, 19, 15, 0.1);
  --shadow-l: 0 30px 70px rgba(23, 19, 15, 0.18);

  --container: 76rem;
  --container-narrow: 46rem;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 700ms;

  --header-h: 4.5rem;
}

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

/* L'attributo `hidden` vince su qualunque `display` dichiarato nei fogli del
   sito (per esempio `.flow__footer { display: flex }`, che altrimenti lascia
   visibili "Indietro" e "Prova la prenotazione" a percorso concluso).
   Regola unica per tutto il sito: non va indebolita né duplicata altrove. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img { height: auto; }

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

button { cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-s);
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 var(--space-s); text-wrap: pretty; }

a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

ul, ol { margin: 0 0 var(--space-s); padding-left: 1.2em; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-l) 0;
}

::selection {
  background: var(--terra-100);
  color: var(--ink-900);
}

/* --- Focus visibile ------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--terra-600);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- Utilità ------------------------------------------------------------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.container--narrow { width: min(100% - 2.5rem, var(--container-narrow)); }

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

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 200;
  transform: translateY(-160%);
  background: var(--ink-900);
  color: var(--sand-50);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease);
}

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

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terra-600);
  margin: 0 0 var(--space-xs);
}

.eyebrow--light { color: var(--sand-300); }

.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-700);
}

.text-muted { color: var(--text-muted); }

.rule {
  width: 3.5rem;
  height: 2px;
  background: var(--terra-600);
  border: 0;
  margin: 0 0 var(--space-m);
}

.stack > * + * { margin-top: var(--space-s); }

.mt-m { margin-top: var(--space-m); }
.measure { max-width: 46rem; }

.actions-center {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  justify-content: center;
}

.caption {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
