/* SERI Lugano — bozza redesign, impianto ispirato al template B-Well
   Colori dal logo ufficiale, regola 60-30-10:
   60  neutri chiari  (--paper, --white, --tint)  sfondo pagina, superfici, fasce
   30  navy #2C4E63   (--navy + tinte)            titoli, blocchi pieni, footer
   10  cremisi #D0233C (--accent)                 bottone principale, stati attivi. Solo su fondi chiari.
   Font: Schibsted Grotesk (titoli) + Instrument Sans (testo), open source.
   In produzione vanno ospitati nel tema, non caricati da Google (privacy). */

@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Schibsted+Grotesk:wght@400..700&display=swap");

:root {
  --white: #ffffff;
  --paper: #f6f5f2;
  --tint: #dfe8ee;
  --line: #e1ddd5;
  --navy: #2c4e63;
  --navy-900: #152938;
  --navy-100: #e6edf1;
  --ink: #1d2a33;
  --muted: #3f4c55;
  --accent: #d0233c;
  --accent-600: #b01c32;
  --field: #6f828f; /* bordo dei campi: 3:1 su bianco e su --tint */

  --f-head: "Schibsted Grotesk", system-ui, sans-serif;
  --f-body: "Instrument Sans", system-ui, sans-serif;

  --wrap: 1336px;
  --text: 68ch;
  --r: 10px;
  --r-s: 4px;
  --gap: clamp(1rem, 2vw, 1.5rem);
  --section: clamp(3.5rem, 7vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--muted); font: 400 1rem/1.7 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: .2em; text-decoration-thickness: 1px; }
/* :where() tiene bassa la specificità: i link-blocco (.card, .tile, .collage__block…) non diventano rossi in hover.
   Testo in hover = --accent-600: il cremisi pieno su --tint è sotto 4.5:1 */
:where(a):hover { color: var(--accent-600); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Sui fondi navy il cremisi non si vede: lì il focus è bianco */
:is(.topbar, .hero--navy, .section--navy, .footer) :focus-visible { outline-color: var(--white); }
/* Selezione del testo: navy sui fondi chiari, bianca sui fondi scuri o cremisi.
   Le due variabili si ereditano, quindi basta dichiararle sul contenitore. */
:root { --sel-bg: var(--navy); --sel-fg: var(--white); }
::selection { background: var(--sel-bg); color: var(--sel-fg); }
.topbar, .hero--navy, .section--navy, .footer, .collage__block--navy, .tabs a[aria-current], .btn, .pill:hover { --sel-bg: var(--white); --sel-fg: var(--navy-900); }
.btn--ghost:not(:hover), .btn--light:not(:hover), .social a:hover { --sel-bg: var(--navy); --sel-fg: var(--white); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--white); padding: .5rem 1rem; }

h1, h2, h3 { font-family: var(--f-head); color: var(--navy); font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: clamp(2.4rem, 4.8vw, 4.25rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
strong { color: var(--ink); font-weight: 600; }
:is(.topbar, .hero--navy, .section--navy, .footer) strong { color: inherit; }
address { font-style: normal; }
a[href^="tel:"] { white-space: nowrap; } /* i numeri di telefono non vanno a capo a metà */

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.65; color: var(--ink); max-width: 60ch; }
.muted, .meta { color: var(--muted); }
.meta { font-size: .88rem; margin: 0 0 .4rem; }
.sep { color: var(--line); margin-inline: .35em; }

/* ---------- Bottoni e link ---------- */
.btn { display: inline-block; padding: .8rem 1.5rem; border-radius: var(--r-s); border: 0; font: 500 .9rem/1.2 var(--f-body); text-decoration: none; cursor: pointer; background: var(--accent); color: var(--white); transition: background .15s, color .15s; }
.btn:hover { background: var(--accent-600); color: var(--white); }
.btn--ghost { background: var(--tint); color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--white); }
.section--paper .btn--ghost, .btn--light { background: var(--white); color: var(--navy); }
.section--paper .btn--ghost:hover, .btn--light:hover { background: var(--navy); color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.more { display: inline-block; padding-block: .2rem; font-weight: 500; font-size: .92rem; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .35em; }
.more:hover { color: var(--accent-600); text-decoration-color: currentColor; }

/* ---------- Header ---------- */
/* Barra numeri: non è sticky, quindi esce di scena da sola allo scroll mentre l'header resta */
.topbar { background: var(--navy-900); color: #a6b8c4; font-size: .82rem; }
.topbar .wrap { display: flex; align-items: center; gap: 2rem; padding-block: .25rem; }
.topbar a { display: inline-block; padding-block: .3rem; color: var(--white); text-decoration: none; margin-left: .35em; white-space: nowrap; }
.topbar a:hover { text-decoration: underline; color: var(--white); }
.topbar .topbar__mail { margin-left: auto; }
.topbar__short { display: none; }
@media (max-width: 720px) {
  .topbar { font-size: .78rem; }
  .topbar .wrap { justify-content: space-between; gap: 1rem; }
  .topbar__full, .topbar .topbar__mail { display: none; }
  .topbar__short { display: inline; }
}
.header { position: sticky; top: 0; z-index: 10; background: rgba(246,245,242,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.logo { display: block; flex: none; width: 132px; overflow: hidden; }
.logo img { width: 132px; max-width: none; }
/* Desktop: scorrendo, il logo si riduce al simbolo (29px = larghezza del simbolo a questa scala).
   Solo CSS: dove animation-timeline non è supportato il logo resta intero. */
@media (min-width: 1181px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .logo { animation: logo-symbol linear both; animation-timeline: scroll(root); animation-range: 0 160px; }
    @keyframes logo-symbol { to { width: 29px; } }
  }
}
.header__end { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; font-size: .88rem; }
.lang { color: var(--muted); white-space: nowrap; }
.lang a { color: var(--muted); text-decoration: none; }
.lang strong { color: var(--ink); font-weight: 500; }
.pill { display: inline-block; padding: .65rem 1.3rem; border-radius: 999px; background: var(--tint); color: var(--navy); font: 500 .88rem/1 var(--f-body); text-decoration: none; white-space: nowrap; }
.pill:hover { background: var(--navy); color: var(--white); }
.menu-btn { display: none; font: 500 .9rem var(--f-body); color: var(--navy); background: var(--white); padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.nav, .nav ul { list-style: none; margin: 0; padding: 0; }
.menu-close { display: none; }

@media (min-width: 1181px) {
  .menu { display: block; position: static; inset: auto; margin: 0 0 0 auto; padding: 0; border: 0; background: none; overflow: visible; }
  .header__end { margin-left: 0; }
  .nav { display: flex; gap: .1rem; }
  .nav > li { position: relative; }
  .nav > li > a { display: block; padding: .6rem .7rem; font-size: .88rem; text-decoration: none; color: var(--ink); }
  .nav > li > a:hover, .nav > li:focus-within > a { color: var(--navy); }
  .nav > li > a[aria-current] { color: var(--accent); }
  .nav ul { position: absolute; left: 0; top: 100%; min-width: 250px; background: var(--white); border-radius: var(--r); padding: .6rem; box-shadow: 0 16px 40px rgba(21,41,56,.12); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; }
  .nav > li:hover > ul, .nav > li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
  .nav > li:last-child ul, .nav > li:nth-last-child(2) ul { left: auto; right: 0; }
  .nav ul a { display: block; padding: .5rem .8rem; border-radius: var(--r-s); font-size: .9rem; text-decoration: none; color: var(--ink); }
  .nav ul a:hover { background: var(--paper); color: var(--navy); }
}
@media (max-width: 1180px) {
  .menu-btn { display: block; }
  .menu-close { margin: 0 0 1rem auto; }
  .menu { inset: 0 0 0 auto; width: min(100%, 380px); height: 100dvh; margin: 0; border: 0; padding: 1.5rem; background: var(--paper); overflow-y: auto; box-shadow: -10px 0 40px rgba(21,41,56,.2); }
  .menu::backdrop { background: rgba(21,41,56,.4); }
  .nav > li { border-bottom: 1px solid var(--line); padding: .9rem 0; }
  .nav > li > a { font: 500 1.2rem var(--f-head); text-decoration: none; color: var(--navy); }
  .nav ul { margin-top: .4rem; }
  .nav ul a { display: block; padding: .25rem 0; color: var(--muted); text-decoration: none; }
}
@media (max-width: 720px) { .header__end .pill { display: none; } }
/* Schermi molto stretti (320px): logo e spazi ridotti perché l'header stia su una riga */
@media (max-width: 380px) { .header .wrap { gap: .75rem; } .header__end { gap: .6rem; } .logo, .logo img { width: 112px; } }

/* Barra annuncio (ultima pubblicazione): sta sotto l'header ma non è sticky, quindi si vede solo in cima alla pagina */
.announce { display: block; background: var(--tint); color: var(--ink); font-size: .88rem; text-decoration: none; }
.announce .wrap { display: flex; align-items: center; gap: .9rem; padding-block: .6rem; }
.announce .wrap::after { content: "→"; flex: none; }
.announce__tag { flex: none; padding: .25rem .75rem; border-radius: 999px; background: var(--navy); color: var(--white); font-size: .78rem; font-weight: 500; --sel-bg: var(--white); --sel-fg: var(--navy-900); }
.announce__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce:hover .announce__title { text-decoration: underline; }
@media (max-width: 720px) { .announce__title { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.35; } }

/* ---------- Testata di pagina: titolo a sinistra, testo a destra, foto sotto ---------- */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 2rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-600); }
.crumbs .sep { color: inherit; }

.hero { padding-block: clamp(3rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem); }
.hero > .wrap:first-child:not(.hero__grid), .hero__text { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); column-gap: clamp(2rem, 7vw, 7rem); align-items: start; }
:where(.hero > .wrap:first-child, .hero__text) > * { grid-column: 2; }
.hero .crumbs { grid-column: 1 / -1; }
.hero h1 { grid-column: 1; grid-row: span 5; margin: 0; }
.hero .lead, .hero .subtitle, .hero .muted { margin-top: .6rem; }
.hero .actions { margin-top: .75rem; }
.hero__media { margin-top: clamp(2rem, 5vw, 3.5rem); aspect-ratio: 16/6.5; border-radius: var(--r); overflow: hidden; background: var(--tint); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero--navy { background: var(--navy); color: var(--navy-100); padding-bottom: clamp(3rem, 6vw, 5rem); }
.hero--navy h1, .hero--navy .subtitle { color: var(--white); }
.hero--navy .crumbs, .hero--navy .crumbs a { color: var(--navy-100); }
.hero--navy .lead { color: #e3ebf0; }
.subtitle { font: 500 clamp(1.1rem, 1.6vw, 1.35rem)/1.4 var(--f-head); color: var(--ink); letter-spacing: -0.01em; max-width: 40ch; }
@media (max-width: 820px) {
  .hero > .wrap:first-child:not(.hero__grid), .hero__text { grid-template-columns: 1fr; }
  :where(.hero > .wrap:first-child, .hero__text) > *, .hero .crumbs, .hero h1 { grid-column: 1; grid-row: auto; }
  .hero h1 { margin-bottom: .5rem; }
  .hero__media { aspect-ratio: 4/3; }
}

/* Home: foto grande con i tre ambiti sovrapposti */
.hero__stage { position: relative; margin-top: clamp(2rem, 5vw, 3.5rem); }
.hero__photo { width: 100%; aspect-ratio: 16/7.5; object-fit: cover; border-radius: var(--r); background: var(--tint); }
.hero__tiles { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.tile { display: block; background: var(--white); border-radius: var(--r); padding: 1.6rem 1.8rem; text-decoration: none; color: var(--muted); font-size: .93rem; line-height: 1.6; transition: background .15s; }
.tile h3 { font-size: 1.2rem; margin-bottom: .45rem; }
.tile p { margin: 0; }
a.tile:hover h3 { color: var(--accent-600); }
.hero__tiles .tile { display: flex; flex-direction: column; }
.tile .more { align-self: flex-start; margin-top: auto; padding-top: 1rem; }
a.tile:hover .more { color: var(--accent-600); text-decoration-color: currentColor; }
@media (max-width: 1000px) {
  .hero__tiles { position: static; grid-template-columns: 1fr; margin-top: var(--gap); }
  .hero__photo { aspect-ratio: 4/3; }
}

/* ---------- Sezioni ---------- */
.section { padding-block: var(--section); }
.section--paper { background: var(--tint); } /* fascia colorata, come i blocchi azzurri di B-Well */
.section--navy { background: var(--navy); color: var(--navy-100); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy a:not(.btn) { color: var(--white); }
.section--tight { padding-top: 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.head h2 { margin: 0; }
.head p { margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split--wide { grid-template-columns: .8fr 1.2fr; }
.split--media { align-items: center; }
.split img { border-radius: var(--r); }
@media (max-width: 820px) { .split, .split--wide { grid-template-columns: 1fr; } }

.band img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--r); }

/* Home: elenco trattamenti + trattamenti in evidenza */
.services { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.services__list { list-style: none; margin: 0; padding: 0; }
.services__list a { display: block; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.services__list li:first-child a { padding-top: 0; }
.services__list strong { display: block; font: 400 1.35rem/1.3 var(--f-head); color: var(--ink); }
.services__list span { font-size: .9rem; color: var(--muted); }
.services__list a:hover strong { color: var(--accent-600); }
.services .grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .services, .services .grid { grid-template-columns: 1fr; } }

/* Home: chi siamo */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 7vw, 7rem); align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.about h2 { font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 400; margin: 0; }
.about p { margin: 0 0 1rem; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

.collage { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(260px, auto)); gap: var(--gap); }
.collage > * { border-radius: var(--r); overflow: hidden; }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.collage__main { grid-row: span 2; }
.collage__block { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: .3rem; padding: 2.2rem; background: var(--white); color: var(--muted); text-decoration: none; }
.collage__block h3 { margin: 0; }
.collage__block p { margin: 0; font-size: .95rem; }
.collage__block--navy { background: var(--navy); color: var(--navy-100); }
.collage__block--navy h3 { color: var(--white); }
a.collage__block:hover h3 { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 900px) {
  .collage { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .collage__main { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16/10; }
  .collage > img { aspect-ratio: 1; }
}
@media (max-width: 520px) { .collage { grid-template-columns: 1fr; } }

/* Riquadri bianchi su fascia colorata (pubblicazioni in home) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--gap); }
.tiles .tile { display: flex; flex-direction: column; }
.tiles .tile h3 { font-size: 1.05rem; line-height: 1.35; margin: 0 0 1.2rem; }
.tiles .tile p { margin-top: auto; font-size: .85rem; }

/* ---------- Testo lungo ---------- */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); }
.toc { position: sticky; top: 100px; align-self: start; font-size: .9rem; background: var(--white); border-radius: var(--r); padding: 1.3rem 1.4rem; }
.toc p { font-weight: 600; color: var(--ink); margin-bottom: .6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: .35rem 0; text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--accent-600); }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .toc { position: static; } }

.prose { max-width: var(--text); }
.prose--center { margin-inline: auto; }
.prose h2 { margin-top: 2.2em; scroll-margin-top: 100px; }
.prose > h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose figure { margin: 2.2rem 0; }
.prose figure img { border-radius: var(--r); width: 100%; }
.prose figcaption { font-size: .85rem; color: var(--muted); margin-top: .6rem; }
.prose .intro { font-size: 1.2rem; line-height: 1.6; color: var(--ink); }

.aside { background: var(--white); padding: 1.5rem 1.8rem; margin: 2rem 0; border-radius: var(--r); }
.aside p:last-child { margin: 0; }

.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lines li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.lines--2 { columns: 2; column-gap: clamp(2rem, 5vw, 4rem); border-top: 0; }
.lines--2 li { break-inside: avoid; }
@media (max-width: 820px) { .lines--2 { columns: 1; } }

/* ---------- Card (articoli, sezioni) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 2.5rem var(--gap); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--4 { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card__img { aspect-ratio: 16/10; overflow: hidden; border-radius: var(--r); background: var(--white); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__img img { transform: scale(1.03); }
.card__body { padding-top: 1.1rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.card:hover h3 { color: var(--accent-600); }
.card p { margin: 0; font-size: .95rem; }
.card .meta { font-size: .85rem; margin-bottom: .5rem; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1.2rem; font-size: .85rem; }
.tag { padding: .3rem .85rem; border-radius: 999px; border: 1px solid rgba(21,41,56,.14); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card--plain .card__img { aspect-ratio: 1; }
/* Miniatura delle pubblicazioni: una «prima pagina» di paper composta in CSS al posto dello screenshot.
   Le misure sono in cqi (larghezza della miniatura), quindi scala con la card a ogni larghezza. */
.paper { container-type: inline-size; }
.paper__page { display: flex; flex-direction: column; gap: 3.5cqi; height: 100%; padding: 7cqi 8cqi 0; }
.paper__journal { display: flex; justify-content: space-between; gap: 3cqi; padding-bottom: 2.6cqi; border-bottom: 1px solid var(--line); font: 500 3.1cqi/1.3 var(--f-body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.paper__journal span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.paper__title { flex: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; font: 700 6.1cqi/1.22 Georgia, "Times New Roman", serif; color: var(--ink); }
/* righe dell'abstract: solo un segno grafico, sfumato verso il basso */
.paper__page::after { content: ""; flex: 1; min-height: 0; background: repeating-linear-gradient(var(--line) 0 .7cqi, transparent .7cqi 3.3cqi); mask-image: linear-gradient(#000, transparent); }

/* Elenco link senza immagine */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; padding: 1.4rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.row h3 { margin: 0 0 .25rem; font-size: 1.2rem; }
.row p { margin: 0; color: var(--muted); max-width: 60ch; }
.row .more { white-space: nowrap; }
.row:hover h3, .row:hover .more { color: var(--accent-600); }

/* Trattamenti su fascia navy */
.treat { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.treat a { display: block; padding: 1.6rem 1.8rem; border-radius: var(--r); background: rgba(255,255,255,.07); text-decoration: none; transition: box-shadow .15s; }
.treat h3 { margin: 0 0 .4rem; font-size: 1.2rem; }
.treat p { margin: 0; color: var(--white); }
.treat a:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
@media (max-width: 900px) { .treat { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .treat { grid-template-columns: 1fr; } }

/* Documenti: pubblicazioni, rassegna stampa */
.docs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.doc { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; padding: 1.5rem 1.8rem; background: var(--white); border-radius: var(--r); }
.doc__date { color: var(--muted); font-size: .88rem; margin: .2rem 0 0; }
.doc h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.doc h3 a { text-decoration: none; }
.doc h3 a:hover { color: var(--accent-600); }
.doc p { margin: 0 0 .4rem; max-width: 70ch; }
.doc .doc__links { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; margin: 1rem 0 0; }
.doc__links .btn { padding: .6rem 1.1rem; font-size: .85rem; }
.doc__links .btn::before { content: "↓"; margin-right: .5em; }
.doc__links .more::after { content: "\00a0↗"; }
@media (max-width: 640px) { .doc { grid-template-columns: minmax(0, 1fr); gap: .3rem; padding: 1.3rem; } }

/* Filtri archivio */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.tabs a { padding: .5rem 1.1rem; border-radius: 999px; background: var(--white); text-decoration: none; font-size: .9rem; color: var(--ink); }
.tabs a:hover { color: var(--accent-600); }
.tabs a[aria-current] { background: var(--navy); color: var(--white); }
/* Archivi: «Carica altri articoli» è un link vero alla pagina successiva; seri.js la carica e la accoda */
.pager { margin: 3rem 0 0; text-align: center; }
.pager [aria-busy="true"] { opacity: .6; pointer-events: none; }
/* Divisore d'anno negli archivi: anno + riga orizzontale, a tutta larghezza */
.year { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 0; font: 500 1.25rem/1.2 var(--f-head); letter-spacing: -0.01em; color: var(--navy); }
.year:first-child { margin-top: 0; }
.year::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.year h2 { margin: 0; font: inherit; letter-spacing: inherit; }

/* Persone (Advisory Board): foto grande + scheda bianca */
.person { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gap); margin-bottom: var(--gap); }
.person img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; border-radius: var(--r); background: var(--tint); }
.person > div { background: var(--white); border-radius: var(--r); padding: clamp(1.5rem, 3vw, 2.5rem); }
.person h3 { font-size: 1.6rem; margin-bottom: .2rem; }
.person .site { font-size: .9rem; display: inline-block; margin-bottom: 1.2rem; }
.person p { max-width: var(--text); }
.person p:last-child { margin-bottom: 0; }
@media (max-width: 760px) { .person { grid-template-columns: 1fr; } .person img { min-height: 0; aspect-ratio: 4/3; } }

/* Video */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 2rem var(--gap); }
.video { text-decoration: none; color: inherit; }
.video__thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: var(--navy-900); }
.video__thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.video__thumb::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3.4rem; height: 3.4rem; margin: -1.7rem 0 0 -1.7rem; border-radius: 50%; background: rgba(255,255,255,.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7v10l8-5z' fill='%232c4e63'/%3E%3C/svg%3E") center/1.6rem no-repeat; }
.video:hover .video__thumb img { opacity: .8; }
.video p { margin: .9rem 0 0; font: 500 1.05rem/1.4 var(--f-head); color: var(--ink); }
.video:hover p { color: var(--accent-600); }
.section--navy .video p { color: var(--white); }
.group + .group { margin-top: 4rem; }

/* Brochure */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 2.5rem var(--gap); }
.cover-item { text-decoration: none; color: inherit; }
.cover-item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--r); background: var(--white); transition: transform .2s; }
.cover-item:hover img { transform: translateY(-3px); }
.cover-item p { margin: .8rem 0 0; font: 500 1rem/1.35 var(--f-head); color: var(--ink); }
.cover-item span { display: block; font: 400 .88rem var(--f-body); color: var(--muted); }

/* Tabelle (hotel) */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--white); border-radius: var(--r); overflow: hidden; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .85rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.table td { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { font-weight: 500; color: var(--ink); }
.table a { display: inline-block; padding-block: .2rem; }
@media (max-width: 640px) { .table thead { display: none; } .table tr { display: block; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); } .table td { display: block; border: 0; padding: .1rem 0; } }

/* Mappa */
.map { width: 100%; aspect-ratio: 16/10; border: 0; border-radius: var(--r); background: var(--tint); }

/* Autore */
.author { display: grid; grid-template-columns: 88px 1fr; gap: 1.2rem; align-items: center; padding: 1.5rem; margin-top: 3rem; background: var(--white); border-radius: var(--r); }
.author img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.author p { margin: 0; }
.author .name { font: 500 1.05rem/1.2 var(--f-head); color: var(--ink); margin-bottom: .2rem; }
.refs { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 3rem; }
.refs h2 { font-size: 1.2rem; }

/* ---------- Contatti: modulo a sinistra, scheda bianca a destra ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact h2 { margin-bottom: 1.75rem; }
.contact__card { background: var(--white); border-radius: var(--r); padding: 1.8rem; font-size: .93rem; }
.contact__card h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.contact__card dl { margin: 2rem 0 1.75rem; display: grid; grid-template-columns: auto 1fr; gap: .7rem 1.5rem; }
.contact__card dt { color: var(--muted); }
.contact__card dd { margin: 0; text-align: right; }
.contact__card dd a { color: var(--ink); text-decoration: none; }
.contact__card .btn { display: block; text-align: center; background: var(--tint); }
.contact__card .btn:hover { background: var(--navy); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form .full { grid-column: 1 / -1; }
.form label { display: grid; gap: .4rem; font-size: .88rem; font-weight: 500; color: var(--ink); }
.form input, .form textarea { font: inherit; font-weight: 400; font-size: .92rem; color: var(--ink); background: var(--white); border: 1px solid var(--field); border-radius: var(--r-s); padding: .75rem .9rem; width: 100%; }
/* Errore: solo dopo che l'utente ha toccato il campo o provato a inviare */
.form input:user-invalid, .form textarea:user-invalid { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; }
.form textarea { min-height: 130px; resize: vertical; }
.form .consent { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; color: var(--muted); font-size: .85rem; }
.form .consent input { width: 1.25rem; height: 1.25rem; flex: none; margin-top: .1rem; accent-color: var(--navy); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form { grid-template-columns: 1fr; } }

.info dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.5rem; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: #a6b8c4; font-size: .9rem; line-height: 1.6; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer a { color: #c3d1db; text-decoration: none; }
.footer a:hover { color: var(--white); }
.footer__top { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-block: 2.75rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__top img { width: 140px; }
.social { display: flex; flex-wrap: wrap; gap: .5rem; }
.social a { display: block; padding: .5rem 1.1rem; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: var(--white); font-size: .85rem; }
.social a:hover { background: var(--white); color: var(--navy-900); }
.footer__grid { display: grid; grid-template-columns: 1.3fr repeat(5, 1fr); gap: 2.5rem 2rem; padding-block: 3rem; }
.footer h2 { font: 500 1.05rem/1.3 var(--f-head); letter-spacing: -0.01em; margin: 0 0 1rem; }
.footer h2 a { display: inline-block; padding-block: .15rem; color: var(--white); }
.footer__col li + li { margin-top: .45rem; }
.footer__contact p { margin: 0 0 1.2rem; }
.footer__contact dl { margin: 0 0 1.2rem; display: grid; gap: .1rem; }
.footer__contact dt { font-size: .8rem; }
.footer__contact dd { margin: 0 0 .5rem; }
.footer__contact a { color: var(--white); font-size: 1rem; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-block: 1.4rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; }
.footer__bottom ul { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
@media (max-width: 1100px) { .footer__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__contact { grid-column: 1 / -1; } }

/* Testi legali (privacy, cookie) */
.legal h2 { font-size: 1.5rem; }
.legal h3, .legal h4 { font-size: 1.1rem; margin-top: 1.6em; }
.legal details { background: var(--white); border-radius: var(--r); padding: .9rem 1.2rem; margin: .6rem 0; }
.legal summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 1rem; padding-right: 2rem; position: relative; }
.legal summary::-webkit-details-marker { display: none; }
.legal summary::after { content: "+"; position: absolute; right: 0; top: 0; font: 400 1.4rem/1 var(--f-body); color: var(--navy); }
.legal details[open] summary::after { content: "−"; }
.legal summary > * { margin: 0; }
.legal summary h3 { font-size: 1.05rem; color: var(--ink); }
.legal summary p { font-size: .88rem; color: var(--muted); }
.legal details[open] summary { margin-bottom: .8rem; }
.legal a { overflow-wrap: anywhere; }

/* Pagina di ringraziamento */
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Comparsa allo scroll (sal.js, attivata da seri.js): salita breve e lenta, non il 20% dell'altezza previsto dalla libreria */
[data-sal] { --sal-duration: .6s; --sal-easing: cubic-bezier(.2, .7, .2, 1); }
[data-sal="slide-up"] { transform: translateY(18px); }
@media print { [data-sal] { opacity: 1 !important; transform: none !important; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

