@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  --blue-950: #00112E;
  --blue-900: #00205C;
  --blue-700: #002D7A;
  --blue-600: #003DA5;
  --blue-500: #1A56C4;
  --blue-400: #4A7FD4;
  --blue-100: #DDEAFC;
  --blue-50:  #EEF4FE;
  --white:    #FFFFFF;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-300: #D1D5DB;
  --gray-100: #F3F4F6;
  --shadow-sm: 0 1px 3px rgba(0,0,48,.08);
  --shadow-md: 0 4px 16px rgba(0,32,92,.1);
  --shadow-lg: 0 8px 32px rgba(0,32,92,.15);
  --radius:   10px;
  --transition: .2s ease;
}

/* ─── Skip Link ──────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--white);
  color: var(--blue-900);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 4px;
  border: 2px solid var(--blue-600);
  z-index: 9999;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 16px; }

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── Focus Visible (WCAG 2.1 AA) ───────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid #FFD700;
  outline-offset: 3px;
  border-radius: 3px;
}

/* ─── Utilities ──────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── Top Bar ────────────────────────────────────────────── */
.top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 0;
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.top-bar-logo {
  height: 60px;
  width: auto;
  flex-shrink: 0;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-bar-tagline {
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--gray-500);
  font-weight: 500;
}
.lang-switch {
  display: flex;
  gap: 6px;
}
.lang-btn {
  background: transparent;
  border: 1px solid var(--blue-400);
  color: var(--blue-600);
  padding: 3px 11px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  transition: var(--transition);
  font-family: inherit;
}
.lang-btn:hover,
.lang-btn.active {
  background: var(--blue-600);
  color: var(--white);
  border-color: var(--blue-600);
}

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--blue-900);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1160px;
  margin: 0 auto;
  gap: 20px;
}
.header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-name {
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
}
.brand-sub {
  color: rgba(255,255,255,.6);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ─── Nav ────────────────────────────────────────────────── */
nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav-link {
  color: rgba(255,255,255,.8);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}
.nav-link:hover { background: rgba(255,255,255,.12); color: var(--white); }
.nav-link.active { background: rgba(255,255,255,.18); color: var(--white); font-weight: 600; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 540px;
  overflow: hidden;
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(130deg, rgba(0,32,92,.88) 0%, rgba(0,61,165,.62) 55%, rgba(0,20,60,.35) 100%);
  display: flex; align-items: center;
}
.hero-content { max-width: 1160px; margin: 0 auto; padding: 0 24px; color: var(--white); }
.hero-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: rgba(255,255,255,.65);
  margin-bottom: 14px;
}
.hero-title {
  font-size: 42px; font-weight: 800; line-height: 1.12;
  margin-bottom: 18px; max-width: 680px;
}
.hero-subtitle {
  font-size: 17px; color: rgba(255,255,255,.82);
  max-width: 560px; margin-bottom: 28px; line-height: 1.55;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  color: rgba(255,255,255,.9);
  padding: 9px 20px; border-radius: 100px;
  font-size: 13px; font-weight: 500;
}
.hero-badge::before { content: '€'; font-weight: 800; }

/* ─── Page Header (inner pages) ─────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--blue-950) 0%, var(--blue-600) 100%);
  padding: 60px 0 48px;
  color: var(--white);
}
.page-header-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: rgba(255,255,255,.6);
  margin-bottom: 12px;
}
.page-header-title {
  font-size: 34px; font-weight: 800; max-width: 680px;
  line-height: 1.18; margin-bottom: 12px;
}
.page-header-subtitle {
  font-size: 16px; color: rgba(255,255,255,.78); max-width: 580px; line-height: 1.6;
}

/* ─── Sections ───────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-alt { background: var(--blue-50); }
.section-dark { background: var(--blue-900); color: var(--white); }

.section-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--blue-600);
  margin-bottom: 10px;
}
.section-dark .section-eyebrow { color: rgba(255,255,255,.55); }
.section-title {
  font-size: 30px; font-weight: 800; color: var(--blue-950);
  line-height: 1.2; margin-bottom: 12px;
}
.section-dark .section-title { color: var(--white); }
.section-subtitle {
  font-size: 16px; color: var(--gray-500); max-width: 620px; line-height: 1.6;
}
.section-dark .section-subtitle { color: rgba(255,255,255,.65); }
.section-header { margin-bottom: 48px; }

/* ─── Stats Bar ──────────────────────────────────────────── */
.stats-bar { background: var(--blue-600); padding: 44px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px; text-align: center;
}
.stat-value {
  display: block; font-size: 32px; font-weight: 800;
  color: var(--white); line-height: 1;
}
.stat-label {
  font-size: 12px; color: rgba(255,255,255,.7);
  text-transform: uppercase; letter-spacing: .1em;
  margin-top: 8px; display: block;
}

/* ─── Cards Grid ─────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 28px; border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 48px; height: 48px; background: var(--blue-100);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 22px;
  margin-bottom: 16px;
}
.card-title { font-size: 16px; font-weight: 700; color: var(--blue-950); margin-bottom: 8px; }
.card-text { font-size: 14px; color: var(--gray-700); line-height: 1.6; }

/* ─── Split Layout ───────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.split-img img { width: 100%; height: 300px; object-fit: cover; }
.split-text h3 { font-size: 22px; font-weight: 700; color: var(--blue-950); margin-bottom: 14px; }
.split-text p { font-size: 15px; color: var(--gray-700); line-height: 1.7; }
.split-text p + p { margin-top: 12px; }

/* ─── Location Cards ─────────────────────────────────────── */
.locations-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 48px; }
.loc-card {
  background: var(--white); border-radius: var(--radius);
  padding: 30px; border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--blue-600);
}
.loc-flag { font-size: 28px; margin-bottom: 10px; }
.loc-tag {
  display: inline-block; background: var(--blue-100);
  color: var(--blue-700); font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 100px; margin-bottom: 12px;
}
.loc-title { font-size: 17px; font-weight: 700; color: var(--blue-950); margin-bottom: 10px; }
.loc-text { font-size: 14px; color: var(--gray-700); line-height: 1.65; }

/* ─── Satellite Sites ────────────────────────────────────── */
.sites-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 40px; }
.site-chip {
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--radius); padding: 22px;
  text-align: center;
}
.site-pin { font-size: 24px; margin-bottom: 8px; }
.site-name { font-size: 14px; font-weight: 700; color: var(--blue-900); margin-bottom: 6px; }
.site-desc { font-size: 13px; color: var(--gray-500); line-height: 1.5; }

/* ─── Info Box ───────────────────────────────────────────── */
.info-box {
  background: var(--blue-50); border-left: 4px solid var(--blue-600);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px; margin: 32px 0;
}
.info-box-title { font-size: 15px; font-weight: 700; color: var(--blue-900); margin-bottom: 6px; }
.info-box-text { font-size: 14px; color: var(--gray-700); line-height: 1.65; }

/* ─── Gallery ────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery-item { border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img,
.gallery-item:focus-within img { transform: scale(1.06); }

/* ─── Research Cards ─────────────────────────────────────── */
.research-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 40px; }
.res-card {
  background: var(--white); border-radius: var(--radius);
  padding: 26px; border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm); display: flex; gap: 18px;
}
.res-card-icon {
  width: 44px; height: 44px; background: var(--blue-600);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 20px; flex-shrink: 0;
}
.res-card-title { font-size: 15px; font-weight: 700; color: var(--blue-950); margin-bottom: 6px; }
.res-card-text { font-size: 13px; color: var(--gray-700); line-height: 1.6; }

/* ─── DNSH Box ───────────────────────────────────────────── */
.dnsh-box {
  background: #F0FAF4; border: 1px solid #A3D9B1;
  border-radius: var(--radius); padding: 28px;
  display: flex; gap: 20px; align-items: flex-start;
}
.dnsh-icon { font-size: 32px; flex-shrink: 0; margin-top: 2px; }
.dnsh-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #2D7A47; margin-bottom: 4px; }
.dnsh-title { font-size: 17px; font-weight: 700; color: #1A4E2D; margin-bottom: 8px; }
.dnsh-text { font-size: 14px; color: #374151; line-height: 1.65; }

/* ─── Partner Cards ──────────────────────────────────────── */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.partner-card {
  background: var(--white); border-radius: var(--radius);
  padding: 28px; border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
}
.partner-role {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 11px; border-radius: 100px;
  margin-bottom: 14px; color: var(--white);
}
.role-lp  { background: var(--blue-950); }
.role-pp1 { background: var(--blue-600); }
.role-pp2 { background: #3B6FBE; }
.role-pp3 { background: #5C7FCC; }
.role-pp4 { background: #7B96D8; }

.partner-name { font-size: 16px; font-weight: 700; color: var(--blue-950); margin-bottom: 8px; line-height: 1.3; }
.partner-desc { font-size: 14px; color: var(--gray-700); line-height: 1.65; }

/* ─── Governance Box ─────────────────────────────────────── */
.governance-box {
  background: var(--blue-900); border-radius: var(--radius);
  padding: 36px; color: var(--white); margin-top: 48px;
}
.governance-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.governance-text { font-size: 15px; color: rgba(255,255,255,.8); line-height: 1.7; margin-bottom: 12px; }
.governance-note {
  font-size: 13px; color: rgba(255,255,255,.6);
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 14px; margin-top: 4px;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--blue-950);
  color: var(--white);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 44px;
}
.footer-col h4 {
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.72); margin-bottom: 18px;
}
.footer-col p, .footer-col a {
  font-size: 13.5px; color: rgba(255,255,255,.72);
  line-height: 1.75;
}
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-logo-row {
  display: flex; align-items: center; gap: 20px;
  padding: 24px 0; border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 22px;
}
.footer-logo-row img { height: 40px; width: auto; }
.footer-eu-notice {
  font-size: 11px; color: rgba(255,255,255,.7);
  line-height: 1.6; max-width: 800px; margin-bottom: 20px;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; color: rgba(255,255,255,.65);
  padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap; gap: 8px;
}

/* ─── Hamburger Button ───────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background var(--transition);
}
.hamburger:hover { background: rgba(255,255,255,.12); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Drawer Overlay ─────────────────────────────────────── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 300;
  opacity: 0;
  transition: opacity .3s ease;
}
.drawer-overlay.open { opacity: 1; }

/* ─── Drawer Panel ───────────────────────────────────────── */
.drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--blue-900);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 24px rgba(0,0,0,.3);
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.drawer-brand {
  color: var(--white);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .06em;
}
.drawer-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  line-height: 1;
  transition: var(--transition);
  font-family: inherit;
}
.drawer-close:hover { background: rgba(255,255,255,.12); color: var(--white); }

#nav-drawer {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  flex: 1;
}
.drawer-link {
  color: rgba(255,255,255,.82);
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  border-left: 3px solid transparent;
}
.drawer-link:hover { background: rgba(255,255,255,.1); color: var(--white); }
.drawer-link.active {
  background: rgba(255,255,255,.12);
  color: var(--white);
  font-weight: 700;
  border-left-color: var(--white);
}

.drawer-lang {
  display: flex;
  gap: 8px;
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
}
/* Lang buttons nel drawer: stile su sfondo scuro */
.drawer-lang .lang-btn {
  border-color: rgba(255,255,255,.4);
  color: rgba(255,255,255,.8);
}
.drawer-lang .lang-btn:hover,
.drawer-lang .lang-btn.active {
  background: var(--white);
  color: var(--blue-900);
  border-color: var(--white);
}

/* body lock when drawer open */
body.drawer-open { overflow: hidden; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .hamburger   { display: flex; }

  /* Top bar mobile: nascondi tagline, logo più piccolo */
  .top-bar-tagline { display: none; }
  .top-bar-logo    { height: 60px; }
  .top-bar         { padding: 8px 0; }

  /* Brand mobile: SKI-LAND 2 · ITAT-46-021 inline */
  .brand-text  { flex-direction: row; align-items: baseline; gap: 6px; }
  .brand-name  { font-size: 16px; }
  .brand-sub   { font-size: 10px; letter-spacing: .08em; opacity: .75; }
  .hero { height: auto; min-height: 420px; }
  .hero-overlay { align-items: flex-start; padding: 48px 0 40px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 14px; margin-bottom: 20px; }
  .hero-eyebrow { font-size: 10px; margin-bottom: 10px; }
  .hero-badge { font-size: 12px; padding: 8px 14px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .locations-grid { grid-template-columns: 1fr; }
  .sites-grid { grid-template-columns: 1fr 1fr; }
  .research-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 26px; }
  .page-header-title { font-size: 28px; }
}

@media (max-width: 540px) {
  .hero { min-height: 360px; }
  .hero-title { font-size: 22px; }
  .top-bar-tagline { display: none; }
  .brand-name { font-size: 17px; }
  .cards-grid { grid-template-columns: 1fr; }
  .sites-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .partners-grid { grid-template-columns: 1fr; }
}
