/* University Housing Forlì — foglio di stile unico.
   Direzione: lo standard del settore eseguito bene. Fondo bianco e pietra,
   inchiostro quasi nero, un blu pieno che possiede intere fasce, giallo sole
   per la fascia ER.GO. Sofia Sans Extra Condensed maiuscolo per i titoli,
   Sofia Sans per il testo. Font self-hosted: nessuna richiesta a terzi. */

/* --- Font ------------------------------------------------------------------ */

@font-face {
  font-family: 'Sofia Sans XC';
  src: url('/assets/fonts/sofiasans-xcond-latin.woff2') format('woff2');
  font-weight: 700 900;
  font-display: swap;
  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: 'Sofia Sans XC';
  src: url('/assets/fonts/sofiasans-xcond-latin-ext.woff2') format('woff2');
  font-weight: 700 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sofia Sans';
  src: url('/assets/fonts/sofiasans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  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: 'Sofia Sans';
  src: url('/assets/fonts/sofiasans-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Token ----------------------------------------------------------------- */

:root {
  --ink: #101318;
  --ink-2: #3d434d;
  --ink-3: #5d6470;
  --white: #ffffff;
  --stone: #efeee9;
  --stone-2: #e3e1da;
  --line: #d6d4cc;
  --blue: #1f3fa8;
  --blue-deep: #172f80;
  --blue-ink: #c9d7f2;
  --sky: #c9d7f2;
  --sun: #f3c63f;
  --todo: #ffe9a8;

  --display: 'Sofia Sans XC', 'Arial Narrow', sans-serif;
  --text: 'Sofia Sans', system-ui, sans-serif;

  --shell: 1320px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --sec: clamp(4.5rem, 10vw, 8.5rem);
  --radius: 14px;
  --pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Fascia loghi PNRR: altezza del logo UE. Sui telefoni si riduce perché i
     tre loghi stiano su una riga, senza scorrere e senza andare a capo. */
  /* La fascia loghi occupa la riga intera meno il rimando "PNRR". */
  --funders-go: 4.6rem;
  --fh: min(40px, calc((100vw - 2 * var(--gutter) - 2.5rem - var(--funders-go)) / 12));
  --funders-h: calc(var(--fh) + 1.5rem);
  --mast-h: calc(4.75rem + 1px);

  color-scheme: light;
}

/* --- Base ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: 'kern', 'liga';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--blue);
  color: var(--white);
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
/* Email e PEC sono parole lunghe senza spazi: a 320 px o con la spaziatura
   del testo aumentata (WCAG 1.4.10, 1.4.12) devono poter andare a capo. */
a[href^='mailto:'],
dd {
  overflow-wrap: anywhere;
}
/* Stessa cosa per le parole lunghe dei titoli grandi ("UNIVERSITARIA"):
   si spezzano solo se non stanno nella riga, quindi di norma mai. */
h1,
h2,
h3 {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--focus, var(--blue));
  outline-offset: 3px;
  border-radius: 4px;
}
/* Sui fondi scuri il contorno blu non si vede (serve 3:1, WCAG 2.4.11):
   lì il focus è giallo. */
.hero,
.mast--over:not(.is-solid):not(.is-open),
.band--blue,
.contact,
.foot {
  --focus: var(--sun);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--pill);
  text-decoration: none;
  font-weight: 600;
}
.skip:focus {
  top: 1rem;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.i {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

/* Tipografia di display: maiuscolo condensato, stretto ma mai sotto -0.04em. */
.h-display {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.01em;
  font-size: clamp(2.6rem, 6.4vw, 5rem);
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 38rem;
}

.muted {
  color: var(--ink-3);
  font-size: 0.95rem;
}

/* Dato non ancora fornito dal cliente: visibile, mai scambiabile per vero. */
.todo {
  background: var(--todo);
  color: #5a4300;
  padding: 0.05em 0.4em;
  border-radius: 4px;
  font-weight: 600;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 700;
  text-decoration: underline;
}
.link .i {
  width: 1em;
  height: 1em;
}

/* --- Pulsanti ---------------------------------------------------------------- */

.btn {
  --bg: var(--ink);
  --fg: var(--white);
  --bd: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border: 1.5px solid var(--bd);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--fg);
  font: 700 1rem/1.1 var(--text);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.btn .i {
  width: 1.15em;
  height: 1.15em;
  transition: transform 0.35s var(--ease);
}
.btn:hover .i:last-child:not(:first-child) {
  transform: translateX(3px);
}
.btn--solid:hover {
  --bg: var(--blue);
  --bd: var(--blue);
}
.btn--light {
  --bg: var(--white);
  --fg: var(--ink);
  --bd: var(--white);
}
.btn--light:hover {
  --bg: var(--sky);
  --bd: var(--sky);
}
.btn--ghost {
  --bg: transparent;
  --fg: var(--white);
  --bd: rgb(255 255 255 / 0.55);
}
.btn--ghost:hover {
  --bd: var(--white);
  --bg: rgb(255 255 255 / 0.1);
}
.btn--line {
  --bg: transparent;
  --fg: var(--ink);
  --bd: var(--ink);
}
.btn--line:hover {
  --bg: var(--ink);
  --fg: var(--white);
}
.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}
.is-todo {
  position: relative;
}
.is-todo::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 2px var(--white);
}

/* --- Fascia loghi PNRR ------------------------------------------------------- */

.funders {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.funders__in {
  display: flex;
  align-items: center;
  gap: clamp(0.55rem, 2.4vw, 1.5rem);
  height: var(--funders-h);
  text-decoration: none;
}
.funders__in img {
  display: block;
  width: auto;
  max-width: none;
}
/* Proporzioni del logo firma: il lato lungo dell'emblema UE non è mai
   inferiore a quello degli altri loghi (art. 4 Reg. UE 821/2014). */
.funders__eu {
  height: var(--fh);
}
.funders__mur {
  height: calc(var(--fh) * 0.86);
}
.funders__id {
  height: calc(var(--fh) * 0.58);
}
/* Rimando alla sezione del progetto: staccato dai loghi, che restano un
   blocco a sé come chiedono le linee guida. */
.funders__go {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex: none;
  padding: 0.3rem 0.55rem 0.3rem 0.7rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: background-color 0.15s, color 0.15s;
}
.funders__go svg {
  width: 0.9rem;
  height: 0.9rem;
}
.funders__in:hover .funders__go,
.funders__in:focus-visible .funders__go {
  background: var(--blue);
  color: var(--white);
}
.funders__sep {
  flex: none;
  width: 1px;
  height: calc(var(--fh) * 1.05);
  background: var(--line);
}

/* --- Testata ----------------------------------------------------------------- */

.mast {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition:
    background-color 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.mast--over {
  background: transparent;
  color: var(--white);
  border-bottom-color: transparent;
}
.mast--over.is-solid,
.mast--over.is-open {
  background: var(--white);
  color: var(--ink);
  border-bottom-color: var(--line);
}

.mast__in {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 4.75rem;
}

.mast__brand {
  text-decoration: none;
  margin-right: auto;
}

.wm {
  --wm: clamp(1rem, 4.6vw, 1.45rem);
  display: flex;
  align-items: center;
  gap: calc(var(--wm) * 0.5);
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.wm__seal {
  width: calc(var(--wm) * 2.2);
  height: auto;
  flex: none;
}
.wm__t {
  display: flex;
  align-items: baseline;
  gap: calc(var(--wm) * 0.75);
}
/* Spaziature del logo approvato: 0,099 em e 0,332 em. */
.wm__a {
  font-size: var(--wm);
  letter-spacing: 0.099em;
}
.wm__b {
  font-size: calc(var(--wm) * 0.6);
  letter-spacing: 0.332em;
  margin-right: -0.332em;
  color: var(--blue);
}
.mast--over:not(.is-solid):not(.is-open) .wm__b {
  color: var(--sky);
}

.mast__nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-weight: 600;
}
.mast__nav > a {
  text-decoration: none;
  position: relative;
  padding-block: 0.4rem;
}
.mast__nav > a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.mast__nav > a:hover::after {
  transform: scaleX(1);
}

.lang {
  display: flex;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid currentColor;
  border-radius: var(--pill);
  font-size: 0.85rem;
}
.lang a {
  padding: 0.2rem 0.6rem;
  border-radius: var(--pill);
  text-decoration: none;
  opacity: 0.7;
}
.lang a[aria-current='true'] {
  background: currentColor;
  opacity: 1;
}
.lang a[aria-current='true'] {
  color: inherit;
}
.mast .lang a[aria-current='true'] {
  background: var(--ink);
  color: var(--white);
}
/* Sopra la foto le finestre illuminate abbassano il contrasto: lingua
   inattiva piena, non al 70%. */
.mast--over:not(.is-solid):not(.is-open) .lang a {
  opacity: 0.9;
}
.mast--over:not(.is-solid):not(.is-open) .lang a[aria-current='true'] {
  background: var(--white);
  color: var(--ink);
}

.mast--over:not(.is-solid):not(.is-open) .mast__cta {
  --bg: var(--white);
  --fg: var(--ink);
  --bd: var(--white);
}

.mast__toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.mast__toggle .i--close {
  display: none;
}
.mast.is-open .mast__toggle .i--open {
  display: none;
}
.mast.is-open .mast__toggle .i--close {
  display: block;
}

/* --- Hero -------------------------------------------------------------------- */

/* La testata resta nel flusso, sotto la fascia loghi, e la foto le scorre
   sotto: si tira su della sua altezza. */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--mast-h));
  min-height: calc(100svh - var(--funders-h));
  display: flex;
  color: var(--white);
  background: var(--blue-deep);
  isolation: isolate;
}

/* Schermi orizzontali: la foto (quasi quadrata, non si può tagliare a
   tutta larghezza senza perdere metà edificio) occupa la parte destra a tutta
   altezza; titolo e testo stanno a sinistra sul blu. Sugli schermi verticali
   torna sopra il titolo (vedi max-aspect-ratio più sotto). */
.hero__media {
  position: absolute;
  inset: 0 0 0 44%;
  z-index: -1;
  background: #1a2542;
}
/* Facciata di sera: l'insegna sta a destra, edificio e prato scuri a sinistra
   reggono il titolo. Il velo scurisce in alto (testata) e in basso a sinistra
   (titolo e testo), lasciando libera l'insegna. */
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--blue-deep) 0%, rgb(23 47 128 / 0) 22%),
    linear-gradient(180deg, rgb(10 14 24 / 0.72) 0%, rgb(10 14 24 / 0.35) 12%, rgb(10 14 24 / 0) 26%, rgb(10 14 24 / 0) 70%, rgb(10 14 24 / 0.6) 100%);
}

.hero__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 8rem;
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.hero__h {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  /* Tetto a 6rem e all'11,5% dell'altezza: il titolo resta sotto l'insegna
     fotografata invece di coprirla. */
  font-size: min(clamp(3.2rem, 7.5vw, 6rem), 11.5svh);
  line-height: 0.86;
  letter-spacing: -0.012em;
  max-width: 13ch;
}

.hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: min(36rem, 40vw);
  align-items: end;
  justify-content: start;
  gap: 1.5rem 3rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.hero__lede {
  margin: 0;
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: rgb(255 255 255 / 0.9);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__route {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
  padding: 1.1rem 0 0;
  list-style: none;
  border-top: 1px solid rgb(255 255 255 / 0.3);
  font-weight: 600;
  font-size: 0.98rem;
}
.hero__route li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hero__route li::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sun);
}

/* Unico momento di movimento: il titolo sale riga dopo riga al caricamento.
   Parte al primo disegno, senza aspettare JavaScript: niente lampo. */
.hero__h,
.hero__foot,
.hero__route {
  animation: rise 1.1s var(--ease) both;
}
.hero__foot {
  animation-delay: 0.14s;
}
.hero__route {
  animation-delay: 0.26s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(6px);
  }
}

/* --- Segnaposto fotografici ---------------------------------------------------- */

.ph {
  margin: 0;
}
.ph__plate {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  min-height: 12rem;
  background: var(--stone-2);
  color: var(--ink-3);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
}
.ph__plate .i {
  width: 1.8rem;
  height: 1.8rem;
}
.ph--wide .ph__plate {
  aspect-ratio: 4 / 3;
}
.ph--tall .ph__plate {
  aspect-ratio: 4 / 5;
}
.ph--sq .ph__plate {
  aspect-ratio: 1;
}
.ph > img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--stone-2);
}
.ph--wide > img {
  aspect-ratio: 4 / 3;
}
.ph--tall > img {
  aspect-ratio: 4 / 5;
}
.ph--sq > img {
  aspect-ratio: 1;
}
.ph__cap {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.ph--dark .ph__plate {
  background: var(--blue-deep);
  color: rgb(255 255 255 / 0.75);
}
.ph--dark .ph__cap {
  color: rgb(255 255 255 / 0.75);
}

/* --- Sezioni ------------------------------------------------------------------ */

.sec {
  padding-block: var(--sec);
}
.sec__head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.5rem 4rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.sec__head .lede {
  margin: 0;
}

/* Residenza */
.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.intro__text .h-display {
  margin-bottom: 2rem;
  max-width: 14ch;
}
.intro__text p {
  max-width: 34rem;
  color: var(--ink-2);
}
.intro__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.facts div {
  margin: 0;
}
.facts dt {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-3);
}
.facts dd {
  margin: 0.2rem 0 0;
  line-height: 1.25;
}
.facts strong {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  text-transform: uppercase;
}
.facts span {
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* Camere */
.rooms {
  background: var(--stone);
}
.rooms__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.room {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
}
.room .ph__plate,
.room .ph > img {
  border-radius: 0;
}
.room .ph__cap {
  display: none;
}
.room__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 1.75rem;
  flex: 1;
}
.room__name {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 0.95;
}
.room__price {
  margin: 1rem 0 0.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.room__price strong {
  font-size: clamp(1.75rem, 2.6vw, 2.2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.room__price span {
  color: var(--ink-3);
  font-weight: 600;
}
.room__meta {
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.75rem;
}
.room__text {
  color: var(--ink-2);
  margin-bottom: 1.5rem;
}
.room .btn {
  margin-top: auto;
}

.rooms__info {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.rooms__info h3,
.services h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.ticks,
.terms {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}
.ticks li {
  display: flex;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.ticks .i {
  color: var(--blue);
  margin-top: 0.15em;
}
.terms li {
  padding: 0.55rem 0 0.55rem 1.4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.terms li::before {
  content: '';
  position: absolute;
  left: 0.1rem;
  top: 1.15rem;
  width: 0.5rem;
  height: 1.5px;
  background: var(--ink);
}
.ticks--cols {
  columns: 2;
  column-gap: 3rem;
}
.ticks--cols li {
  break-inside: avoid;
}

/* Fasce colorate */
.band {
  padding-block: var(--sec);
}
.band--blue {
  background: var(--blue);
  color: var(--white);
}
.band--blue .lede {
  color: rgb(255 255 255 / 0.88);
}
.band__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.band__grid .h-display {
  margin-bottom: 1.75rem;
}
.points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
}
.points li {
  padding-top: 1.25rem;
  border-top: 1.5px solid rgb(255 255 255 / 0.45);
}
.points h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.points p {
  margin: 0;
  color: rgb(255 255 255 / 0.85);
  font-size: 0.98rem;
}

.band--sun {
  background: var(--sun);
  color: var(--ink);
}
.ergo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.ergo .h-display {
  font-size: clamp(2.8rem, 7vw, 5.75rem);
}
.ergo__text p {
  font-size: 1.1rem;
  max-width: 34rem;
}
.band--sun .todo {
  background: transparent;
  outline: 1.5px dashed rgb(16 19 24 / 0.5);
  outline-offset: -1px;
}
.tracks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}
.tracks li {
  padding-top: 1rem;
  border-top: 1.5px solid var(--ink);
}
.ergo__text .tracks__k {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.1rem;
  line-height: 1;
  text-transform: uppercase;
}
.tracks h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.ergo__text .tracks p:not(.tracks__k) {
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

/* Progetto PNRR */
.pnrr {
  background: var(--stone);
}
.pnrr__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.pnrr .h-display {
  margin-bottom: 1.75rem;
}
.pnrr .lede {
  color: var(--ink-2);
}
.pnrr__intro {
  container-type: inline-size;
}
/* I loghi si dimensionano sulla colonna, non sullo schermo. */
.pnrr__logos {
  --fh: min(40px, calc((100cqi - 5rem) / 12));
  display: flex;
  align-items: center;
  gap: clamp(0.55rem, 2vw, 1.25rem);
  width: fit-content;
  max-width: 100%;
  margin-top: 0.5rem;
  padding: 1rem clamp(0.75rem, 2vw, 1.25rem);
  border-radius: var(--radius);
  background: var(--white);
}
.pnrr__logos a {
  flex: none;
  display: block;
}
.pnrr__logos img {
  display: block;
  width: auto;
  max-width: none;
}
.pnrr__facts {
  margin: 0;
  border-top: 1.5px solid var(--ink);
}
.pnrr__facts div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.pnrr__facts dt {
  font-weight: 600;
  color: var(--ink-3);
}
.pnrr__facts dd {
  margin: 0;
  font-weight: 600;
}
.pnrr__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.pnrr__cols h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Spazi: una foto guida grande a sinistra, quattro più piccole in 2×2.
   Su telefono diventano una striscia da scorrere di lato. */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mosaic:focus-visible {
  outline: 2px solid var(--focus, var(--blue));
  outline-offset: 6px;
}
.mosaic__item {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--stone);
}
.mosaic__item > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.mosaic__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.mosaic__item:first-child > img {
  flex: 1 1 0;
  height: 0;
  min-height: 20rem;
  aspect-ratio: auto;
}
.mosaic__item:first-child .mosaic__cap h3 {
  font-size: 2.1rem;
}
.mosaic__cap {
  padding: 1rem 1.1rem 1.1rem;
  background: var(--stone);
}
.mosaic__cap h3 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.mosaic__cap p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.services {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.services__key {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem 2rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}
.services__key li {
  padding-top: 1rem;
  border-top: 1.5px solid var(--ink);
}
.services__key h4 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.6rem;
  line-height: 1;
  margin: 0 0 0.5rem;
}
.services__key p {
  margin: 0;
  color: var(--ink-2);
}

/* Posizione */
.loc {
  background: var(--stone);
}
.loc__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.loc .h-display {
  margin-bottom: 1.75rem;
}
.legs {
  margin: 2.5rem 0 2rem;
}
.legs div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.legs div:first-child {
  border-top: 1px solid var(--line);
}
.legs dt {
  font-weight: 600;
}
.legs dd {
  margin: 0;
  text-align: right;
}
.legs strong {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
  text-transform: uppercase;
  line-height: 1;
}
.legs span {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.loc__addr {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.loc__addr .i {
  color: var(--blue);
  margin-top: 0.2em;
}
.loc__addr p {
  margin: 0;
}
.loc__addrh {
  display: block;
  font-weight: 700;
}

/* Mappa: illustrazione da OpenStreetMap come fondo, sopra un solo colore
   forte (il blu) per percorso e residenza; scritte con alone chiaro. */
.mapx {
  margin: 0;
}
.mapx svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) + 6px);
  background: var(--stone-2);
}
.mapx figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.9rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--ink-3);
}
.mapx figcaption a {
  color: inherit;
}

.mapx__route {
  fill: none;
  stroke: var(--blue);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mapx__dot {
  fill: var(--ink);
  stroke: var(--white);
  stroke-width: 3;
}
.mapx__cross {
  stroke: var(--white);
  stroke-width: 3;
  stroke-linecap: round;
}
.mapx__halo {
  fill: var(--blue);
  opacity: 0.16;
}

.mapx__label,
.mapx__time {
  paint-order: stroke;
  stroke: rgb(239 238 233 / 0.92);
  stroke-linejoin: round;
}
.mapx__label {
  font: 700 26px var(--text);
  fill: var(--ink);
  stroke-width: 6px;
}
.mapx__label--home {
  fill: var(--blue);
  font-size: 28px;
}
.mapx__minor {
  font-size: 22px;
  font-weight: 600;
  fill: var(--ink-2);
}
.mapx__time {
  font: 800 46px var(--display);
  fill: var(--ink);
  text-transform: uppercase;
  stroke-width: 7px;
}

/* FAQ */
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.faq .h-display {
  position: sticky;
  top: 7rem;
}
.faq__list details {
  border-bottom: 1px solid var(--line);
}
.faq__list details:first-child {
  border-top: 1px solid var(--line);
}
.faq__list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq__list summary::-webkit-details-marker {
  display: none;
}
.faq__list summary .i {
  width: 1.4rem;
  height: 1.4rem;
  padding: 0.2rem;
  box-sizing: content-box;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.faq__list summary:hover .i {
  background: var(--ink);
  color: var(--white);
}
.faq__list .i--minus,
.faq__list details[open] .i--plus {
  display: none;
}
.faq__list details[open] .i--minus {
  display: block;
}
.faq__list details p {
  margin: 0 0 1.5rem;
  max-width: 62ch;
  color: var(--ink-2);
}

/* Contatti */
.contact {
  background: var(--ink);
  color: var(--white);
}
.contact .lede {
  color: rgb(255 255 255 / 0.8);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact .h-display {
  margin-bottom: 1.75rem;
}
.contact__quickh {
  margin: 2.5rem 0 1rem;
  font-weight: 700;
}
.contact__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.contact .btn--line {
  --fg: var(--white);
  --bd: rgb(255 255 255 / 0.5);
}
.contact .btn--line:hover {
  --bg: var(--white);
  --fg: var(--ink);
  --bd: var(--white);
}
.contact .is-todo::after {
  box-shadow: 0 0 0 2px var(--ink);
}

.form {
  --focus: var(--blue);
  background: var(--white);
  color: var(--ink);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  display: grid;
  gap: 1.25rem;
}
.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.field {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field__l {
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0;
}
.field__l em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink-3);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: 400 1rem/1.4 var(--text);
  caret-color: var(--blue);
  transition: border-color 0.2s var(--ease);
}
.field textarea {
  resize: vertical;
  min-height: 7rem;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #6b717c;
}
.field input:hover,
.field textarea:hover {
  border-color: #b9b7ae;
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(31 63 168 / 0.18);
}
.field [aria-invalid='true'] {
  border-color: #b3261e;
}
.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.choice label {
  position: relative;
  cursor: pointer;
}
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--pill);
  font-weight: 600;
  transition: all 0.2s var(--ease);
}
.choice label:hover span {
  border-color: var(--ink);
}
.choice input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.choice input:focus-visible + span {
  outline: 2px solid var(--focus, var(--blue));
  outline-offset: 2px;
}
.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--ink-2);
  cursor: pointer;
}
.consent input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.1rem 0 0;
  flex: none;
  accent-color: var(--ink);
}
.consent input[aria-invalid='true'] {
  outline: 2px solid #b3261e;
  outline-offset: 2px;
}
.hp {
  position: absolute;
  left: -9999px;
}
.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.form__status {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}
.form__status[data-state='success'] {
  color: #1d6b3a;
}
.form__status[data-state='error'],
.form__status[data-state='invalid'] {
  color: #b3261e;
}

/* Informativa */
.is-inner main {
  min-height: 60vh;
}
.legal__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.legal .h-display {
  margin-bottom: 1rem;
}
.legal__body h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
}
.legal__body h2:first-child {
  margin-top: 0;
}
.legal__body p {
  color: var(--ink-2);
  max-width: 42rem;
}
.legal__links {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

/* --- Bando posti riservati ------------------------------------------------- */

/* Rimando dalla prima schermata: un link, non un terzo pulsante. */
.hero__call {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-self: start;
  margin-top: 0.25rem;
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
.hero__call .i {
  width: 1.1rem;
  height: 1.1rem;
}
.hero__call:hover {
  color: var(--sun);
}

.call__head {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
}
/* Intestazione: titolo, stato e testo a sinistra; a destra le azioni,
   così i documenti si raggiungono senza scorrere. */
.call__headgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: end;
}
.call__cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
.call__cta .btn {
  justify-content: space-between;
}
.call__cta .link {
  align-self: flex-start;
  margin-top: 0.25rem;
  font-weight: 700;
}
.call__head .h-display {
  max-width: 18ch;
  margin-bottom: 1.25rem;
}
.call__head .lede {
  max-width: 46rem;
  /* Sul giallo il grigio perde contrasto: inchiostro pieno. */
  color: var(--ink);
}
.call__status {
  display: inline-block;
  text-wrap: balance;
  margin: 0 0 1.5rem;
  padding: 0.45rem 0.9rem;
  /* Non a pillola: su telefono va a capo e una pillola alta diventa un blocco. */
  border-radius: 0.6rem;
  font-weight: 800;
  font-size: 0.95rem;
}
.call__status--open {
  background: var(--ink);
  color: var(--sun);
}
.call__status--before {
  background: var(--white);
  color: var(--ink);
}
.call__status--closed {
  background: transparent;
  color: var(--ink);
  outline: 1.5px solid var(--ink);
  outline-offset: -1.5px;
}

.call__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.call__facts {
  position: sticky;
  top: 7rem;
  padding: 1.5rem;
  border-radius: calc(var(--radius) + 6px);
  background: var(--stone);
}
.call__facts h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.call__facts dl {
  margin: 0;
}
.call__facts div {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}
.call__facts dt {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-3);
}
.call__facts dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

/* Titoli interni nel carattere del sito, più piccoli dei titoli della home:
   la pagina resta un documento, ma della stessa famiglia. */
.call__body > h2 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1;
  margin: 3.5rem 0 1.1rem;
}
.call__body > h2[id] {
  scroll-margin-top: 6rem;
}
.call__body > h2:first-child {
  margin-top: 0;
}
.call__body > h3 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.75rem;
}
.call__body > p {
  max-width: 42rem;
  color: var(--ink-2);
}

.call__docs {
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}
.call__docs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.call__docs li:first-child {
  border-top: 1px solid var(--line);
}
.call__docs h3 {
  font-size: 1.2rem;
  margin: 0 0 0.2rem;
}
.call__docs p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-3);
}
.call__docs .btn {
  flex: none;
}

.call__table {
  width: 100%;
  max-width: 42rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.call__table th,
.call__table td {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.call__table th {
  font-weight: 400;
  color: var(--ink-2);
  padding-right: 1.5rem;
}
.call__table td {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

/* I passi sono una sequenza: qui i numeri servono. */
.call__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.call__steps li {
  position: relative;
  padding: 1rem 0 1rem 3.25rem;
  border-bottom: 1px solid var(--line);
  counter-increment: step;
}
.call__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.95rem;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
}
.call__steps h3 {
  font-size: 1.2rem;
  margin: 0 0 0.25rem;
}
.call__steps p {
  margin: 0;
  color: var(--ink-2);
  max-width: 40rem;
}

.call__rank {
  margin: 0;
}
.call__rank div {
  display: grid;
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.call__rank dt {
  font-weight: 700;
}
.call__rank dd {
  margin: 0;
  color: var(--ink-2);
}

.call__other {
  margin-top: 3rem;
  padding: 1.5rem;
  border-radius: calc(var(--radius) + 6px);
  background: var(--stone);
}
.call__other h2 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}
.call__other p {
  color: var(--ink-2);
  max-width: 40rem;
}
.call__basis {
  margin-top: 2.5rem;
  font-size: 0.88rem;
  color: var(--ink-3);
}

@media (max-width: 900px) {
  .call__grid,
  .call__headgrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .call__cta {
    align-items: flex-start;
  }
  .call__facts {
    position: static;
  }
  /* Sintesi compatta: le voci brevi due per riga, le lunghe a riga intera. */
  .call__facts dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.25rem;
  }
  .call__facts .is-wide {
    grid-column: 1 / -1;
  }
}
@media (max-width: 680px) {
  .call__docs li {
    flex-direction: column;
    align-items: flex-start;
  }
  .call__rank div {
    grid-template-columns: minmax(0, 1fr);
  }
  .call__status {
    font-size: 0.88rem;
  }
  .call__table td {
    white-space: normal;
  }
}

/* --- Piede ------------------------------------------------------------------- */

.foot {
  background: var(--blue-deep);
  color: var(--white);
  padding: clamp(3.5rem, 7vw, 6rem) 0 2rem;
}
.foot__mark {
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.9rem, 6.2vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: 0.099em;
}
.foot__mark-b {
  font-size: 0.48em;
  letter-spacing: 0.332em;
  color: var(--sky);
  white-space: nowrap;
}
.foot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgb(255 255 255 / 0.3);
}
.foot h2 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.foot__tag {
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.foot address {
  font-style: normal;
  color: rgb(255 255 255 / 0.8);
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.foot__co {
  margin: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}
.foot__co div {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.foot__co dt {
  color: rgb(255 255 255 / 0.7);
}
.foot__co dd {
  margin: 0;
}
.foot__fund {
  margin: 3rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.3);
  font-size: 0.88rem;
  color: rgb(255 255 255 / 0.75);
}
.foot__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: rgb(255 255 255 / 0.75);
}
.foot__legal span {
  margin-right: auto;
}

/* --- Barra contatti mobile -------------------------------------------------- */

.dock {
  display: none;
}

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 1080px) {
  .mast__nav {
    gap: 1.25rem;
  }
  /* Con il logo esteso la testata non ha posto per tutto: il pulsante resta
     nella foto di apertura e, sui telefoni, nella barra in basso. */
  .mast__cta {
    display: none;
  }
  .points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mast__in {
    gap: 0.75rem;
  }
  .mast__toggle {
    display: inline-flex;
  }
  .mast__cta {
    display: none;
  }
  .mast__nav {
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--white);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    font-size: 1.35rem;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity 0.3s var(--ease),
      transform 0.3s var(--ease),
      visibility 0s linear 0.3s;
  }
  .mast.is-open .mast__nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .mast__nav > a {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
  }
  .mast__nav > a::after {
    display: none;
  }
  .mast__nav .lang {
    align-self: flex-start;
    margin-top: 1.25rem;
  }
  .no-js .mast__nav {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .sec__head,
  .intro__grid,
  .band__grid,
  .ergo,
  .loc__grid,
  .faq__grid,
  .contact__grid,
  .legal__grid,
  .rooms__info,
  .pnrr__grid,
  .pnrr__cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .faq .h-display {
    position: static;
  }
  .hero__foot {
    grid-template-columns: minmax(0, 1fr);
  }
  .mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mosaic__item:first-child {
    grid-row: auto;
  }
  .mosaic__item:first-child > img {
    flex: none;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .rooms__bath > img {
    aspect-ratio: 16 / 9;
  }
  .foot__cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Schermi più alti che larghi (telefoni, tablet in verticale): una foto di
   sfondo mostrerebbe un terzo della facciata. La foto, quadrata e stretta
   sull'insegna, sta sopra; il titolo sotto, sul blu. La testata resta
   sovrapposta al bordo alto. Stessa condizione del <source> nel template. */
@media (max-aspect-ratio: 1/1) {
  .hero {
    flex-direction: column;
    min-height: 0;
  }
  .hero__media {
    position: relative;
    inset: auto;
    z-index: 0;
    aspect-ratio: 1;
    max-height: 70svh;
  }
  .hero__media::after {
    background: linear-gradient(180deg, rgb(10 14 24 / 0.75) 0%, rgb(10 14 24 / 0.3) 22%, rgb(10 14 24 / 0) 40%, rgb(10 14 24 / 0) 75%, var(--blue-deep) 100%);
  }
  .hero__body {
    padding-top: 0.5rem;
  }
  .hero__foot {
    max-width: none;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 1rem;
    padding-bottom: 4.5rem;
  }
  /* Loghi PNRR su telefono: su una riga sola sarebbero alti ~19 px e le
     scritte del logo UE illeggibili. Due righe: UE e rimando PNRR sopra, MUR e
     Italia Domani sotto, con l'emblema UE sempre il più alto. */
  .funders__in {
    --fh: 34px;
    flex-wrap: wrap;
    height: auto;
    padding-block: 0.6rem;
    row-gap: 0.5rem;
  }
  .funders__in > .funders__eu {
    order: 1;
  }
  .funders__in > .funders__go {
    order: 2;
  }
  .funders__in > .funders__sep:first-of-type {
    order: 3;
    flex-basis: 100%;
    height: 0;
    background: none;
  }
  .funders__in > .funders__mur {
    order: 4;
  }
  .funders__in > .funders__sep:nth-of-type(2) {
    order: 5;
  }
  .funders__in > .funders__id {
    order: 6;
  }
  .pnrr__logos {
    --fh: 34px;
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }
  /* Nella sezione i loghi vanno a capo: i separatori verticali resterebbero
     appesi a fine riga. */
  .pnrr__logos .funders__sep {
    display: none;
  }
  .tracks {
    grid-template-columns: minmax(0, 1fr);
  }
  .mapx__label {
    font-size: 36px;
  }
  .mapx__label--home {
    font-size: 38px;
  }
  .mapx__minor {
    font-size: 30px;
  }
  .mapx__time {
    font-size: 60px;
  }
  .hero__ph {
    top: 5.75rem;
    left: var(--gutter);
    right: auto;
  }
  .hero__route {
    flex-direction: column;
    gap: 0.4rem;
  }
  .hero__actions .btn {
    flex: 1 1 100%;
  }
  .rooms__grid,
  .form__row,
  .points {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
  .facts strong {
    font-size: 1.8rem;
  }
  .mosaic {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 0.5rem;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  .mosaic__item {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
  .mosaic__item:first-child > img {
    aspect-ratio: 4 / 3;
  }
  .mosaic__item:first-child .mosaic__cap h3 {
    font-size: 1.6rem;
  }
  .ticks--cols {
    columns: 1;
  }
  .intro__media {
    grid-template-columns: 1fr 1fr;
  }

  .dock {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 0.5rem;
    padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--white);
    border-top: 1px solid var(--line);
  }
  .dock a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 3rem;
    padding: 0 1rem;
    border: 1.5px solid var(--ink);
    border-radius: var(--pill);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--ink);
  }
  .dock .dock__main {
    background: var(--ink);
    color: var(--white);
  }
  .dock .is-todo::after {
    box-shadow: 0 0 0 2px var(--white);
  }
}

@media (max-width: 380px) {
  .dock a:not(.dock__main) span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
