/* Fondazione Lab PA — landing page
   Palette: navy + gold (from the foundation mark), warm paper background
*/

:root {
  --navy-900: #0e1e33;
  --navy-800: #16324a;
  --navy-700: #1c4763;
  --gold-600: #b9862f;
  --gold-500: #c9a227;
  --gold-100: #f2e6c4;
  --paper: #f6f3ec;
  --paper-dim: #efe9db;
  --ink: #1c2024;
  --ink-soft: #4b5560;
  --line: rgba(14, 30, 51, 0.14);
  --serif: "Source Serif 4", "Georgia", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.copy { max-width: 640px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--navy-900);
}

p { margin: 0 0 1em; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}

/* ---------- Masthead ---------- */

.masthead {
  background: var(--navy-900);
  color: #fdfcf9;
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.masthead .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fdfcf9; }
.brand img { width: 42px; height: 42px; border-radius: 3px; }
.brand-name { font-family: var(--serif); font-size: 2rem; letter-spacing: 0.01em; }
.brand-name strong { color: var(--gold-500); }

.masthead nav { display: flex; align-items: center; flex-wrap: wrap; }

.masthead nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: #e7e2d4;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  margin-left: 22px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.masthead nav a:first-child { margin-left: 0; }
.masthead nav a:hover { color: #fdfcf9; border-color: var(--gold-500); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  color: #fdfcf9;
  width: 42px;
  height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
}

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

.hero { background: var(--navy-900); color: #fdfcf9; position: relative; overflow: hidden; padding: 76px 0 92px; }
.hero .ring { position: absolute; right: -120px; top: 50%; transform: translateY(-50%); width: 480px; height: 480px; pointer-events: none; }
.hero .ring svg { width: 100%; height: 100%; }
.hero .container { position: relative; z-index: 2; }

.eyebrow-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-100);
  font-size: 1rem;
  margin-bottom: 20px;
}

.eyebrow-mark::before { content: ""; width: 26px; height: 1px; background: var(--gold-500); }

.hero h1 { color: #fdfcf9; font-size: clamp(2.1rem, 4vw, 3rem); max-width: 45ch; }
.hero .lead { max-width: 54ch; color: #d9d4c4; font-size: 1.15rem; }

.hero-actions { display: flex; margin-top: 32px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 3px;
  border: 1px solid transparent;
  margin: 0 16px 12px 0;
  cursor: pointer;
}

.btn-gold { background: var(--gold-500); color: var(--navy-900); font-weight: 600; }
.btn-gold:hover { background: #d8b23e; }
.btn-ghost { border-color: rgba(255,255,255,0.35); color: #fdfcf9; }
.btn-ghost:hover { border-color: var(--gold-500); color: var(--gold-100); }

/* ---------- Values band ---------- */

.values { background: var(--gold-500); color: var(--navy-900); }
.values .container { display: flex; flex-wrap: wrap; padding-top: 30px; padding-bottom: 30px; }
.values ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; width: 100%; }

.values li {
  flex: 1 1 auto;
  padding: 6px 26px;
  border-left: 1px solid rgba(14, 30, 51, 0.28);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
}

.values li:first-child { border-left: none; padding-left: 0; }

/* ---------- Sections ---------- */

section { padding: 84px 0; }

.section-split { display: grid; grid-template-columns: 190px 1fr; gap: 48px; max-width: 800px; }
.section-head { max-width: 640px; margin-bottom: 8px; }
.section-intro { color: var(--ink-soft); width: 1200px }

.section-label {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-600);
  font-size: 1.05rem;
  padding-top: 4px;
}

.section-split h2 { font-size: 1.8rem; }
.section-head h2 { font-size: 1.8rem; }
.section-split .copy p:last-child { margin-bottom: 0; }

.bg-paper-dim { background: var(--paper-dim); }

/* ---------- Governance / team ---------- */

.people {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  width: 120%;
}

.people li { background: var(--paper); padding: 28px 30px; display: flex; align-items: center; gap: 18px; }

.person-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(201, 162, 39, 0.45);
}

.person-name { font-family: var(--serif); font-size: 1.08rem; color: var(--navy-900); margin-bottom: 2px; }
.person-role { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Slider (convegni) ---------- */

.slider { position: relative; margin-top: 32px; background: var(--navy-900); border-radius: 3px; overflow: hidden; }
.slider-track { display: flex; transition: transform 0.4s ease; }

.slide {
  flex: 0 0 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 480px;
  background: var(--navy-900);
}

.slide img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(14,30,51,0.6);
  color: #fdfcf9;
  border: 1px solid rgba(255,255,255,0.25);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }
.slider-btn:hover { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }

.slider-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 14px 10px; background: var(--navy-900); }
.slider-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,0.3); padding: 0; cursor: pointer; }
.slider-dots button.active { background: var(--gold-500); }

/* ---------- Visualizzatore PDF (presentazione) ---------- */

.pdf-viewer { position: relative; margin-top: 32px; background: var(--navy-900); border-radius: 3px; overflow: hidden; }
.pdf-viewer:focus { outline: none; }
.pdf-stage { display: flex; align-items: center; justify-content: center; height: 620px; padding: 20px; }
.pdf-canvas { max-width: 100%; max-height: 100%; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.pdf-pager { text-align: center; padding: 12px 10px; background: var(--navy-900); color: #e7e2d4; font-size: 0.9rem; letter-spacing: 0.02em; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(14,30,51,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 40px;
}

.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fdfcf9;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fdfcf9;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
}

.lightbox-btn.prev { left: 20px; }
.lightbox-btn.next { right: 20px; }
.lightbox-btn:hover, .lightbox-close:hover { color: var(--gold-500); }

/* ---------- News ---------- */

.pdf-card {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  padding: 24px 28px;
  margin-top: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

.pdf-card:hover {
  transform: translateY(-2px);
  border-color: #c9a227;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.pdf-icon {
  width: 64px;
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f1e5;
  border: 1px solid #c9a227;
  position: relative;
}

.pdf-icon::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 18px 18px 0;
  border-color: transparent #c9a227 transparent transparent;
}

.pdf-icon span {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #8b6f12;
}

.pdf-info {
  flex: 1;
}

.pdf-info h3 {
  margin: 0;
  font-family: "Source Serif 4", serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.pdf-info p {
  margin: 6px 0 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.9rem;
  opacity: 0.65;
}

.pdf-arrow {
  font-size: 1.5rem;
  opacity: 0.5;
  transition: transform 0.25s ease;
}

.pdf-card:hover .pdf-arrow {
  transform: translateX(5px);
  opacity: 1;
}

/* ---------- Contact ---------- */

.contact { background: var(--navy-900); color: #fdfcf9; }
.contact h2 { color: #fdfcf9; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-list { list-style: none; margin: 24px 0 0; padding: 0; }

.contact-list li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.12); color: #e7e2d4; }
.contact-list li:first-child { border-top: none; }
.contact-list a { color: #fdfcf9; text-decoration: none; border-bottom: 1px solid rgba(201,162,39,0.5); }
.contact-list a:hover { border-color: var(--gold-500); }
.contact-list .k { color: var(--gold-100); font-size: 0.85rem; min-width: 84px; padding-top: 2px; }

.map-frame { border: 1px solid rgba(255,255,255,0.18); border-radius: 3px; overflow: hidden; filter: grayscale(0.15); }
.map-frame iframe { display: block; width: 100%; height: 320px; border: 0; }

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

.site-footer { background: var(--navy-900); border-top: 1px solid rgba(255,255,255,0.1); color: #b9bfc7; font-size: 0.9rem; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px; flex-wrap: wrap; gap: 10px; }
.site-footer a { color: #b9bfc7; text-decoration: none; }
.site-footer a:hover { color: var(--gold-100); }

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

@media (max-width: 860px) {
  .section-split { grid-template-columns: 1fr; gap: 14px; }
  .contact-grid { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr; }
  .hero .ring { width: 320px; height: 320px; right: -160px; }
  .slide { height: 360px; }
  .pdf-stage { height: 460px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .masthead nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--navy-900);
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 28px 22px;
    gap: 14px;
    display: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .masthead nav.open { display: flex; }
  .masthead nav a { margin-left: 0; }
  .values li { flex: 1 1 45%; border-left: none; padding-left: 0; margin-bottom: 10px; }
  section { padding: 56px 0; }
  .slide { height: 280px; }
  .pdf-stage { height: 360px; }
  .lightbox { padding: 20px; }
  .lightbox-btn { width: 40px; height: 40px; font-size: 1.3rem; }
}