/* ==========================================================================
   Museo Digitale di Arena — Sito di presentazione lavorazioni
   3K Studio
   ========================================================================== */

:root {
  --blue-dark: #0d3a56;
  --blue: #14567f;
  --blue-light: #1c7ab0;
  --amber: #f2a71b;
  --amber-dark: #d68f0c;
  --ink: #1c2530;
  --gray-700: #4a5560;
  --gray-500: #7c8894;
  --gray-200: #e4e8ec;
  --gray-100: #f3f5f7;
  --white: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(13, 58, 86, 0.08);
  --shadow-md: 0 10px 30px rgba(13, 58, 86, 0.12);
  --shadow-lg: 0 20px 60px rgba(13, 58, 86, 0.25);
  --maxw: 1180px;
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------------------------- Header ---------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  height: 34px;
  width: auto;
}

.brand-divider {
  width: 1px;
  height: 26px;
  background: var(--gray-200);
}

.brand-project {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--blue-dark);
  text-transform: uppercase;
}

.brand-project span {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: none;
  letter-spacing: 0.01em;
}

nav.main-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

nav.main-nav a {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--blue-dark);
  letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

nav.main-nav a:hover {
  background: var(--gray-100);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--blue-dark);
  position: relative;
  transition: 0.2s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
}

.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

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

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(13, 58, 86, 0.95) 0%, rgba(13, 58, 86, 0.82) 40%, rgba(13, 58, 86, 0.25) 100%),
    url("../immagini/bgr.webp") center 40% / cover no-repeat;
  color: var(--white);
  padding: 120px 0 0;
}

.hero-copy {
  max-width: 620px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
}

.hero-eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--amber);
}

.hero h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.12;
  margin: 0 0 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero p.lead {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 46ch;
  margin: 0 0 30px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 110px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
  background: var(--amber);
  color: var(--blue-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(242, 167, 27, 0.35);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  border-color: var(--blue);
  color: var(--blue);
  background: transparent;
}

.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}

.hero-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(13, 58, 86, 0.6);
  backdrop-filter: blur(6px);
  padding: 26px 0;
}

.hero-stats .container {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-stats .stat b {
  display: block;
  font-size: 22px;
  color: var(--amber);
}

.hero-stats .stat span {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.02em;
}

/* ---------------------------- Section shell ---------------------------- */

section.area {
  padding: 88px 0;
  border-bottom: 1px solid var(--gray-200);
}

section.area:nth-of-type(even) {
  background: var(--gray-100);
}

.area-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.area-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-dark);
  margin: 0 0 10px;
}

.area-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-weight: 700;
}

.area-head p {
  max-width: 62ch;
  color: var(--gray-700);
  margin: 0;
  font-size: 16px;
}

.area-number {
  font-size: 52px;
  font-weight: 800;
  color: var(--gray-200);
  line-height: 1;
}

/* ---------------------------- Work item ---------------------------- */

.work {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--gray-200);
  align-items: start;
}

.work:first-of-type { border-top: none; }

.work-body { order: -1; }

.work-body h3 {
  font-size: 20px;
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 700;
}

.work-body h3 .tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--blue);
  color: var(--white);
  padding: 3px 9px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 10px;
  position: relative;
  top: -2px;
}

.work-body p {
  color: var(--gray-700);
  font-size: 15.5px;
  margin: 0 0 18px;
}

.work-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.work-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--blue-dark);
  color: var(--white);
  transition: background 0.18s ease, transform 0.18s ease;
}

.work-links a:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
}

.work-links a::after {
  content: "↗";
  font-size: 12px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.gallery.gallery-1 { grid-template-columns: 1fr; }
.gallery.gallery-2 { grid-template-columns: repeat(2, 1fr); }

.gallery figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  background: var(--gray-200);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4 / 3;
}

.gallery.gallery-1 figure { aspect-ratio: 16 / 9; }

.gallery.gallery-feature figure:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.gallery.gallery-portrait {
  grid-template-columns: repeat(4, 1fr);
}

.gallery.gallery-portrait figure {
  aspect-ratio: 3 / 4;
}

.gallery.gallery-portrait figure img {
  object-position: center 20%;
}

.gallery.gallery-contain figure {
  aspect-ratio: 4 / 3;
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.gallery.gallery-contain figure img {
  object-fit: contain;
  padding: 16px;
}

.gallery.gallery-contain figure:hover img {
  transform: scale(1.03);
}

.gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery figure:hover img {
  transform: scale(1.06);
}

.gallery figure .zoom-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(13, 58, 86, 0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery figure:hover .zoom-hint { opacity: 1; }

.work-media {
  display: grid;
  gap: 12px;
}

.gallery.gallery-top figure img {
  object-position: center top;
}

.gallery.gallery-tall {
  grid-template-columns: repeat(3, 1fr);
}

.gallery.gallery-tall figure {
  aspect-ratio: 4 / 7;
}

.gallery figure img.pos-top {
  object-position: center 25%;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------------------- Intro blurb per subsection group ------- */

.subhead {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 6px;
}

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

footer.site-footer {
  background: var(--blue-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 30px;
}

footer .footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 24px;
}

footer .brand img {
  height: 30px;
  filter: brightness(0) invert(1);
}

footer .footer-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

footer .footer-links a {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.2s ease, color 0.2s ease;
}

footer .footer-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

footer .footer-note {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
}

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

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 30, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 40px;
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 84vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  position: absolute;
  bottom: 26px;
  left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 600;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

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

@media (max-width: 980px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(13, 58, 86, 0.78) 0%, rgba(13, 58, 86, 0.9) 100%),
      url("../immagini/bgr.webp") 70% center / cover no-repeat;
  }
  .work { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  nav.main-nav {
    position: fixed;
    top: 78px;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 10px 20px 20px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
  }
  nav.main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  nav.main-nav a { padding: 12px 10px; border-bottom: 1px solid var(--gray-100); border-radius: 0; }
  .nav-toggle { display: block; }
  .brand-project { display: none; }
  .hero-stats .container { gap: 28px; }
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; }
}

@media (max-width: 560px) {
  .gallery.gallery-portrait { grid-template-columns: repeat(2, 1fr); }
  .area { padding: 60px 0; }
  .hero { padding-top: 78px; }
  .hero-actions { margin-bottom: 64px; }
}
