/* Wing Blindate – foglio di stile unico del sito statico */

:root {
  --bg-top: #000;
  --bg-bottom: #868489;
  --panel-gray: #afadae;
  --panel-edge: #e5e5e5;
  --panel-dark: #4d4747;
  --menu-bg: #e7e7e7;
  --menu-border: #8d8d8d;
  --text: #000;
  --text-on-dark: #e0dcdc;
  --muted-on-dark: #c4bebe;
  --radius: 10px;
  --wrap: 898px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-bottom) linear-gradient(180deg, #000 0, #090909 100px, #262628 300px, #555356 600px, var(--bg-bottom) 1100px) no-repeat;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }
a:hover { text-decoration: none; }
:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #000; }

h1, h2 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 30px; }
h2 { font-size: 18px; }
p { margin: 0 0 .8em; }

.sr-only, .hero-item span, .flag span {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: #fff; color: #000; padding: 8px 14px; border-radius: 4px; font-weight: bold;
}
.skip:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 0 32px;
}

/* ---------------------------------------------------------------- header */

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 112px;
}
.logo img { width: 225px; }

.langs { display: flex; gap: 4px; padding: 8px 0 0; }
.flag {
  display: block; width: 25px; height: 21px; position: relative;
  background: url(../img/bandiere.png) no-repeat;
  /* area di tocco più ampia del disegno della bandiera */
  outline-offset: 2px;
}
.flag::after { content: ""; position: absolute; inset: -10px -2px; }
.flag-it { background-position: 0 -21px; }
.flag-en { background-position: -25px -21px; }
.flag-fr { background-position: -50px -21px; }
.flag-es { background-position: -75px -21px; }
.flag-it:hover, .flag-it.is-active { background-position: 0 0; }
.flag-en:hover, .flag-en.is-active { background-position: -25px 0; }
.flag-fr:hover, .flag-fr.is-active { background-position: -50px 0; }
.flag-es:hover, .flag-es.is-active { background-position: -75px 0; }

/* ---------------------------------------------------------- hero (linee) */

.hero {
  display: flex;
  height: 376px;
  margin-bottom: 5px;
  overflow: hidden;
  background: #000;
}
.hero-item {
  flex: 1 1 0;
  min-width: 0;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: cover;
  transition: flex-grow .3s ease-out, filter .3s ease-out;
}
.hero:hover .hero-item, .hero:focus-within .hero-item { filter: brightness(.75); }
.hero .hero-item:hover, .hero .hero-item:focus-visible { flex-grow: 1.6; filter: none; }
.hero-item:focus-visible { outline-offset: -4px; box-shadow: none; }

/* ------------------------------------------------------------------ menu */

.menu {
  background: linear-gradient(#ebebeb, var(--menu-bg) 40%, #e8e8e8);
  border: 1px solid var(--menu-border);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.menu li { border-right: 1px solid #666; }
.menu a {
  display: block;
  padding: 9px 14px;
  min-height: 38px;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  color: #000;
  transition: color .15s, background-color .15s;
}
.menu a:hover { background: #d6d6d6; }
.menu a[aria-current="page"] { color: #666; }

/* --------------------------------------------------------------- pannelli */

.panel { padding: 20px; }
.panel-gray {
  background: var(--panel-gray);
  border-left: 1px solid var(--panel-edge);
  border-right: 1px solid var(--panel-edge);
}
main > .panel-gray:last-child,
main > .panel-gray:has(+ .lightbox) {
  border-bottom: 1px solid var(--panel-edge);
  border-radius: 0 0 var(--radius) var(--radius);
}
.panel-dark { background: var(--panel-dark); color: var(--text-on-dark); }
.panel-dark h2 { color: var(--text-on-dark); text-transform: uppercase; }

/* home */
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.intro-text { margin: 0; }
.certs { list-style: none; margin: 0; padding: 0; }
.certs li { margin: 0 0 .6em; }
.certs li:last-child { margin: 0; }

.panel-gray.intro { border-bottom: 1px solid var(--panel-edge); border-radius: 0 0 var(--radius) var(--radius); }
.innov {
  display: grid; grid-template-columns: 1fr 200px; gap: 24px; align-items: center;
  margin-top: -1px;
}

/* pagine linea */
.line h1 { position: absolute; left: -9999px; }
.tech { margin: 0 auto 20px; width: 330px; max-width: 100%; }
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}
.gallery a { display: block; border: 1px solid #ddd; background: #ddd; overflow: hidden; }
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .3s ease-out, opacity .3s;
}
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.04); }

/* lightbox solo CSS (:target) */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 50;
  align-items: center; justify-content: center;
  padding: 56px 64px;
}
.lightbox:target { display: flex; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .9); }
.lightbox figure { position: relative; margin: 0; max-width: 100%; max-height: 100%; }
.lightbox figure img {
  max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; margin: 0 auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .6);
}
.lightbox figcaption { color: #ccc; text-align: center; padding-top: 8px; font-size: 14px; }
.lb-btn {
  position: absolute; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, .15); color: #fff; text-decoration: none;
  font-size: 34px; line-height: 1;
  transition: background-color .15s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .3); }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 8px; top: 8px; font-size: 30px; }

/* contatti */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact h2 { font-size: 16px; }
.btn {
  display: inline-block; padding: 10px 18px; min-height: 44px;
  background: var(--panel-dark); color: #fff; font-weight: bold; text-decoration: none;
  border-radius: 4px; transition: background-color .15s;
}
.btn:hover { background: #000; }

/* ---------------------------------------------------------------- footer */

.footer {
  margin-top: 0;
  background: var(--panel-dark);
  color: var(--muted-on-dark);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 24px 30px 20px;
  font-size: 13px;
}
.footer-info img { margin-bottom: 10px; }
.footer a { color: #fff; }
.footer .legal { margin: 0; }

/* in home il pannello scuro prosegue nel footer, separato da una linea come nell'originale */
.wrap:has(.innov) .footer { position: relative; }
.wrap:has(.innov) .footer::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 2px; background: #666; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 920px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .header { min-height: 0; align-items: center; padding: 8px 0; }
  .logo img { width: 150px; }
  .langs { padding: 0; gap: 10px; }
  .hero { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
  .hero-item { height: 220px; }
  .hero:hover .hero-item, .hero:focus-within .hero-item { filter: none; }
  .menu ul { flex-direction: column; }
  .menu li { border-right: 0; border-bottom: 1px solid #bbb; }
  .menu a { padding: 12px 16px; min-height: 44px; }
  .intro, .innov, .contact-grid { grid-template-columns: 1fr; }
  .innov img { margin: 0 auto; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .lightbox { padding: 56px 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
  .footer { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
