/* ---------------------------------------------------------------
   toderi.ch — foglio di stile unico
   Nessuna dipendenza esterna, nessun font remoto, nessun tracker.
   --------------------------------------------------------------- */

:root {
  --ink:        #0e1f24;
  --ink-soft:   #4a6068;
  --primary:    #0d4d5c;
  --primary-dk: #07313b;
  --accent:     #c08a3e;
  --line:       #dce6e8;
  --bg:         #ffffff;
  --bg-soft:    #f3f8f9;
  --radius:     14px;
  --shadow:     0 18px 50px rgba(7, 49, 59, .16);
  --shadow-sm:  0 4px 18px rgba(7, 49, 59, .08);
  --wrap:       1160px;
  --serif:      "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-dk); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); margin: 0 0 .35em; letter-spacing: -.015em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 0 0 .5em; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; margin: 0 0 .3em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

/* ---------- Animazione di entrata ---------- */

.js .reveal { opacity: 0; transform: translateY(20px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal.in { opacity: 1; transform: none; transition: none; }
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding-block: 16px;
}
.brand { text-decoration: none; color: #fff; display: block; transition: color .3s; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.16rem; font-weight: 600; }
.brand span {
  display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  opacity: .75;
}
.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  font-size: .93rem; text-decoration: none; color: #fff; opacity: .85;
  transition: background .2s, color .3s, opacity .2s;
}
.nav a:hover { opacity: 1; background: rgba(255,255,255,.15); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.18); opacity: 1; color: #fff; }

/* stato "scrollato" oppure pagine senza hero scuro */
.site-header.solid,
body.light-header .site-header {
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom-color: var(--line);
  box-shadow: 0 2px 20px rgba(7,49,59,.06);
}
.site-header.solid .brand,
body.light-header .site-header .brand { color: var(--ink); }
.site-header.solid .brand span,
body.light-header .site-header .brand span { color: var(--ink-soft); opacity: 1; }
.site-header.solid .nav a,
body.light-header .site-header .nav a { color: var(--ink-soft); opacity: 1; }
.site-header.solid .nav a:hover,
body.light-header .site-header .nav a:hover { background: var(--bg-soft); color: var(--primary-dk); }
.site-header.solid .nav a[aria-current="page"],
body.light-header .site-header .nav a[aria-current="page"] { background: var(--primary); color: #fff; }

/* ---------- Hero a tutto schermo ---------- */

.hero-full {
  position: relative;
  min-height: min(88vh, 780px);
  display: grid;
  align-items: end;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.hero-full .hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
  z-index: -2;
  animation: slowzoom 24s ease-out forwards;
}
@keyframes slowzoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero-full .hero-bg { animation: none; } }

.hero-full::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7,49,59,.72) 0%, rgba(7,49,59,.35) 35%, rgba(7,49,59,.88) 100%),
    linear-gradient(90deg, rgba(7,49,59,.55) 0%, rgba(7,49,59,0) 65%);
}
.hero-full .wrap { width: 100%; padding-block: 110px 72px; }
.hero-full h1 { color: #fff; max-width: 15ch; }
.hero-full .kicker {
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: #e7c894; font-weight: 700; margin: 0 0 1.2em;
}
.hero-full .lead { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 46ch; color: #d7e6e9; margin: 0 0 2em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 30px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; font-size: .97rem; border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: 0 8px 24px rgba(192,138,62,.32);
}
.btn:hover { background: #ac7833; color: #fff; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(192,138,62,.4); }
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn.ghost {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.45);
  color: #fff; box-shadow: none; backdrop-filter: blur(4px);
}
.btn.ghost:hover { background: rgba(255,255,255,.2); box-shadow: none; }
.btn.dark { background: var(--primary); box-shadow: 0 8px 24px rgba(13,77,92,.28); }
.btn.dark:hover { background: var(--primary-dk); box-shadow: 0 12px 30px rgba(13,77,92,.36); }
.btn.outline { background: transparent; border-color: var(--line); color: var(--primary); box-shadow: none; }
.btn.outline:hover { background: var(--bg-soft); color: var(--primary-dk); box-shadow: none; }

/* ---------- Striscia numeri ---------- */

.stats {
  background: var(--primary-dk); color: #fff;
  border-top: 3px solid var(--accent);
}
.stats ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stats li { padding: 30px 22px; text-align: center; border-left: 1px solid rgba(255,255,255,.1); }
.stats li:first-child { border-left: 0; }
.stats b {
  display: block; font-family: var(--serif); font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 600; line-height: 1; color: #fff;
}
.stats span { display: block; margin-top: 8px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #a8c6cc; }

/* ---------- Fasce ---------- */

section.band { padding-block: 84px; }
section.band.alt { background: var(--bg-soft); }
section.band.tight { padding-block: 56px; }

.eyebrow {
  font-size: .73rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin: 0 0 1em;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::after { content: ""; flex: 0 0 46px; height: 1px; background: var(--accent); opacity: .5; }
.center .eyebrow { justify-content: center; }
.center { text-align: center; }
.center .section-intro { margin-inline: auto; }

.section-intro { max-width: 62ch; color: var(--ink-soft); margin: 0 0 2.4em; font-size: 1.05rem; }

/* ---------- Evidenza (primato TOETVA) ---------- */

.highlight {
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  color: #fff; border-radius: var(--radius); padding: 34px 40px;
  box-shadow: var(--shadow);
}
.highlight .badge {
  width: 62px; height: 62px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  display: grid; place-items: center; flex: none;
}
.highlight .badge svg { width: 28px; height: 28px; fill: #e7c894; }
.highlight h3 { color: #fff; font-size: 1.3rem; margin-bottom: .25em; }
.highlight p { margin: 0; color: #cfe2e6; font-size: .97rem; }

/* ---------- Sezione split ---------- */

.split { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); align-items: start; }
.split.reverse { grid-template-columns: minmax(0,7fr) minmax(0,5fr); }
.split.reverse > .split-media { order: 2; }
.split-media { position: sticky; top: 100px; }
.split-media img {
  width: 100%; aspect-ratio: 3/4; max-height: 74vh; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.split-body { padding-left: 64px; }
.split.reverse .split-body { padding: 0 64px 0 0; }

/* ---------- Elenco prestazioni ---------- */

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.features li {
  padding: 16px 18px; border-radius: 10px;
  border: 1px solid transparent;
  transition: background .25s, border-color .25s, transform .25s;
}
.features li:hover { background: #fff; border-color: var(--line); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
section.band:not(.alt) .features li:hover { background: var(--bg-soft); }
.features h3 { color: var(--primary-dk); display: flex; align-items: baseline; gap: 9px; }
.features h3::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); transform: translateY(-2px);
}
.features p { margin: 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Card ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card h3 { color: var(--primary-dk); font-size: 1.06rem; margin-bottom: .4em; }
.card .yr {
  display: inline-block; font-family: var(--serif); font-size: .8rem; font-weight: 700;
  letter-spacing: .08em; color: var(--accent); margin-bottom: .5em;
}
.card p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.card address { font-style: normal; color: var(--ink-soft); font-size: .96rem; }
.card .map { margin-top: 18px; border: 0; width: 100%; height: 210px; border-radius: 8px; filter: saturate(.9); }

/* ---------- Sedi / CTA finale ---------- */

.cta-band { background: var(--primary-dk); color: #fff; padding-block: 80px; }
.cta-band h2 { color: #fff; }
.cta-band .section-intro { color: #a8c6cc; }
.offices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 20px; }
.offices li {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 30px 26px; text-align: center;
  transition: background .25s, transform .25s;
}
.offices li:hover { background: rgba(255,255,255,.11); transform: translateY(-3px); }
.offices .pin { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.offices .pin svg { width: 20px; height: 20px; fill: #fff; }
.offices h3 { color: #fff; font-size: 1.12rem; margin-bottom: .3em; }
.offices address { font-style: normal; color: #a8c6cc; font-size: .93rem; }
.offices .tel {
  display: inline-block; margin-top: 12px; font-family: var(--serif); font-size: 1.16rem;
  color: #fff; text-decoration: none; border-bottom: 1px solid rgba(231,200,148,.6); padding-bottom: 2px;
}
.offices .tel:hover { color: #e7c894; }

/* ---------- Timeline ---------- */

.timeline {
  list-style: none; margin: 0; padding: 0;
  max-width: 860px;
  border-left: 2px solid var(--line);
}
.timeline li { position: relative; padding: 0 0 36px 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -9px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--primary);
  transition: background .25s, border-color .25s, transform .25s;
}
section.alt .timeline li::before { background: var(--bg-soft); }
.timeline li:hover::before { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.timeline .yr {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: .84rem; letter-spacing: .1em; color: var(--accent);
  margin-bottom: .25em;
}
.timeline h3 { color: var(--primary-dk); font-size: 1.16rem; margin-bottom: .25em; }
.timeline p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.timeline .who { display: block; font-size: .88rem; color: #7b9299; margin-top: .3em; }

/* ---------- Curriculum ---------- */

.two-col { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.prose p { max-width: 64ch; }
.prose .lead { font-size: 1.12rem; color: var(--ink-soft); }
.portrait { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; box-shadow: var(--shadow); }

.creds { list-style: none; margin: 0 0 1.8em; padding: 0; }
.creds li { font-size: .96rem; color: var(--ink-soft); padding-left: 20px; position: relative; }
.creds li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* ---------- Video e loghi ---------- */

.video-wrap {
  max-width: 820px; margin: 0 auto 44px; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); background: #000;
}
.video-wrap video { width: 100%; display: block; aspect-ratio: 16/9; }
.logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 56px; }
.logos img { max-height: 54px; width: auto; }
.logos a { opacity: .8; transition: opacity .25s, transform .25s; }
.logos a:hover { opacity: 1; transform: translateY(-2px); }

/* ---------- Barra chiamata mobile ---------- */

.callbar { display: none; }

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

.site-footer { background: #06272f; color: #9db9c0; padding-block: 48px; font-size: .92rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.site-footer strong { color: #fff; font-family: var(--serif); font-size: 1.05rem; }
.site-footer ul { list-style: none; margin: .6em 0 0; padding: 0; }

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

@media (max-width: 900px) {
  body { font-size: 16px; }
  .hero-full { min-height: 88vh; }
  .hero-full .wrap { padding-block: 130px 56px; }
  .stats ul { grid-template-columns: 1fr 1fr; }
  .stats li:nth-child(odd) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.1); }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 34px; }
  .split.reverse > .split-media { order: 0; }
  .split-media { position: static; }
  .split-media img { aspect-ratio: 16/10; max-height: 320px; }
  .split-body, .split.reverse .split-body { padding: 0; }
  .features { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .portrait { max-width: 340px; margin-inline: auto; }
  .highlight { grid-template-columns: 1fr; gap: 18px; padding: 28px; }
  section.band { padding-block: 56px; }
  .site-header .wrap { justify-content: center; text-align: center; padding-block: 12px; }

  /* barra fissa "chiama" in fondo, molto utile su mobile */
  .callbar {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 45;
    background: rgba(7,49,59,.97); backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,.14);
  }
  .callbar a {
    flex: 1; text-align: center; padding: 13px 4px; color: #fff;
    text-decoration: none; font-size: .82rem; line-height: 1.3;
    border-left: 1px solid rgba(255,255,255,.12);
  }
  .callbar a:first-child { border-left: 0; }
  .callbar a b { display: block; font-size: .72rem; color: #e7c894; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  body { padding-bottom: 58px; }
}

@media print {
  .site-header, .site-footer, .btn, .map, .video-wrap, .callbar, .stats { display: none; }
  body { font-size: 12pt; padding-bottom: 0; }
  .hero-full { min-height: 0; color: var(--ink); }
  .hero-full::after, .hero-full .hero-bg { display: none; }
  .hero-full h1 { color: var(--ink); }
}

/* ---------- Selettore lingua ---------- */

.header-right { display: flex; align-items: center; gap: 14px; }

.langs {
  display: flex; list-style: none; margin: 0; padding: 0; gap: 2px;
  border-left: 1px solid rgba(255,255,255,.28); padding-left: 14px;
}
.langs a {
  display: inline-block; padding: 5px 8px; border-radius: 6px;
  font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-decoration: none; color: #fff; opacity: .6;
  transition: opacity .2s, background .2s, color .3s;
}
.langs a:hover { opacity: 1; background: rgba(255,255,255,.15); color: #fff; }
.langs a[aria-current] { opacity: 1; color: #e7c894; }

.site-header.solid .langs,
body.light-header .site-header .langs { border-left-color: var(--line); }
.site-header.solid .langs a,
body.light-header .site-header .langs a { color: var(--ink-soft); opacity: .75; }
.site-header.solid .langs a:hover,
body.light-header .site-header .langs a:hover { background: var(--bg-soft); color: var(--primary-dk); opacity: 1; }
.site-header.solid .langs a[aria-current],
body.light-header .site-header .langs a[aria-current] { color: var(--accent); opacity: 1; }

@media (max-width: 900px) {
  .header-right { flex-direction: column; gap: 8px; }
  .langs { border-left: 0; padding-left: 0; }
}
