/* =========================================================
   UniPa — Noi siamo questi
   Palette: notte mediterranea, tufo, ocra maiolica, terracotta, mare
   ========================================================= */
:root {
  --ink: #0d1a2b;
  --ink-2: #13253b;
  --ink-3: #1c3450;
  --tufo: #f4ecdf;
  --tufo-2: #e9dcc6;
  --paper: #fbf7f0;
  --ocra: #e0a73e;
  --ocra-deep: #b97d17;
  --terra: #c9542f;
  --mare: #1f7a80;
  --mare-light: #5fb3b3;
  --text: #1b2533;
  --muted: #5b6573;
  --line: rgba(13, 26, 43, 0.12);

  --didattica: var(--ocra);
  --ricerca: var(--mare);
  --terza: var(--terra);

  --f-display: "Fraunces", "Georgia", serif;
  --f-body: "Schibsted Grotesk", "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ocra); color: var(--ink); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ocra); color: var(--ink); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--ocra); outline-offset: 3px; border-radius: 4px; }

/* ---------- Grain overlay ---------- */
.grain {
  pointer-events: none; position: fixed; inset: 0; z-index: 60; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease);
}
.site-header.scrolled {
  background: rgba(13, 26, 43, .88);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--tufo); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-logo { height: 54px; width: auto; }
footer .brand-logo { height: 56px; }
.brand-text { font-family: var(--f-display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.brand-text small { display: block; font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .65; margin-top: 4px; font-weight: 400; }

.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 99px;
  font-size: 14px; font-weight: 500; color: var(--tufo); text-decoration: none; opacity: .85;
  transition: background .25s, opacity .25s, color .25s;
}
.nav-links a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.nav-links a.active { opacity: 1; background: var(--tufo); color: var(--ink); }
.nav-links a.lang { border: 1px solid rgba(244,236,223,.35); font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; margin-left: 6px; opacity: 1; }
.nav-links a.lang:hover { background: var(--ocra); color: var(--ink); border-color: var(--ocra); }
.nav-links .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(244,236,223,.3); color: var(--tufo);
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; margin: 4px auto; transition: transform .3s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; color: var(--tufo);
  background:
    radial-gradient(1200px 700px at 85% 10%, rgba(31,122,128,.45), transparent 60%),
    radial-gradient(900px 600px at 5% 95%, rgba(201,84,47,.28), transparent 60%),
    linear-gradient(180deg, #0b1624 0%, var(--ink) 55%, #10233a 100%);
  overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px 0 48px;
}
.hero-pattern { position: absolute; inset: 0; opacity: .5; }
.hero-pattern svg { width: 100%; height: 100%; }
.hero-star {
  position: absolute; right: -8vw; top: 50%; width: min(72vw, 820px); aspect-ratio: 1;
  transform: translateY(-55%); opacity: .9;
}
.hero-star .spin { transform-origin: 50% 50%; animation: spin 120s linear infinite; }
.hero-star .spin-rev { transform-origin: 50% 50%; animation: spin 180s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-inner { position: relative; z-index: 2; }
.eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px; color: var(--ocra);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.hero h1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(56px, 11vw, 168px); line-height: .9; letter-spacing: -.035em;
  margin: 22px 0 28px; font-variation-settings: "SOFT" 50, "WONK" 1;
}
.hero h1 em { font-style: italic; color: var(--ocra); font-weight: 300; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { to { transform: none; } }

.hero-lead { max-width: 620px; font-size: clamp(18px, 1.6vw, 21px); color: rgba(244,236,223,.82); margin: 0 0 36px; }
.hero-lead strong { color: var(--tufo); font-weight: 600; }
.fade-up { opacity: 0; transform: translateY(18px); animation: fadeUp 1s var(--ease) forwards; }
.d1 { animation-delay: .45s; } .d2 { animation-delay: .6s; } .d3 { animation-delay: .75s; } .d4 { animation-delay: .9s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 99px;
  font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ocra); color: var(--ink); }
.btn-primary:hover { background: #f0bb57; }
.btn-ghost { border-color: rgba(244,236,223,.35); color: var(--tufo); }
.btn-ghost:hover { border-color: var(--tufo); background: rgba(244,236,223,.06); }
.btn svg { width: 16px; height: 16px; }

.hero-stats {
  margin-top: 64px; display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(244,236,223,.18);
}
.hero-stats > div { padding: 22px 18px 0 0; }
.hero-stats > div + div { padding-left: 18px; border-left: 1px solid rgba(244,236,223,.12); }
.stat-num { font-family: var(--f-display); font-size: clamp(32px, 4vw, 52px); line-height: 1; letter-spacing: -.02em; font-weight: 400; }
.stat-num sup { font-size: .45em; color: var(--ocra); vertical-align: super; margin-left: 2px; }
.stat-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; margin-top: 8px; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3;
  width: 1px; height: 36px; background: linear-gradient(var(--ocra), transparent);
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue { 0%,100% { opacity: .2; transform: translate(-50%, -6px); } 50% { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--ocra); color: var(--ink); overflow: hidden; white-space: nowrap;
  border-block: 1px solid var(--ink); position: relative; z-index: 2;
}
.marquee-track { display: inline-flex; gap: 0; animation: marquee 60s linear infinite; padding: 14px 0; }
.marquee span {
  font-family: var(--f-display); font-style: italic; font-size: clamp(20px, 2.4vw, 30px); padding: 0 22px;
  display: inline-flex; align-items: center; gap: 44px;
}
.marquee span::after { content: "✦"; font-style: normal; font-size: .6em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: clamp(88px, 12vw, 160px) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: end; margin-bottom: clamp(48px, 7vw, 88px); }
.section-num {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.section-num b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink); font-weight: 700; }
.section h2 {
  font-family: var(--f-display); font-weight: 400; font-size: clamp(44px, 7vw, 104px);
  line-height: .95; letter-spacing: -.035em; margin: 0;
}
.section h2 em { font-style: italic; font-weight: 300; }
.section-intro { font-size: clamp(17px, 1.4vw, 20px); color: var(--muted); margin: 0; max-width: 560px; }
.section-intro strong { color: var(--text); }

h3 { font-family: var(--f-display); font-weight: 500; letter-spacing: -.015em; line-height: 1.1; }

/* ---------- Manifesto / tre missioni ---------- */
.manifesto { background: var(--tufo); }
.manifesto-quote {
  font-family: var(--f-display); font-weight: 300; font-size: clamp(28px, 3.8vw, 54px);
  line-height: 1.12; letter-spacing: -.02em; max-width: 1080px; margin: 0 0 clamp(56px, 8vw, 96px);
}
.manifesto-quote em { color: var(--terra); }
.manifesto-quote .hl { background: linear-gradient(transparent 62%, rgba(224,167,62,.55) 62%); padding: 0 .08em; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar {
  --c: var(--ocra);
  position: relative; display: flex; flex-direction: column; min-height: 440px;
  padding: 32px; border-radius: var(--radius); background: var(--paper);
  text-decoration: none; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line);
  transition: transform .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease);
}
.pillar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c);
  clip-path: circle(0% at 90% 10%); transition: clip-path .7s var(--ease);
}
.pillar:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(13,26,43,.45); }
.pillar:hover::before { clip-path: circle(150% at 90% 10%); }
.pillar.didattica { --c: var(--ocra); }
.pillar.ricerca { --c: var(--mare); }
.pillar.terza { --c: var(--terra); }
.pillar.ricerca:hover, .pillar.terza:hover { color: var(--paper); }
.pillar-idx { font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; }
.pillar-icon { width: 88px; height: 88px; margin: 28px 0 auto; color: var(--c); transition: color .5s, transform .7s var(--ease); }
.pillar:hover .pillar-icon { color: currentColor; transform: rotate(-8deg) scale(1.06); }
.pillar h3 { font-size: clamp(34px, 3.2vw, 46px); margin: 24px 0 12px; }
.pillar p { margin: 0 0 22px; opacity: .8; font-size: 16px; }
.pillar-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.pillar-go svg { width: 18px; transition: transform .3s; }
.pillar:hover .pillar-go svg { transform: translateX(6px); }


/* ---------- NUMERI ---------- */
.numeri-sec { background: var(--ink); color: var(--tufo); overflow: hidden; }
.numeri-sec::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 0% 100%, rgba(224,167,62,.16), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(201,84,47,.18), transparent 60%);
}
.numeri-sec .section-num b { background: var(--tufo); }
.numeri-sec .section-intro { color: rgba(244,236,223,.7); }
.numeri-sec h2 em { color: var(--ocra); }
.num-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; }
.num-col {
  --c: var(--ocra);
  border-radius: var(--radius); background: rgba(244,236,223,.04); border: 1px solid rgba(244,236,223,.12);
  overflow: hidden; transition-delay: calc(var(--i, 0) * 90ms);
}
.num-col.ric { --c: var(--mare-light); }
.num-col.tm { --c: var(--terra); }
.num-col header { display: flex; align-items: baseline; gap: 14px; padding: 24px 28px 20px; border-top: 6px solid var(--c); background: rgba(244,236,223,.04); }
.num-col h3 { font-size: clamp(26px, 2.4vw, 34px); margin: 0; font-weight: 400; }
.num-idx { font-family: var(--f-mono); font-size: 12px; color: var(--c); letter-spacing: .14em; }
.num-col dl { margin: 0; padding: 4px 28px 18px; }
.num-col dl > div { display: grid; grid-template-columns: 9.6rem 1fr; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(244,236,223,.1); }
.num-col dl > div:last-child { border-bottom: 0; }
.num-col dt { font-family: var(--f-display); font-size: clamp(32px, 2.9vw, 44px); line-height: 1; letter-spacing: -.03em; color: var(--c); font-weight: 400; white-space: nowrap; }
.num-col dt i { font-style: normal; font-size: .5em; vertical-align: super; margin-left: 2px; }
.num-col dd { margin: 0; font-size: 14.5px; line-height: 1.45; color: rgba(244,236,223,.78); }

/* ---------- Progetti in evidenza ---------- */
.showcase { margin: 24px 0 0; }
.showcase-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 56px 0 20px; }
.showcase-head h3 { font-size: clamp(30px, 3.4vw, 46px); margin: 0; font-weight: 400; }
.showcase-head h3 em { color: var(--terra); }
.showcase-head p { margin: 0; color: var(--muted); }
.showcase-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: thin;
  scrollbar-color: var(--terra) transparent;
}
.show-card {
  scroll-snap-align: start; background: var(--ink); color: var(--tufo); border-radius: var(--radius);
  padding: 26px; min-height: 250px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
  border-top: 5px solid var(--c); transition: transform .4s var(--ease);
}
.show-card:hover { transform: translateY(-4px); }
.show-n { position: absolute; right: 18px; bottom: -14px; font-family: var(--f-display); font-size: 96px; line-height: 1; color: rgba(244,236,223,.06); }
.show-tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.show-card h4 { font-family: var(--f-display); font-weight: 500; font-size: 24px; line-height: 1.1; margin: 4px 0 0; }
.show-card p { margin: 0; font-size: 14.5px; color: rgba(244,236,223,.72); position: relative; }

/* ---------- DIDATTICA ---------- */
.didattica-sec { background: var(--paper); }
.didattica-sec .section-num b { background: var(--ocra); }
.did-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
.did-card {
  border-radius: var(--radius); padding: clamp(28px, 3vw, 44px); background: var(--tufo);
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.did-card h3 { font-size: clamp(26px, 2.4vw, 34px); margin: 0 0 14px; }
.did-card p { margin: 0; color: var(--muted); }

.did-big { background: var(--ink); color: var(--tufo); grid-row: span 2; display: flex; flex-direction: column; }
.did-big p { color: rgba(244,236,223,.75); }
.did-big .big-num {
  font-family: var(--f-display); font-size: clamp(110px, 14vw, 200px); line-height: .8; letter-spacing: -.05em;
  color: var(--ocra); margin: auto 0 16px; font-weight: 300;
}
.levels { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.levels span {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; padding: 8px 14px; border-radius: 99px;
  border: 1px solid rgba(244,236,223,.25);
}

.intl { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.intl-globe { width: 120px; height: 120px; color: var(--ocra-deep); }
.intl-globe .orbit { transform-origin: 60px 60px; animation: spin 22s linear infinite; }
.intl-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.intl-list li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.intl-list li::before { content: "→"; color: var(--ocra-deep); font-weight: 700; }

.poli { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; }
.sicily { width: 100%; height: auto; }
.sicily .island { fill: var(--tufo-2); stroke: var(--ink); stroke-width: 1.2; }
.sicily .pin circle.core { fill: var(--terra); }
.sicily .pin circle.halo { fill: var(--terra); opacity: .3; transform-box: fill-box; transform-origin: center; animation: pulse 2.6s ease-out infinite; }
.sicily .pin.main circle.core { fill: var(--ink); }
.sicily .pin.main circle.halo { fill: var(--ocra); opacity: .6; }
.sicily text { font-family: var(--f-mono); font-size: 11px; fill: var(--ink); letter-spacing: .06em; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(2.4); opacity: 0; } }

.did-strip {
  margin-top: 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--paper);
}
.did-strip > div { padding: 28px; border-right: 1px solid var(--line); transition: background .3s; }
.did-strip > div:last-child { border-right: 0; }
.did-strip > div:hover { background: var(--tufo); }
.did-strip .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ocra-deep); }
.did-strip h4 { font-family: var(--f-display); font-weight: 500; font-size: 22px; margin: 10px 0 8px; line-height: 1.15; }
.did-strip p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- RICERCA ---------- */
.ricerca-sec { background: var(--ink); color: var(--tufo); overflow: hidden; }
.ricerca-sec .section-num b { background: var(--mare-light); }
.ricerca-sec .section-intro { color: rgba(244,236,223,.72); }
.ricerca-sec .section-intro strong { color: var(--tufo); }
.ricerca-sec::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(800px 500px at 100% 0%, rgba(31,122,128,.35), transparent 60%);
}

.areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(244,236,223,.12); border: 1px solid rgba(244,236,223,.12); border-radius: var(--radius); overflow: hidden; }
.area {
  background: var(--ink); padding: 28px 24px 30px; position: relative; min-height: 250px;
  display: flex; flex-direction: column; transition: background .4s var(--ease);
}
.area:hover { background: var(--ink-3); }
.area-n { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; color: var(--mare-light); }
.area-ico { width: 40px; height: 40px; margin: 18px 0 18px; color: var(--ocra); transition: transform .5s var(--ease); }
.area:hover .area-ico { transform: translateY(-4px) rotate(-6deg); }
.area h3 { font-size: 22px; margin: 0 0 10px; }
.area p { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(244,236,223,.66); }

/* Dipartimenti explorer */
.depts { margin-top: clamp(80px, 10vw, 130px); }
.depts-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.depts-head h3 { font-size: clamp(34px, 4vw, 56px); margin: 0; font-weight: 400; }
.depts-head h3 em { color: var(--mare-light); }
.depts-head p { margin: 0; max-width: 420px; color: rgba(244,236,223,.66); font-size: 15px; }

.explorer { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.dept-tabs { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(244,236,223,.25) transparent; padding-right: 4px; }
.dept-tab {
  all: unset; cursor: pointer; display: grid; grid-template-columns: 1fr; gap: 2px;
  padding: 10px 14px; border-radius: 12px; font-size: 14.5px; font-weight: 500; line-height: 1.3;
  color: rgba(244,236,223,.7); transition: background .25s, color .25s;
}
.dept-tab .abbr { font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; opacity: .7; }
.dept-tab:hover { background: rgba(244,236,223,.06); color: var(--tufo); }
.dept-tab[aria-selected="true"] { background: var(--tufo); color: var(--ink); }
.dept-tab:focus-visible { outline: 3px solid var(--ocra); }

.dept-panel {
  background: var(--tufo); color: var(--ink); border-radius: var(--radius); padding: clamp(28px, 4vw, 52px);
  min-height: 560px; position: relative; overflow: hidden;
}
.dept-panel .glyph { position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; color: var(--tufo-2); pointer-events: none; }
.dept-panel .tag { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mare); position: relative; }
.dept-panel h4 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; letter-spacing: -.02em; margin: 12px 0 18px; max-width: 680px; position: relative; }
.dept-panel .desc { color: var(--muted); max-width: 720px; margin: 0 0 28px; position: relative; }
.dept-kpi { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 28px; }
.dept-kpi div { font-family: var(--f-display); font-size: 38px; line-height: 1; }
.dept-kpi div small { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.topics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; position: relative; }
.topic { background: var(--paper); border-radius: 14px; padding: 18px 20px; border: 1px solid var(--line); }
.topic b { display: block; font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.topic span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.dept-panel .anim { animation: panelIn .55s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } }
.dept-link { display: inline-flex; margin-top: 24px; font-weight: 600; font-size: 14px; color: var(--mare); position: relative; }

.keywords { margin-top: 72px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.keywords span {
  padding: 10px 18px; border-radius: 99px; border: 1px solid rgba(244,236,223,.22);
  font-size: 14px; color: rgba(244,236,223,.85); transition: all .3s;
}
.keywords span:hover { background: var(--mare); border-color: var(--mare); color: #fff; transform: translateY(-2px); }

/* ---------- TERZA MISSIONE ---------- */
.terza-sec { background: var(--tufo); }
.terza-sec .section-num b { background: var(--terra); color: var(--paper); }

.tm-hero {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; margin-bottom: 24px;
}
.tm-count {
  background: var(--terra); color: var(--paper); border-radius: var(--radius); padding: clamp(28px, 3vw, 44px);
  display: flex; flex-direction: column; justify-content: space-between; min-height: 360px; position: relative; overflow: hidden;
}
.tm-count .big { font-family: var(--f-display); font-size: clamp(120px, 15vw, 220px); line-height: .8; letter-spacing: -.05em; font-weight: 300; }
.tm-count p { margin: 0; font-size: 18px; max-width: 360px; }
.tm-count .eu { position: absolute; right: 22px; top: 22px; width: 90px; height: 90px; opacity: .9; }
.tm-count .eu g { transform-origin: 45px 45px; animation: spin 40s linear infinite; }

.tm-roles { background: var(--ink); color: var(--tufo); border-radius: var(--radius); padding: clamp(28px, 3vw, 44px); }
.tm-roles h3 { font-size: clamp(26px, 2.6vw, 36px); margin: 0 0 20px; font-weight: 400; }
.tm-roles h3 em { color: var(--ocra); }
.roles { display: flex; flex-wrap: wrap; gap: 8px; }
.roles span {
  font-size: 14px; padding: 9px 15px; border-radius: 99px; background: rgba(244,236,223,.07);
  border: 1px solid rgba(244,236,223,.14); transition: background .3s, color .3s;
}
.roles span:hover { background: var(--ocra); color: var(--ink); }

.clusters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cluster {
  background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; min-height: 300px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
  cursor: pointer; position: relative; text-align: left; font: inherit; color: inherit;
}
.cluster:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -28px rgba(13,26,43,.4); border-color: var(--terra); }
.cluster .emoji { width: 38px; height: 38px; color: var(--terra); transition: transform .5s var(--ease); }
.cluster:hover .emoji { transform: rotate(-8deg) scale(1.08); }
.cluster .n { position: absolute; top: 22px; right: 22px; font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.cluster h4 { font-family: var(--f-display); font-weight: 500; font-size: 21px; line-height: 1.15; margin: 8px 0 0; }
.cluster ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.cluster li { font-size: 14px; color: var(--muted); padding-left: 14px; position: relative; line-height: 1.45; }
.cluster li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--terra); }
.cluster .more { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--terra); }

.tm-pillars { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tm-pill {
  border-radius: var(--radius); padding: 30px; background: var(--paper); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.tm-pill .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--terra); }
.tm-pill h4 { font-family: var(--f-display); font-weight: 500; font-size: 26px; margin: 10px 0 10px; line-height: 1.1; }
.tm-pill p { margin: 0; color: var(--muted); font-size: 15px; }
.tm-pill a { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 14px; color: var(--terra); }

/* Dialog */
dialog.cluster-dialog {
  border: 0; padding: 0; border-radius: 22px; max-width: 720px; width: calc(100% - 32px);
  background: var(--paper); color: var(--text); box-shadow: 0 40px 100px rgba(0,0,0,.45);
}
dialog.cluster-dialog::backdrop { background: rgba(13,26,43,.65); backdrop-filter: blur(4px); }
dialog.cluster-dialog[open] { animation: dlg .45s var(--ease); }
@keyframes dlg { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.dlg-head { background: var(--terra); color: var(--paper); padding: 32px 36px 28px; position: relative; }
.dlg-head .emoji { display: block; width: 44px; height: 44px; }
.dlg-head .emoji svg { width: 100%; height: 100%; }
.dlg-head h3 { font-size: clamp(26px, 3vw, 36px); margin: 10px 0 0; font-weight: 400; }
.dlg-close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.18); color: var(--paper); font-size: 22px; line-height: 1;
}
.dlg-close:hover { background: rgba(255,255,255,.3); }
.dlg-body { padding: 28px 36px 36px; display: grid; gap: 18px; }
.dlg-body div b { display: block; font-family: var(--f-display); font-size: 19px; font-weight: 500; margin-bottom: 4px; }
.dlg-body div p { margin: 0; color: var(--muted); font-size: 15px; }
.dlg-body em { color: var(--terra); font-style: italic; }

/* ---------- Heritage ---------- */
.heritage { background: var(--ink); color: var(--tufo); padding: clamp(80px, 10vw, 130px) 0; overflow: hidden; }
.heritage h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(38px, 5.5vw, 76px); letter-spacing: -.03em; line-height: 1; margin: 16px 0 56px; max-width: 900px; }
.heritage h2 em { color: var(--ocra); }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 1px; background: rgba(244,236,223,.25); }
.tl { padding-right: 28px; position: relative; }
.tl::before { content: ""; display: block; width: 23px; height: 23px; border-radius: 50%; background: var(--ink); border: 2px solid var(--ocra); margin-bottom: 26px; position: relative; }
.tl:hover::before { background: var(--ocra); }
.tl .y { font-family: var(--f-display); font-size: 44px; line-height: 1; color: var(--ocra); letter-spacing: -.02em; }
.tl h4 { margin: 10px 0 8px; font-size: 18px; font-weight: 600; }
.tl p { margin: 0; font-size: 15px; color: rgba(244,236,223,.66); }

/* ---------- Contatti / CTA ---------- */
.cta { background: var(--ocra); color: var(--ink); padding: clamp(80px, 10vw, 130px) 0; position: relative; overflow: hidden; }
.cta-star { position: absolute; left: -120px; bottom: -160px; width: 520px; opacity: .18; }
.cta-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; position: relative; }
.cta h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(48px, 7.5vw, 112px); line-height: .92; letter-spacing: -.04em; margin: 0; }
.cta h2 em { font-weight: 300; }
.cta-links { display: grid; gap: 10px; }
.cta-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px;
  border-radius: 14px; background: rgba(13,26,43,.08); text-decoration: none; font-weight: 600;
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.cta-links a:hover { background: var(--ink); color: var(--tufo); transform: translateX(4px); }
.cta-links a small { font-family: var(--f-mono); font-weight: 400; font-size: 12px; opacity: .7; }

footer { background: #08111d; color: rgba(244,236,223,.6); padding: 48px 0 40px; font-size: 14px; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.foot .brand { color: var(--tufo); }
.foot p { margin: 0; }
.foot a { color: var(--tufo); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.stagger > * { transition-delay: calc(var(--i, 0) * 70ms); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .areas { grid-template-columns: repeat(2, 1fr); }
  .clusters { grid-template-columns: repeat(2, 1fr); }
  .explorer { grid-template-columns: 1fr; }
  .num-grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
  .dept-tabs { position: static; flex-direction: row; max-height: none; overflow-y: hidden; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .dept-tab { flex: none; scroll-snap-align: start; grid-template-columns: auto; white-space: nowrap; }
  .dept-tab .full { display: none; }
  .dept-tab .abbr { font-size: 13px; opacity: 1; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; padding: 16px var(--gutter) 24px;
    background: rgba(13,26,43,.97); transform: translateY(-120%); transition: transform .45s var(--ease);
    visibility: hidden;
  }
  .nav-open .nav-links { transform: none; visibility: visible; }
  .nav-links a { padding: 14px 16px; font-size: 17px; }
  .site-header.nav-open { background: rgba(13,26,43,.97); }

  .section-head { grid-template-columns: 1fr; gap: 24px; }
  .pillars { grid-template-columns: 1fr; }
  .pillar { min-height: 0; }
  .pillar-icon { margin-bottom: 0; width: 64px; height: 64px; }
  .did-grid { grid-template-columns: 1fr; }
  .did-big { grid-row: auto; }
  .did-strip { grid-template-columns: 1fr 1fr; }
  .did-strip > div:nth-child(2) { border-right: 0; }
  .did-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .tm-hero { grid-template-columns: 1fr; }
  .tm-count { min-height: 280px; }
  .tm-pillars { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .timeline::before { display: none; }
  .cta-inner { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .hero-stats > div:nth-child(4) { border-left: 0; padding-left: 0; }
  .hero-star { right: -30vw; width: 110vw; opacity: .45; top: 38%; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .areas, .clusters { grid-template-columns: 1fr; }
  .area { min-height: 0; }
  .topics { grid-template-columns: 1fr; }
  .did-strip { grid-template-columns: 1fr; }
  .did-strip > div { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .did-strip > div:last-child { border-bottom: 0; }
  .poli { grid-template-columns: 1fr; }
  .intl { grid-template-columns: 1fr; }
  .intl-globe { width: 84px; height: 84px; }
  .timeline { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats > div { padding-left: 0 !important; border-left: 0 !important; }
  .brand-text small { display: none; }
  .cluster { min-height: 0; }
  .dept-panel { min-height: 0; }
}

@media (max-width: 600px) {
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .scroll-cue { display: none; }
  .hero { padding-top: 100px; }
  .hero-stats { margin-top: 40px; }
  .hero-stats > div:last-child { grid-column: 1 / -1; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
  .manifesto-quote { margin-bottom: 40px; }
  .pillar { padding: 24px; }
  .pillar h3 { margin-top: 16px; }
  .area { padding: 22px 20px; display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; }
  .area-n { grid-column: 1 / -1; }
  .area-ico { margin: 10px 0 0; grid-row: span 2; }
  .area h3 { margin: 8px 0 6px; font-size: 20px; }
  .clusters { gap: 10px; }
  .cluster { padding: 20px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .cluster .emoji { width: 32px; height: 32px; flex: none; }
  .cluster h4 { margin: 0; font-size: 18px; flex: 1; padding-right: 20px; }
  .cluster ul { display: none; }
  .cluster .more { flex-basis: 100%; margin-top: 0; }
  .num-col header { padding: 20px 20px 16px; }
  .num-col dl { padding: 0 20px 10px; }
  .num-col dl > div { grid-template-columns: 7.4rem 1fr; gap: 12px; padding: 13px 0; }
  .num-col dt { font-size: 30px; }
  .num-col dd { font-size: 14px; }
  .showcase-track { grid-auto-columns: 80%; }
  .show-card { min-height: 220px; padding: 22px; }
  .tm-count { min-height: 0; gap: 24px; }
  .tm-pill, .did-strip > div { padding: 22px; }
  .dept-kpi { gap: 20px; }
  .dept-kpi div { font-size: 30px; }
  .depts { margin-top: 64px; }
  .keywords { margin-top: 48px; }
  .keywords span { font-size: 13px; padding: 8px 14px; }
  .dlg-head { padding: 24px 24px 20px; }
  .dlg-body { padding: 22px 24px 28px; }
  .cta-links a { padding: 16px 18px; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .grain, .scroll-cue, .marquee { display: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- LUOGHI / GALLERY ---------- */
.places { background: var(--paper); }
.places .section-num b { background: var(--ink); color: var(--ocra); }
.ph-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 150px; gap: 14px; grid-auto-flow: row dense;
}
.ph { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--tufo-2); isolation: isolate; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ph:hover img { transform: scale(1.05); }
.ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(8,17,29,.82)); pointer-events: none; }
.ph figcaption { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 1; color: var(--tufo); display: grid; gap: 2px; }
.ph figcaption b { font-family: var(--f-display); font-weight: 500; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.15; }
.ph figcaption span { font-size: 13px; opacity: .82; }
.ph-teatini { grid-column: span 7; grid-row: span 3; }
.ph-steri { grid-column: span 5; grid-row: span 3; }
.ph-soffitto { grid-column: span 5; grid-row: span 2; }
.ph-orto { grid-column: span 7; grid-row: span 2; }
.ph-edificio19 { grid-column: span 4; grid-row: span 2; }
.ph-motori { grid-column: span 4; grid-row: span 2; }
.ph-campus { grid-column: span 4; grid-row: span 2; }
.ph-cortile { grid-column: span 12; grid-row: span 2; }
.ph-cortile img { object-position: center 60%; }


/* Heritage con foto */
.heritage { position: relative; isolation: isolate; }
.heritage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13,26,43,.93) 0%, rgba(13,26,43,.8) 50%, rgba(13,26,43,.96) 100%), url("../assets/img/steri-1600.webp") center / cover no-repeat;
}

/* Crediti */
.credits { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(244,236,223,.1); font-size: 12.5px; }
.credits summary { cursor: pointer; color: rgba(244,236,223,.75); }
.credits ul { margin: 12px 0 6px; padding-left: 18px; display: grid; gap: 4px; }
.credits a { color: var(--ocra); }
.credits p { margin: 0; opacity: .7; }

@media (max-width: 900px) {
  .ph-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; gap: 10px; }
  .ph-grid .ph { grid-column: span 1; grid-row: span 1; }
  .ph-grid .ph-teatini, .ph-grid .ph-soffitto { grid-column: span 2; grid-row: span 2; }
  .ph-grid .ph-campus, .ph-grid .ph-cortile { grid-column: span 2; }
  .ph figcaption { left: 14px; right: 14px; bottom: 12px; }
  .ph figcaption span { display: none; }
  .ph-teatini figcaption span, .ph-soffitto figcaption span { display: block; }
}
@media (max-width: 480px) {
  .ph-grid { grid-auto-rows: 140px; }
  .ph figcaption b { font-size: 16px; }
}

/* ---------- HERO con foto studenti ---------- */
.hero-grid { display: block; }
.hero-copy { position: relative; z-index: 2; max-width: 640px; }
.hero-grid h1 { font-size: clamp(54px, 7.6vw, 118px); }
.hero-inner { z-index: 2; }
.hero-stats { position: relative; z-index: 2; }
.hero-photo {
  position: absolute; top: 0; right: 0; bottom: 110px; width: 50vw; margin: 0; z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 7%, #000 16%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 7%, #000 16%);
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,26,43,.92) 0%, rgba(13,26,43,.55) 12%, rgba(13,26,43,0) 26%, rgba(13,26,43,0) 70%, rgba(13,26,43,.85) 93%, rgba(13,26,43,1) 100%);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.06); animation: heroZoom 16s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-star { display: none; }
@media (max-width: 900px) {
  .hero-photo { width: 100%; bottom: auto; height: 58svh;
    -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 45%, transparent 100%); }
  .hero-photo::after { background: linear-gradient(180deg, rgba(13,26,43,.55) 0%, rgba(13,26,43,0) 25%, rgba(13,26,43,.35) 100%); }
  .hero-photo img { object-position: 50% 20%; }
  .hero { padding-top: 46svh; }
}

.foot-credit { display: inline-block; margin-top: 6px; font-size: 12.5px; color: rgba(244,236,223,.5); }
