/* ============================================================
   Caffè Cipriani dal 1957 — demo "Dalle quattro a mezzanotte"
   Palette: blu alba/notte, panna, pietra, verde tenda, rosso frutta (accento)
   Nessun gradiente decorativo, niente glassmorphism, niente pill:
   superfici piene, filetti tipografici, numeri grandi.
   ============================================================ */

:root {
  --night: #0e1d2c;
  --dusk: #16293d;
  --deep: #0a1622;
  --panna: #f4ead9;
  --stone: #ece2cf;
  --mandorla: #e2cda6;
  --green: #2e5d47;
  --green-dark: #224736;
  --red: #b0392b;
  --ink: #1c2a35;
  --ink-soft: #3d4f5c;
  --line-dark: rgba(244, 234, 217, 0.22);
  --line-light: rgba(28, 42, 53, 0.18);
  --serif: "Fraunces", "Georgia", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --header-h: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--panna);
  overflow-x: hidden;
}

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

section[id], footer[id] { scroll-margin-top: var(--header-h); }

a { color: inherit; }

h1, h2, h3 { font-family: var(--serif); font-weight: 900; line-height: 1.05; margin: 0; }

::selection { background: var(--red); color: var(--panna); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--night);
  color: var(--panna);
  padding: 0.75rem 1.25rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }

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

/* ============ Header ============ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  z-index: 100;
  color: var(--panna);
  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
.site-header.is-solid {
  background: var(--night);
  box-shadow: 0 1px 0 rgba(244, 234, 217, 0.14);
}

.wordmark { text-decoration: none; line-height: 1.1; }
.wordmark-logo { display: block; height: 44px; width: auto; }

.site-nav { display: flex; gap: clamp(1rem, 2.5vw, 2rem); }
.site-nav a {
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { border-bottom-color: currentColor; }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.lang-switch {
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  border: 1px solid currentColor;
  padding: 0.35rem 0.6rem;
}
.lang-switch:hover { background: var(--panna); color: var(--night); }

/* ============ Bottoni (squadrati, pieni, niente pill) ============ */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border: 1px solid currentColor;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--red); border-color: var(--red); color: var(--panna); }
.btn-primary:hover { background: var(--night); border-color: var(--night); }

.btn-ghost { color: var(--panna); }
.btn-ghost:hover { background: var(--panna); color: var(--night); }

.btn-ghostlight { color: var(--panna); }
.btn-ghostlight:hover { background: var(--panna); color: var(--night); }

.btn-small { padding: 0.55rem 1rem; font-size: 0.75rem; }
.btn-small:hover { background: var(--panna); color: var(--night); }

/* ============ Hero ============ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--panna);
  overflow: hidden;
}

.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.06);
}
.hero-veil {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 34, 0.58);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + 2rem) clamp(1.25rem, 5vw, 4rem) clamp(3.5rem, 8vh, 5.5rem);
  max-width: 62rem;
}

.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  color: var(--mandorla);
}

.hero-title {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero-title em { font-style: italic; font-weight: 600; color: var(--mandorla); }

.hero-sub {
  max-width: 34rem;
  margin: 1.5rem 0 2rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: rgba(244, 234, 217, 0.88);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-hours {
  margin: 2rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.75);
}
.dot-open {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.4em;
  background: var(--green);
  border-radius: 50%;
}

.hero-scrollhint {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3rem);
  bottom: 1.4rem;
  z-index: 2;
  margin: 0;
  writing-mode: vertical-rl;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.6);
}

/* ============ La giornata — stage ============ */

.day { background: var(--deep); }

/* Stato statico (no-JS / reduced-motion): capitoli in colonna */
.day-track { position: relative; }
.stage { position: relative; }

.chapter {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--panna);
}

.chapter-bg { position: absolute; inset: 0; }
.chapter-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  will-change: transform;
}

.chapter-veil { position: absolute; inset: 0; pointer-events: none; }
.veil-night { background: rgba(10, 22, 34, 0.58); }
.veil-dawn { background: rgba(14, 29, 44, 0.28); }
.veil-noon { background: rgba(244, 234, 217, 0.06); }
.veil-afternoon { background: rgba(94, 64, 28, 0.18); }
.veil-evening { background: rgba(10, 22, 34, 0.42); }
.veil-midnight { background: rgba(10, 22, 34, 0.7); }

.chapter-figure {
  position: relative;
  z-index: 2;
  margin: 0;
  width: min(44vw, 34rem);
  will-change: transform;
}
.chapter-figure img {
  width: 100%;
  border: 1px solid var(--line-dark);
}
.chapter-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.9);
  background: rgba(10, 22, 34, 0.72);
  display: inline-block;
  padding: 0.2rem 0.5rem;
}
.figure-left { margin-left: clamp(1.25rem, 6vw, 7rem); }
.figure-right { margin-left: auto; margin-right: clamp(1.25rem, 6vw, 7rem); }

.chapter-text {
  position: relative;
  z-index: 3;
  width: min(30rem, 88vw);
  padding: clamp(1.4rem, 3vw, 2.4rem);
}
.chapter-night .chapter-text,
.chapter-midnight .chapter-text { margin-left: auto; margin-right: clamp(1.25rem, 7vw, 9rem); }
.chapter-dawn .chapter-text,
.chapter-afternoon .chapter-text { margin-left: clamp(1.25rem, 7vw, 9rem); margin-right: auto; }
.chapter-noon .chapter-text { margin-left: auto; margin-right: clamp(1.25rem, 7vw, 9rem); }

.panel-dark { background: var(--night); border-left: 3px solid var(--red); }
.panel-light { background: var(--panna); color: var(--ink); border-left: 3px solid var(--red); }
.panel-wide { margin-left: clamp(1.25rem, 7vw, 9rem) !important; }
.panel-center { margin-inline: auto !important; text-align: left; }

.chapter-time {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--red);
}
.panel-dark .chapter-time { color: var(--mandorla); }

.chapter-text h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  margin-bottom: 0.8rem;
  text-wrap: balance;
}
.chapter-text p { margin: 0 0 0.4rem; }
.chapter-text .btn { margin-top: 1.2rem; }

/* Bagliori di luce (dischi sfocati a colore pieno, non gradienti CSS) */
.stage-glow {
  position: absolute;
  z-index: 1;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}
.glow-sky { background: #f0c98f; top: -12vmax; left: 60%; }
.glow-facade { background: #e8a34e; top: 34%; left: 22%; width: 34vmax; height: 34vmax; }

/* Indicatore temporale: solo nella modalità enhanced (sticky) */
.time-rail { display: none; }
html.enhanced .time-rail {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: clamp(0.9rem, 2.4vw, 2.2rem);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.1rem;
  color: var(--panna);
}
.rail-clock { margin: 0; }
.rail-clock-value {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-variant-numeric: tabular-nums;
  background: var(--night);
  border: 1px solid var(--line-dark);
  padding: 0.25rem 0.7rem;
}
.rail-ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-end;
}
.rail-ticks span {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
  background: rgba(10, 22, 34, 0.72);
  padding: 0.1rem 0.35rem;
  transition: opacity 0.3s ease;
}
.rail-ticks li.is-active span { opacity: 1; color: var(--mandorla); }
.rail-line {
  position: absolute;
  top: 4.2rem;
  bottom: 0.4rem;
  right: -0.55rem;
  width: 1px;
  background: var(--line-dark);
}
.rail-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--pp, 0%);
  background: var(--mandorla);
}
.rail-dot {
  position: absolute;
  top: var(--pp, 0%);
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  transform: translate(-50%, -50%);
}

/* ---- Stato enhanced (JS attivo, motion consentito): stage sticky ---- */
html.enhanced .day-track { height: calc(var(--chapter-count, 6) * 135vh); }
html.enhanced .stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
html.enhanced .chapter {
  position: absolute;
  inset: 0;
  min-height: 0;
  opacity: 0;
  visibility: hidden;
  will-change: opacity;
}
html.enhanced .chapter:first-child { opacity: 1; visibility: visible; }
html.enhanced .time-rail { position: absolute; }

/* ============ Granita strip ============ */

.granita-strip { background: var(--stone); position: relative; }
.granita-stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 1rem) clamp(1.25rem, 5vw, 4rem) 3rem;
}

.granita-head { position: relative; z-index: 4; margin-bottom: 2rem; }

.section-title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-title-light { color: var(--panna); }
.section-sub {
  max-width: 36rem;
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.story .section-sub { color: rgba(244, 234, 217, 0.75); }

.flavor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4.5vw, 4.5rem);
  position: relative;
  z-index: 2;
}
.flavor + .flavor { margin-top: 3rem; border-top: 1px solid var(--line-light); padding-top: 3rem; }
.flavor-media { margin: 0; flex: 0 0 min(36vw, 26rem); }
.flavor-media img { width: 100%; border: 1px solid var(--line-light); }
.flavor-text { flex: 0 1 26rem; }
.flavor-hour {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.flavor-name { font-size: clamp(2.2rem, 4.2vw, 4rem); }
.flavor-note { margin: 0.6rem 0 0; color: var(--ink-soft); max-width: 26rem; }
.flavor-indicator { display: none; }

/* Enhanced: gusti in crossfade dentro uno stage sticky */
html.enhanced .granita-track { height: calc(var(--flavor-count, 4) * 110vh); }
html.enhanced .granita-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  justify-content: flex-start;
}
html.enhanced .flavor {
  position: absolute;
  inset: auto clamp(1.25rem, 5vw, 4rem) 3rem clamp(1.25rem, 5vw, 4rem);
  top: calc(var(--header-h) + 9.5rem);
  opacity: 0;
  visibility: hidden;
  will-change: opacity, transform;
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
html.enhanced .flavor:first-of-type { opacity: 1; visibility: visible; }
html.enhanced .flavor-indicator {
  display: block;
  position: absolute;
  z-index: 5;
  top: calc(var(--header-h) + 5.4rem);
  right: clamp(1.25rem, 5vw, 4rem);
  left: auto;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
html.enhanced .flavor-current { color: var(--red); }

/* ============ Menu ============ */

.menu { background: var(--panna); border-top: 1px solid var(--line-light); }
.menu-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) clamp(1.25rem, 5vw, 4rem);
}
.menu-media { margin: 0; position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
.menu-media img { width: 100%; border: 1px solid var(--line-light); }
.menu-media figcaption {
  margin-top: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.menu-group {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin: 2.6rem 0 0;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--green);
}
.menu-body > .menu-group:first-of-type { margin-top: 2rem; }

.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
}
.menu-note {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: right;
  flex-shrink: 0;
}

/* ============ Storia ============ */

.story { background: var(--night); color: var(--panna); }
.story-inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) clamp(1.25rem, 5vw, 4rem);
}

.story-sign { margin: 2.4rem 0 0; }
.story-sign img { width: min(44rem, 100%); }
.story-sign figcaption {
  margin-top: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.6);
}

.timeline { margin-top: 3rem; border-top: 1px solid var(--line-dark); }
.timeline-row {
  display: grid;
  grid-template-columns: minmax(6rem, 10rem) 1fr;
  gap: clamp(1.2rem, 4vw, 3rem);
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line-dark);
  align-items: baseline;
}
.timeline-year {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--mandorla);
  font-variant-numeric: tabular-nums;
}
.timeline-text { margin: 0; max-width: 46rem; color: rgba(244, 234, 217, 0.85); }

.story-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-top: 3rem;
}
.story-figures figure { margin: 0; }
.story-figures img { width: 100%; border: 1px solid var(--line-dark); }
.story-figures figcaption {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.6);
}

.story-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin: 3.2rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line-dark);
}
.story-numbers > div { min-width: 12rem; }
.story-numbers dt {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.6);
  margin-bottom: 0.4rem;
}
.story-numbers dd {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  color: var(--panna);
  font-variant-numeric: tabular-nums;
}
.story-numbers dd span {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.8rem;
  color: rgba(244, 234, 217, 0.65);
  letter-spacing: 0.04em;
}

/* ============ Fidelity concept ============ */

.loyalty { background: var(--stone); border-top: 1px solid var(--line-light); }
.loyalty-inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) clamp(1.25rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.loyalty-kicker {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}

.stampcard {
  background: var(--panna);
  border: 1px solid var(--ink);
  padding: 1.6rem clamp(1.2rem, 3vw, 2rem);
  transform: rotate(-1.2deg);
}
.stampcard-head {
  margin: 0 0 1.2rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--line-light);
  padding-bottom: 0.8rem;
}
.stampgrid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.9rem;
}
.stampgrid li {
  aspect-ratio: 1;
  border: 1px dashed rgba(28, 42, 53, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stampgrid li.stamped {
  border: 2px solid var(--red);
  color: var(--red);
  transform: rotate(-8deg);
}
.stampgrid li.stamped span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(0.62rem, 1.4vw, 0.85rem);
}
.stampgrid li:nth-child(2).stamped { transform: rotate(6deg); }
.stampgrid li:nth-child(3).stamped { transform: rotate(-3deg); }
.stamp-free span {
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-soft);
  line-height: 1.3;
}
.stampcard-foot {
  margin: 1.2rem 0 0;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============ Visita ============ */

.visit { position: relative; background: var(--deep); color: var(--panna); overflow: hidden; }
.visit-media { position: absolute; inset: 0; }
.visit-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.24; }
.visit-inner {
  position: relative;
  z-index: 2;
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 5vw, 4rem);
}
.visit-title {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  max-width: 46rem;
  text-wrap: balance;
}
.visit-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 3rem;
}
.visit-col h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mandorla);
  margin: 0 0 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line-dark);
}
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td {
  text-align: left;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-dark);
  font-weight: 400;
}
.hours td {
  text-align: right;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}
.hours .closed th, .hours .closed td { color: #e0684f; }
.visit-note { font-size: 0.85rem; color: rgba(244, 234, 217, 0.65); }
address { font-style: normal; line-height: 1.7; }
.visit-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.8rem; margin-top: 1.6rem; }

/* ============ Footer ============ */

.site-footer {
  background: var(--deep);
  color: rgba(244, 234, 217, 0.7);
  border-top: 1px solid var(--line-dark);
  padding: 3rem clamp(1.25rem, 5vw, 4rem) 3.5rem;
  text-align: center;
}
.footer-sign {
  width: min(20rem, 70vw);
  margin: 0 auto 1.6rem;
}
.footer-line { margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--panna); }
.footer-line a { color: var(--mandorla); }
.footer-note { max-width: 44rem; margin: 0 auto; font-size: 0.78rem; }
.footer-note code { font-size: 0.75rem; }
.footer-lang { margin: 1.4rem 0 0; font-size: 0.8rem; }
.footer-lang a { color: var(--mandorla); }

/* ============ Decorazioni line-art (SVG inline, tratto 1.5px, currentColor) ============ */

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
}

/* Ornamento hero: rametto di caffè tra titolo e sottotitolo */
.hero-ornament { margin: 1.4rem 0 0; color: var(--mandorla); opacity: 0.85; }
.hero-ornament svg { display: block; width: 11rem; height: auto; }
.hero-ornament + .hero-sub { margin-top: 1.4rem; }

/* Icone dei capitoli della giornata, dentro .chapter-time */
.chapter-time .icon { width: 0.6em; height: 0.6em; margin-right: 0.22em; vertical-align: 0.04em; }

/* Icone dei gusti nella granita strip */
.flavor-icon { display: block; width: 2.1rem; height: 2.1rem; margin: 0 0 0.9rem; color: var(--green); }

/* Icone delle intestazioni di gruppo del menu */
.menu-group .icon { width: 1.05em; height: 1.05em; margin-right: 0.5em; vertical-align: -0.16em; }

/* Icone degli anni nella timeline "Dal 1957" */
.timeline-year .icon { width: 0.58em; height: 0.58em; margin-right: 0.28em; vertical-align: 0.02em; }

/* Icone nella sezione Visita (titoli colonna e bottoni) */
.visit-col h3 .icon { width: 1.1em; height: 1.1em; margin-right: 0.5em; vertical-align: -0.18em; }
.visit-actions .btn .icon { width: 1.05em; height: 1.05em; margin-right: 0.55em; vertical-align: -0.16em; }

/* Fregio della Basilica: divisore tra Storia e Fidelity, tenue */
.basilica-ornament { margin-top: 3.6rem; text-align: center; }
.basilica-ornament svg { width: min(38rem, 100%); height: auto; color: var(--mandorla); opacity: 0.3; }

/* Ornamenti del footer: filetto con losanga sopra il logo, emblema in chiusura */
.footer-ornament { margin: 0 auto 2.2rem; color: var(--mandorla); opacity: 0.8; }
.footer-ornament svg { display: block; width: 12.5rem; height: auto; margin: 0 auto; }
.footer-emblem { margin: 1.8rem auto 0; color: var(--mandorla); opacity: 0.9; }
.footer-emblem svg { display: block; width: 3.2rem; height: auto; margin: 0 auto; }

/* ============ Responsive ============ */

@media (max-width: 1000px) {
  .site-nav { display: none; }
}

@media (max-width: 900px) {
  .menu-grid { grid-template-columns: 1fr; }
  .menu-media { position: static; }
  .loyalty-inner { grid-template-columns: 1fr; }
  .visit-cols { grid-template-columns: 1fr; }
  .story-figures { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .wordmark-logo { height: 40px; }

  /* Target tocco >= 44px: il wordmark cresce in altezza restando centrato
     nell'header da 60px; i bottoni estendono solo l'area cliccabile (::after),
     così l'aspetto visivo non cambia. */
  .wordmark {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 44px;
  }
  .header-actions .btn-small,
  .header-actions .lang-switch { position: relative; }
  .header-actions .btn-small::after,
  .header-actions .lang-switch::after {
    content: "";
    position: absolute;
    inset: -10px -6px;
  }

  .hero { align-items: center; }
  .hero-scrollhint { display: none; }

  /* Capitoli: testo sotto, figura sopra, tutto impilato */
  .chapter {
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: calc(var(--header-h) + 1rem) 1rem 5.5rem;
    gap: 1rem;
  }
  .chapter-figure,
  .figure-left,
  .figure-right {
    width: 100%;
    margin: 0;
    order: 1;
  }
  .chapter-figure img { max-height: 42vh; object-fit: cover; }
  .chapter-text,
  .chapter-night .chapter-text,
  .chapter-midnight .chapter-text,
  .chapter-dawn .chapter-text,
  .chapter-afternoon .chapter-text,
  .chapter-noon .chapter-text,
  .panel-wide,
  .panel-center {
    width: 100%;
    margin: 0;
    order: 2;
  }

  /* Rail temporale: barra orizzontale in alto */
  .time-rail {
    top: calc(var(--header-h) + 0.75rem);
    left: 1rem;
    right: 1rem;
    transform: none;
    flex-direction: row;
    align-items: center;
    gap: 0.9rem;
  }
  .rail-clock-value { font-size: 1.1rem; padding: 0.15rem 0.5rem; }
  .rail-ticks { display: none; }
  .rail-line {
    position: relative;
    inset: auto;
    flex: 1;
    height: 1px;
    width: auto;
    background: var(--line-dark);
  }
  .rail-progress { height: 100%; width: var(--pp, 0%); }
  .rail-dot { top: 50%; left: var(--pp, 0%); transform: translate(-50%, -50%); }

  .flavor { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .flavor-media { flex-basis: auto; width: 100%; }
  .flavor-media img { max-height: 38vh; object-fit: cover; }
  html.enhanced .flavor-indicator { top: calc(var(--header-h) + 8.2rem); }

  .timeline-row { grid-template-columns: 1fr; gap: 0.4rem; }

  .stampgrid { gap: 0.6rem; }

  /* Decorazioni: icone gusti e fregio basilica più compatti su mobile */
  .flavor-icon { width: 1.8rem; height: 1.8rem; margin-bottom: 0.7rem; }
  .basilica-ornament { margin-top: 2.6rem; }
}

@media (max-width: 420px) {
  .hero-cta .btn { width: 100%; text-align: center; }
  .stampgrid { grid-template-columns: repeat(5, 1fr); }
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .hero-media img, .chapter-bg img { transform: none; }
  .stampcard { transform: none; }
}
