/* ==========================================================================
   T-ONE Therapeutics — foglio di stile unico
   ========================================================================== */

:root {
  --lime: #b5bf0e;
  --lime-dark: #8f9700;
  --ink: #1d1d1b;
  --ink-soft: #4a4a46;
  --muted: #6f6f69;
  --line: #e4e6dc;
  --bg: #ffffff;
  --bg-soft: #f5f6f0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(29, 29, 27, .08);
  --container: 1160px;
  --header-h: 84px;
  --font-head: Arial, Helvetica, sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 2;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--lime-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .6em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; color: #fff; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 14px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.brand img { height: 52px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: 2px; }
.nav li { position: relative; }

.nav a, .nav .sub-toggle {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 8px;
  background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav .sub-toggle:hover,
.nav li.active > a, .nav li.active > .sub-toggle { color: var(--lime-dark); }

.sub-toggle::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

.submenu {
  position: absolute; top: 100%; left: 0; min-width: 270px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.submenu a { font-size: 14px; padding: 10px 12px; }
.submenu a:hover, .submenu li.active > a { background: var(--bg-soft); }
/* Sottomenu di secondo livello (es. Governance): si apre a destra */
.submenu .sub-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  font-size: 14px; padding: 10px 12px; text-align: left;
}
.submenu .sub-toggle:hover, .submenu li.open > .sub-toggle { background: var(--bg-soft); }
.submenu .sub-toggle::after { transform: rotate(-45deg); margin-left: 16px; }
.submenu .submenu { top: -9px; left: 100%; margin-left: 4px; }
.nav li:hover > .submenu, .nav li:focus-within > .submenu, .nav li.open > .submenu {
  opacity: 1; visibility: visible; transform: none;
}

.lang { display: flex; gap: 2px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); }
.lang a { padding: 6px 8px; font-size: 13px; color: var(--muted); }
.lang a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime); text-underline-offset: 5px; text-decoration-thickness: 2px; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 0; background: none; cursor: pointer;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 11px; width: 24px; height: 2px; background: var(--ink);
  content: ""; transition: transform .25s, opacity .25s;
}
.nav-toggle span { top: 22px; }
.nav-toggle span::before { top: -8px; left: 0; }
.nav-toggle span::after { top: 8px; left: 0; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 16px 24px 40px; overflow-y: auto;
    transform: translateX(100%); transition: transform .3s ease;
  }
  .nav-open .nav { transform: none; }
  .nav > ul { flex-direction: column; align-items: stretch; }
  .nav a, .nav .sub-toggle { padding: 14px 4px; font-size: 1rem; width: 100%; text-align: left; border-bottom: 1px solid var(--line); border-radius: 0; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 0 0 0 14px; display: none; min-width: 0;
  }
  .nav li.open > .submenu { display: block; }
  .nav li:hover > .submenu { display: none; }
  .nav li.open:hover > .submenu { display: block; }
  .submenu .submenu { margin-left: 0; }
  .submenu .sub-toggle::after { transform: translateY(-3px) rotate(45deg); }
  .submenu .sub-toggle { justify-content: flex-start; }
  .lang { margin: 20px 0 0; padding: 0; border: 0; }
  .lang a { border: 0; width: auto; padding: 8px 12px 8px 0; }
}

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

.hero {
  position: relative; color: #fff;
  background: var(--ink) center / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(20, 20, 18, .88) 0%, rgba(20, 20, 18, .6) 55%, rgba(20, 20, 18, .25) 100%);
}
.hero .container { padding-top: 110px; padding-bottom: 90px; }
.hero h1 { color: #fff; max-width: 820px; margin: 0; text-transform: uppercase; letter-spacing: .03em; }
.hero h1::after {
  content: ""; display: block; width: 72px; height: 4px; background: var(--lime);
  margin-top: 22px; border-radius: 2px;
}
.hero p.lead { font-size: 1.15rem; max-width: 640px; margin: 22px 0 0; color: rgba(255,255,255,.88); }
.hero h1 { line-height: 1.3; text-shadow: .08em .08em .08em rgba(0,0,0,.4); }

.hero--home { background-color: #9b878b; }  /* stesso grigio dello sfondo del video */
/* Video di sfondo della home: occupa la parte destra e sfuma verso sinistra,
   così le cellule non finiscono dietro il titolo */
.hero-video {
  position: absolute; top: 0; right: 0; bottom: 0; width: 64%; height: 100%;
  object-fit: cover; object-position: 50% 50%; z-index: -2;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 28%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 28%);
}
.hero--home::before {
  background: linear-gradient(90deg, rgba(20,20,18,.88) 0%, rgba(20,20,18,.7) 40%, rgba(20,20,18,.15) 70%, rgba(20,20,18,0) 100%);
}
.hero--home .container { padding-top: 150px; padding-bottom: 150px; }
.hero--home h1 { text-transform: none; letter-spacing: 0; max-width: 720px; font-size: clamp(1.9rem, 4vw, 3rem); }

@media (max-width: 720px) {
  .hero .container { padding-top: 70px; padding-bottom: 60px; }
  .hero--home .container { padding-top: 90px; padding-bottom: 90px; }
  .hero-video { width: 100%; -webkit-mask-image: none; mask-image: none; }
  .hero::before, .hero--home::before { background: rgba(20, 20, 18, .72); }
}

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

.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 64px 0; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); }

.prose { max-width: 780px; color: var(--ink); }
.prose p { text-align: justify; }
.prose .brand-name { color: var(--lime); font-weight: 700; }
@media (max-width: 600px) { .prose p { text-align: left; } }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 36px; } }

/* Highlights */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; position: relative;
}
.pillar .num {
  font-family: var(--font-head); font-weight: 700; font-size: .85rem; letter-spacing: .2em;
  color: var(--lime-dark);
}
.pillar h3 { margin-top: 10px; }
.pillar p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
.pillars--2 { grid-template-columns: repeat(2, 1fr); }
.pillar--lg p { font-size: 1.12rem; line-height: 1.6; }
@media (max-width: 880px) { .pillars { grid-template-columns: 1fr; } }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: .88rem;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 15px 26px; border-radius: 999px;
  background: var(--lime); color: var(--ink); border: 2px solid var(--lime);
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- Persone ---------- */

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px; }
.people--team { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.person { text-align: center; }
.person figure { margin: 0 0 18px; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); aspect-ratio: 1 / 1; }
.people--team .person figure { aspect-ratio: 4 / 5; }
.person img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: grayscale(.15); transition: transform .5s, filter .5s; }
.person:hover img { transform: scale(1.04); filter: none; }
.person h3 { margin: 0 0 4px; font-size: 1.2rem; }
.person .role { color: var(--muted); font-size: .95rem; margin: 0; }
.person .link { display: inline-block; margin-top: 10px; font-weight: 700; font-size: .9rem; }

/* Card generiche (soci, contatti, legale) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; display: flex; gap: 20px; align-items: flex-start;
  transition: box-shadow .25s, transform .25s;
}
a.card { color: inherit; }
a.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }
.card .tag {
  display: inline-block; font-family: var(--font-head); font-size: .74rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--lime-dark); margin-bottom: 8px;
}
.monogram {
  flex: 0 0 58px; width: 58px; height: 58px; border-radius: 50%;
  background: var(--ink); color: var(--lime);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .04em;
  padding-top: 3px;
}
.card--logo { flex-direction: column; align-items: center; text-align: center; padding: 40px 28px; }
.card--logo img { max-height: 70px; width: auto; margin-bottom: 20px; }

.group-title {
  font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.group-title:first-child { margin-top: 0; }

/* ---------- Notizie ---------- */

.timeline { display: grid; gap: 40px; }
.news {
  display: grid; grid-template-columns: 420px 1fr; gap: 40px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.news figure { margin: 0; height: 100%; min-height: 260px; background: var(--bg-soft); }
.news figure img { width: 100%; height: 100%; object-fit: cover; }
.news .body { padding: 36px 40px 36px 0; }
.news .year {
  font-family: var(--font-head); font-weight: 700; font-size: 2.4rem; line-height: 1;
  color: var(--lime); margin-bottom: 12px; display: block;
}
.news h3 { font-size: 1.35rem; }
.news p { color: var(--ink-soft); }
.news--text { grid-template-columns: 1fr; }
.news--text .body { padding: 40px; }
.news--text .body > p { max-width: 860px; }
/* Card: immagine intera (es. targa con loghi obbligatori), mai ritagliata */
.news figure.news-figure--contain { background: #fff; border-right: 1px solid var(--line); }
.news-figure--contain img { object-fit: contain; padding: 14px; }
.news-more {
  margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 700; letter-spacing: .02em; color: var(--lime-dark);
}
.news-more:hover { color: var(--ink); }
.news-more:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; border-radius: 4px; }
/* Popup articolo (stessa base del popup biografie, senza colonna foto) */
.bio--article .bio-body { max-height: min(88vh, 900px); }
.bio--article .year {
  display: block; font-family: var(--font-head); font-weight: 700; font-size: 2rem; line-height: 1;
  color: var(--lime); margin-bottom: 12px;
}
.article-text { border-top: 1px solid var(--line); padding-top: 22px; color: var(--ink-soft); }
.article-text p { margin-bottom: 1em; }
.news-plaque { display: block; margin-top: 24px; }
.news-plaque img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 760px) { .bio--article .bio-body { max-height: calc(100vh - 24px); overflow-y: auto; } }
.citation {
  border-left: 4px solid var(--lime); background: var(--bg-soft);
  padding: 20px 24px; border-radius: 0 10px 10px 0; font-size: .95rem; color: var(--ink-soft);
}
.citation em { display: block; font-style: normal; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.citation p { margin: 0 0 8px; }
.citation p:last-child { margin: 0; }
@media (max-width: 880px) {
  .news { grid-template-columns: 1fr; gap: 0; }
  .news figure { min-height: 0; aspect-ratio: 16 / 10; }
  .news .body { padding: 28px; }
}

/* Rassegna stampa */
.press { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.press a {
  display: grid; place-items: center; height: 110px; padding: 20px 26px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  transition: box-shadow .25s, transform .25s;
}
.press a:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.press img { max-height: 52px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .25s, opacity .25s; }
.press a:hover img { filter: none; opacity: 1; }
@media (max-width: 880px) { .press { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Contatti ---------- */

.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 13px 15px; border: 1px solid #cfd2c4; border-radius: 10px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(181,191,14,.25); }
.form textarea { min-height: 160px; resize: vertical; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--ink-soft); }
.form .check input { width: auto; margin-top: 5px; }
.form-status { grid-column: 1 / -1; margin: 0; font-weight: 700; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

.info-box { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 36px; }
.info-box h3 { color: #fff; }
.info-box dl { margin: 0; }
.info-box dt { font-family: var(--font-head); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--lime); margin-top: 22px; }
.info-box dd { margin: 4px 0 0; color: rgba(255,255,255,.85); }
.info-box a { color: #fff; }
.info-box a:hover { color: var(--lime); }

/* ---------- CTA ---------- */

.cta { background: var(--ink); color: #fff; }
.cta .container { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0; max-width: 640px; }

/* ---------- Footer ---------- */

.site-footer { background: #121211; color: rgba(255,255,255,.72); font-size: .95rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding: 72px 0 48px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: var(--lime); }
.site-footer .logo { background: #fff; display: inline-block; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; }
.site-footer .logo img { height: 44px; width: auto; }
.site-footer .bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; font-size: .82rem;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
@media (max-width: 880px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* Pagina legale */
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.notice {
  background: #fff8e1; border: 1px solid #f0d67a; border-radius: 10px;
  padding: 16px 20px; font-size: .95rem; margin-bottom: 32px;
}

/* Animazioni leggere */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Schede persona cliccabili + popup biografia ---------- */

.person-open {
  display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: center; cursor: pointer;
}
.person-open:focus-visible { outline: 3px solid var(--lime); outline-offset: 6px; border-radius: var(--radius); }
.person-open:hover img { transform: scale(1.04); filter: none; }
.person .more, .card .more {
  display: inline-block; margin-top: 8px; font-size: .85rem; font-weight: 700;
  color: var(--lime-dark); letter-spacing: .02em;
}
.person-open:hover .more, .card--person:hover .more { color: var(--ink); }
.person .link { margin-top: 4px; }

.card--person { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.card--person:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card--person:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.avatar { flex: 0 0 58px; width: 58px; height: 58px; border-radius: 50%; object-fit: cover; }

html.modal-open { overflow: hidden; }

dialog.bio {
  width: min(960px, calc(100% - 32px)); max-height: min(88vh, 900px);
  padding: 0; border: 0; border-radius: 18px; overflow: hidden;
  background: #fff; color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
dialog.bio::backdrop { background: rgba(18, 18, 17, .72); backdrop-filter: blur(3px); }
dialog.bio[open] { animation: bio-in .25s ease; }
@keyframes bio-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.bio-grid { display: grid; grid-template-columns: 300px 1fr; max-height: min(88vh, 900px); }
.bio-photo { margin: 0; background: var(--bg-soft); }
.bio-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.bio-photo--mono { display: grid; place-items: center; background: var(--ink); }
.bio-photo--mono .monogram { width: 120px; height: 120px; flex-basis: 120px; font-size: 2.4rem; background: none; border: 3px solid var(--lime); }

.bio-body { padding: 48px 48px 40px; overflow-y: auto; overscroll-behavior: contain; }
.bio-body h2 { font-size: 1.7rem; margin-bottom: 14px; padding-right: 30px; }
.bio-roles { list-style: none; margin: 0 0 16px; padding: 0; }
.bio-roles li {
  position: relative; padding-left: 18px; color: var(--ink-soft); font-size: .95rem; line-height: 1.6; margin-bottom: 4px;
}
.bio-roles li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.bio-contacts { font-size: .92rem; margin: 0 0 20px; }
.bio-contacts .link { margin: 0; }
.bio-text { border-top: 1px solid var(--line); padding-top: 22px; }
.bio-text p { text-align: justify; margin-bottom: 1em; }

.bio-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 28px; line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.12); transition: background .2s, color .2s;
}
.bio-close:hover { background: var(--ink); color: #fff; }
.bio-close:focus-visible { outline: 3px solid var(--lime); }

@media (max-width: 760px) {
  dialog.bio { max-height: calc(100vh - 24px); width: calc(100% - 24px); }
  .bio-grid { display: block; max-height: calc(100vh - 24px); overflow-y: auto; }
  .bio-photo { aspect-ratio: 4 / 3; }
  .bio-photo--mono { aspect-ratio: auto; padding: 36px 0; }
  .bio-body { padding: 28px 22px 30px; overflow: visible; }
  .bio-body h2 { font-size: 1.4rem; }
  .bio-text p { text-align: left; }
}
dialog.bio:focus, dialog.bio:focus-visible { outline: none; }
.person .role { line-height: 1.5; margin-top: 2px; }
@media (min-width: 761px) {
  .bio-photo:not(.bio-photo--mono) img { height: auto; aspect-ratio: 4 / 5; }
  /* Il testo scorre dentro il popup: senza un'altezza massima propria il box
     si allungava quanto il testo e veniva tagliato dal bordo del popup */
  .bio-grid { align-items: start; }
  .bio-body { max-height: min(88vh, 900px); max-height: min(88dvh, 900px); }
}

/* ---------- Pagine legali ---------- */
.legal h3 { font-size: 1.05rem; margin: 1.4em 0 .4em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .5em; }
.legal-updated { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow-x: auto; margin: 1em 0 1.4em; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.legal th { background: var(--bg-soft); font-weight: 700; }
.legal code, .cookie-prefs code { font-size: .88em; background: var(--bg-soft); padding: 1px 6px; border-radius: 4px; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.link-btn:hover { color: var(--lime); }

/* ---------- Banner cookie (stile iubenda) ---------- */
.cookie-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 900;
  width: min(1120px, calc(100% - 32px));
  display: flex; align-items: center; gap: 28px;
  padding: 24px 56px 24px 28px; border-radius: var(--radius);
  background: var(--ink); color: #fff; border-top: 4px solid var(--lime);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  animation: cookie-in .35s ease;
}
.cookie-banner[hidden] { display: none; }
@keyframes cookie-in { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translateX(-50%); } }
.cookie-banner h2 { color: #fff; font-size: 1.05rem; margin: 0 0 6px; }
.cookie-banner p { margin: 0; font-size: .9rem; line-height: 1.6; color: rgba(255, 255, 255, .82); }
.cookie-banner a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner a:hover { color: #fff; }
.cookie-banner__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.cookie-x {
  position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: rgba(255, 255, 255, .75); font-size: 26px; line-height: 1; cursor: pointer;
}
.cookie-x:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.cookie-link {
  padding: 10px 6px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 700; color: var(--lime); text-decoration: underline; text-underline-offset: 3px;
}
.cookie-link:hover { color: #fff; }
/* Accetta e Rifiuta con la stessa evidenza (Linee guida Garante) */
.cookie-btn {
  min-width: 120px; padding: 12px 22px; border: 2px solid var(--lime); border-radius: 999px; cursor: pointer;
  font-family: var(--font-head); font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--lime); color: var(--ink); transition: background .2s, color .2s, border-color .2s;
}
.cookie-btn:hover { background: #fff; border-color: #fff; color: var(--ink); }
.cookie-btn--dark { background: #fff; border-color: #fff; color: var(--ink); }
.cookie-btn--dark:hover { background: var(--lime); border-color: var(--lime); }
.cookie-btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.cookie-btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.cookie-btn:focus-visible, .cookie-link:focus-visible, .cookie-x:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

/* Pannello preferenze */
dialog.cookie-prefs {
  width: min(680px, calc(100% - 32px)); max-height: min(88vh, 820px);
  padding: 0; border: 0; border-radius: 18px; overflow: hidden;
  background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
dialog.cookie-prefs[open] { display: flex; flex-direction: column; animation: bio-in .25s ease; }
dialog.cookie-prefs::backdrop { background: rgba(18, 18, 17, .72); backdrop-filter: blur(3px); }
.cookie-prefs__body { padding: 40px 40px 12px; overflow-y: auto; }
.cookie-prefs__body h2 { font-size: 1.5rem; margin-bottom: 10px; padding-right: 40px; }
.cookie-prefs__body > p { color: var(--ink-soft); font-size: .95rem; }
.cookie-cat { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-top: 14px; }
.cookie-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cookie-cat h3 { font-size: 1.02rem; margin: 0; }
.cookie-cat p { margin: 8px 0 0; font-size: .9rem; color: var(--ink-soft); }
.cookie-always { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--lime-dark); }
.cookie-prefs__actions {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px;
  padding: 18px 40px 24px; border-top: 1px solid var(--line); background: var(--bg-soft);
}
.cookie-prefs .cookie-btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.cookie-prefs .cookie-btn--dark:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.cookie-prefs .cookie-btn:not(.cookie-btn--dark):not(.cookie-btn--ghost):hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #c9cbc2; transition: background .2s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.switch input:checked + span { background: var(--lime); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid var(--lime-dark); outline-offset: 2px; }

/* Icona fissa per riaprire le preferenze */
.cookie-float {
  position: fixed; left: 18px; bottom: 18px; z-index: 800; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid var(--lime); cursor: pointer;
  background: var(--ink); color: var(--lime); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); transition: transform .2s;
}
.cookie-float[hidden] { display: none; }
.cookie-float:hover { transform: scale(1.08); }

@media (max-width: 860px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 16px; padding: 22px 20px 20px; bottom: 12px; width: calc(100% - 24px); }
  .cookie-banner__text { padding-right: 28px; }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-banner__actions .cookie-btn { flex: 1 1 0; }
  .cookie-link { order: 3; width: 100%; text-align: center; }
  .cookie-prefs__body { padding: 30px 22px 10px; }
  .cookie-prefs__actions { padding: 16px 22px 20px; }
  .cookie-prefs__actions .cookie-btn { flex: 1 1 100%; }
}

/* Campo trappola anti-spam del modulo contatti: invisibile alle persone */
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status.is-ok { color: var(--lime-dark); font-weight: 700; }
.form-status.is-error { color: #b3261e; font-weight: 700; }
.form button[type="submit"]:disabled { opacity: .6; cursor: wait; }
