/* ═══════════════════════════════════════════════════
   Pantera Special Vehicles — PNRR Landing Page
   style.css
   ═══════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ─────────────────────────────────── */
:root {
  --eu-blue:        #003399;
  --eu-yellow:      #FFCC00;
  --pantera-blue:   #203c7f;
  --ink:            #0c1f3d;
  --navy:           #0f2d5c;
  --mid-blue:       #1a4a8a;
  --accent:         #1d5cb4;
  --white:          #ffffff;
  --off-white:      #f5f7fb;
  --border:         #d1ddf0;
  --border-strong:  #a3b8dc;
  --text:           #1a2e4a;
  --muted:          #5a7099;
  --band-h:         76px;
  --max-w:          960px;
  --r:              10px;
}

/* ── RESET & BASE ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--eu-yellow);
  outline-offset: 3px;
}

/* ── SKIP LINK ──────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--eu-blue); color: var(--white);
  padding: 8px 16px;
  border-radius: 0 0 var(--r) var(--r);
  font-size: 14px; font-weight: 600;
  z-index: 9999; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── LAYOUT ─────────────────────────────────────────── */
.container {
  width: 100%; max-width: var(--max-w);
  margin-inline: auto; padding-inline: 32px;
}

/* ── BANDA DEI LOGHI ────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  border-bottom: 3px solid var(--eu-blue);
  box-shadow: 0 2px 20px rgba(0,51,153,.08);
}
.logo-band {
  height: var(--band-h);
  display: flex; align-items: center; gap: 28px;
}
.logo-eu-wrap { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.eu-flag { width: 56px; height: 38px; flex-shrink: 0; border: 1px solid #dde8f8; }
.band-div { width: 1px; height: 38px; background: var(--border); flex-shrink: 0; }
.logo-fb { display: flex; align-items: center; flex-shrink: 0; }
.band-spacer { flex: 1; }
.pantera-logo-wrap { display: flex; align-items: center; flex-shrink: 0; }
.pantera-logo-wrap img { height: 25px; width: auto; display: block; }

/* ── HERO ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--ink) 0%, var(--navy) 55%, var(--mid-blue) 100%);
  color: var(--white);
  padding: 72px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 90% 40%, rgba(37,99,235,.22) 0%, transparent 65%),
    radial-gradient(ellipse 35% 50% at 5% 100%, rgba(255,204,0,.05) 0%, transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 300px;
  gap: 56px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.cup-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,204,0,.12); border: 1px solid rgba(255,204,0,.3);
  border-radius: 5px; padding: 5px 13px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--eu-yellow); width: fit-content;
}
.cup-tag::before {
  content: ''; display: block;
  width: 6px; height: 6px;
  background: var(--eu-yellow); border-radius: 50%;
}
.hero h1 {
  font-size: clamp(26px, 3.8vw, 44px);
  font-weight: 800; line-height: 1.12;
  letter-spacing: -.02em; color: var(--white);
}
.hero h1 em { font-style: normal; color: var(--eu-yellow); }
.hero-lead {
  font-family: 'Lora', serif;
  font-size: 15px; color: rgba(255,255,255,.72);
  line-height: 1.7; max-width: 520px;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.meta-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 7px; padding: 10px 16px;
  display: flex; flex-direction: column; gap: 3px;
}
.meta-label {
  font-size: 9px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.42);
}
.meta-card strong { font-size: 13px; font-weight: 700; color: var(--white); }

/* ── LIGHTBOX LOCANDINA ─────────────────────────────── */
.poster-trigger {
  display: block;
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  transform: rotate(.8deg);
  transition: transform .4s ease;
  cursor: zoom-in;
  text-decoration: none;
}
.poster-trigger:hover { transform: rotate(0deg) scale(1.02); }
.poster-trigger img { width: 100%; display: block; }
.poster-caption {
  background: var(--navy); color: rgba(255,255,255,.45);
  font-size: 11px; padding: 8px 14px; text-align: center;
  font-family: sans-serif;
}
.img-placeholder {
  background: rgba(255,255,255,.06); border: 2px dashed rgba(255,255,255,.2);
  border-radius: var(--r); min-height: 340px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: rgba(255,255,255,.32);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: .04em; text-align: center; padding: 24px;
}

/* lightbox overlay */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92);
  align-items: center; justify-content: center;
  cursor: zoom-out;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  object-fit: contain;
}
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  color: rgba(255,255,255,.7); font-size: 32px; line-height: 1;
  background: none; border: none; cursor: pointer;
  transition: color .2s;
}
.lightbox-close:hover { color: var(--white); }

/* ── SEZIONI ────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-alt { background: var(--off-white); }
.section-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.section h2 {
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 700; color: var(--ink);
  line-height: 1.2; letter-spacing: -.02em; margin-bottom: 20px;
}
.prose {
  font-family: 'Lora', serif;
  font-size: 16.5px; color: var(--text);
  line-height: 1.78; max-width: 680px;
}
.prose + .prose { margin-top: 16px; }

/* ── OBIETTIVO BOX ──────────────────────────────────── */
.highlight-box {
  background: var(--eu-blue); color: var(--white);
  border-radius: var(--r); padding: 40px 44px;
  position: relative; overflow: hidden;
}
.highlight-box::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  border: 40px solid rgba(255,255,255,.06); pointer-events: none;
}
.highlight-box .eyebrow { color: var(--eu-yellow); margin-bottom: 10px; }
.highlight-box h2 { color: var(--white); margin-bottom: 16px; font-size: clamp(20px,2.6vw,28px); }
.highlight-box p {
  font-family: 'Lora', serif;
  font-size: 18px; font-style: italic;
  color: rgba(255,255,255,.88); line-height: 1.6; max-width: 680px;
}

/* ── CARDS ──────────────────────────────────────────── */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px; margin-top: 40px;
}
.info-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 32px 28px 28px;
  position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.info-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--eu-blue), var(--accent));
}
.info-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,51,153,.1); }
.card-num { font-size: 40px; font-weight: 800; color: var(--border); line-height: 1; margin-bottom: 16px; }
.info-card h3 {
  font-size: 13px; font-weight: 700; color: var(--eu-blue);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px;
}
.info-card p { font-family: 'Lora', serif; font-size: 14.5px; color: var(--muted); line-height: 1.68; }

/* ── GALLERY ────────────────────────────────────────── */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; margin-top: 32px;
}
.gallery-item {
  border-radius: 8px; overflow: hidden;
  background: var(--white); border: 1px solid var(--border);
}
.gallery-item a { display: block; cursor: zoom-in; }
.gallery-item img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.gallery-item a:hover img { transform: scale(1.03); }
.gallery-item figcaption {
  padding: 10px 14px; font-size: 12px;
  color: var(--muted); font-style: italic;
  border-top: 1px solid var(--border);
}
.gallery-ph {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e8eefd 0%, #d4e3f8 100%);
  border-radius: 8px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; color: var(--muted);
  font-size: 11.5px; font-weight: 500; letter-spacing: .04em; text-align: center;
  border: 2px dashed var(--border-strong);
}
.gallery-ph svg { opacity: .5; }

/* ── FINANCE BOX ────────────────────────────────────── */
.funding-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; margin-top: 32px;
}
.funding-head {
  background: var(--eu-blue); padding: 20px 32px;
  display: flex; align-items: center; gap: 12px; color: var(--white);
}
.funding-head h3 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.funding-dl { padding: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.funding-dl dt { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.funding-dl dd { font-size: 15px; font-weight: 600; color: var(--ink); }
.funding-dl dd.amount { font-size: 28px; font-weight: 800; color: var(--eu-blue); }
.cup-strip {
  margin: 0 32px 32px; background: var(--off-white);
  border: 1px solid var(--border); border-radius: 7px; padding: 14px 20px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
}
.cup-b { background: var(--eu-blue); color: var(--white); font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 4px; letter-spacing: .1em; flex-shrink: 0; }
.cup-strip span { font-size: 13.5px; color: var(--text); font-weight: 500; }

/* ── LINK CARDS ─────────────────────────────────────── */
.links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.link-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px 20px;
  text-decoration: none; color: var(--text);
  font-size: 14px; font-weight: 500;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.link-card:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(0,51,153,.08); transform: translateX(3px); }
.link-card svg { flex-shrink: 0; color: var(--accent); }
.link-card span { flex: 1; }
.lc-arrow { color: var(--border-strong); transition: color .2s; }
.link-card:hover .lc-arrow { color: var(--accent); }

/* ── FOOTER ─────────────────────────────────────────── */
.site-footer {
  background: var(--ink); border-top: 4px solid var(--eu-blue); padding: 48px 0 32px;
}
.footer-info { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.fb-title { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 8px; }
.fb-block p { font-size: 13.5px; color: rgba(255,255,255,.82); line-height: 1.65; }
.fb-block a { color: rgba(255,255,255,.82); text-decoration: none; }
.fb-block a:hover { color: var(--white); text-decoration: underline; }
.footer-band-wrap { border-top: 1px solid rgba(255,255,255,.1); padding-top: 32px; }
.footer-lband { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.f-eu { display: flex; align-items: center; flex-shrink: 0; }
.f-div { width: 1px; height: 28px; background: rgba(255,255,255,.15); flex-shrink: 0; }

.f-spacer { flex: 1; }
.f-pantera-logo img { height: 20px; width: auto; display: block; }
.footer-meta {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: 11px; color: rgba(255,255,255,.28); line-height: 1.6;
}
.footer-meta a { color: rgba(255,255,255,.55); text-decoration: none; }
.footer-meta a:hover { color: rgba(255,255,255,.6); }

/* ── ANIMAZIONI (progressive enhancement) ───────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { /* visibile di default */ }
.fade-up.js-ready { opacity: 0; }
.fade-up.visible  { animation: fadeUp .55s cubic-bezier(.22,.68,0,1.2) both; }
.stagger > * { /* visibili di default */ }
.stagger.js-ready > * { opacity: 0; }
.stagger.visible > *:nth-child(1) { animation: fadeUp .5s .05s cubic-bezier(.22,.68,0,1.2) both; }
.stagger.visible > *:nth-child(2) { animation: fadeUp .5s .15s cubic-bezier(.22,.68,0,1.2) both; }
.stagger.visible > *:nth-child(3) { animation: fadeUp .5s .25s cubic-bezier(.22,.68,0,1.2) both; }
.hero-copy > * { animation: heroIn .65s cubic-bezier(.22,.68,0,1.2) both; }
.hero-copy > *:nth-child(1) { animation-delay: .1s; }
.hero-copy > *:nth-child(2) { animation-delay: .2s; }
.hero-copy > *:nth-child(3) { animation-delay: .3s; }
.hero-copy > *:nth-child(4) { animation-delay: .4s; }
.hero-copy > *:nth-child(5) { animation-delay: .5s; }
.hero-poster { animation: heroIn .65s .35s cubic-bezier(.22,.68,0,1.2) both; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-poster { order: -1; }
}
@media (max-width: 700px) {
  :root { --band-h: auto; }
  .logo-band { min-height: 60px; flex-wrap: wrap; padding-block: 10px; gap: 14px; }
  .band-spacer { display: none; }
  .eu-text span, .logo-fb-t span { display: none; }
  .highlight-box { padding: 28px 24px; }
  .funding-head  { padding: 16px 20px; }
  .funding-dl    { padding: 24px 20px; }
  .cup-strip     { margin: 0 20px 20px; }
}
@media (max-width: 640px) { .container { padding-inline: 20px; } }
@media (max-width: 600px) {
  .funding-dl    { grid-template-columns: 1fr; }
  .footer-info   { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .links-grid { grid-template-columns: 1fr; } }
