:root {
  color-scheme: dark;
  --bg: #07131e;
  --surface: #0f1f33;
  --surface-strong: #162c43;
  --surface-muted: rgba(255, 255, 255, 0.07);
  --text: #f3f7fb;
  --text-muted: #b8c5d8;
  --accent: #7da9ff;
  --accent-strong: #e6f2ff;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at top right, rgba(125, 163, 255, 0.16), transparent 35%),
    linear-gradient(180deg, #08141f 0%, #0a1a27 100%);
}

body {
  margin: 0;
  min-height: 100%;
  background: transparent;
  color: var(--text);
}

/* ── Mesh Gradient Background ─────────────────────────────── */
.mesh-gradient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
  transform: translate(-50%, -50%);
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .mesh-blob { animation: none !important; }
}


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

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

button {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 14, 24, 0.38);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 1px 0 rgba(0, 0, 0, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.25rem;
}

.brand {
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-nav a,
.footer-nav a {
  color: var(--text-muted);
  transition: color 180ms ease;
}

.site-nav a:hover,
.footer-nav a:hover {
  color: var(--accent);
}

.mobile-menu-toggle {
  display: none;
  border: none;
  background: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 3rem;
}

.hero::before {
  content: none;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04) translateY(var(--hero-parallax-y, 0px));
  z-index: 0;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 19, 30, 0.6);
  z-index: 0;
}

.hero .container,
.hero-grid {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr);
  gap: 3rem;
  align-items: center;
}

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

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
}

.hero-copy p {
  max-width: 42rem;
  margin: 1.5rem 0 2rem;
  color: rgba(243, 247, 251, 0.88);
  line-height: 1.85;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.75rem;
  border-radius: 999px;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, #6b96ff, #95c7ff);
  color: #07131e;
  box-shadow: 0 18px 40px rgba(109, 144, 255, 0.4);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-media {
  position: relative;
  padding: 1.5rem;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  will-change: transform, filter;
}

.hero-media img {
  width: 100%;
  border-radius: 24px;
}

.hero-location {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.hero-location p {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-weight: 700;
}

.hero-location strong {
  display: block;
  color: var(--text);
  line-height: 1.5;
}

.section {
  padding: 4rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.82rem;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 1.05;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

.pet-card {
  padding: 1.6rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.pet-card h3 {
  margin: 1.15rem 0 0.75rem;
  font-size: 1.3rem;
}

.pet-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.9;
}

.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
}

.section-split.reverse {
  direction: rtl;
}

.section-split.reverse > * {
  direction: ltr;
}

.text-block h2 {
  margin: 0 0 1rem;
  font-size: 2rem;
}

.text-block p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.9;
}

.media-card {
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.media-card.small {
  max-width: 520px;
}

.media-card img {
  width: 100%;
  height: auto;
}

.certs-block {
  padding: 2rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cinematic-video-section {
  padding: 4rem 0;
  background: transparent;
}

.video-wrapper {
  position: relative;
  width: 100%;
  min-height: 420px;
  border-radius: 32px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

.cine-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .video-wrapper {
    height: 45vh;
    min-height: 280px;
    max-height: 420px;
  }

  .cine-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 19, 30, 0.36);
  pointer-events: none;
}

.video-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 140px;
  pointer-events: none;
}

/* === Feature blocks: modern, alternating layouts for Chi Siamo / Esperienza / Allevamento === */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "media content";
  gap: 2.5rem;
  align-items: center;
  margin: 4.5rem 0; /* più respiro tra le sezioni */
}

.feature-media {
  grid-area: media;
}

.feature-media img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  display: block;
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.04);
}

.feature-content {
  grid-area: content;
}

.feature-content h2 {
  margin: 0 0 1rem 0;
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--text);
}

.feature-content p {
  color: var(--text-muted);
  line-height: 1.85;
  margin: 0 0 1rem 0;
  font-size: 1.05rem;
}

/* Specific layouts */
.feature-chi { grid-template-columns: 46% 54%; grid-template-areas: "media content"; }
.feature-experience { grid-template-columns: 54% 46%; grid-template-areas: "content media"; }
.feature-allevamento { grid-template-columns: 50% 50%; grid-template-areas: "media content"; }

/* Emphasize images: larger max heights */
.feature-chi .feature-media img { max-height: 420px; }
.feature-experience .feature-media img { max-height: 360px; }
.feature-allevamento .feature-media img { max-height: 480px; }

/* Certs block refinement */
.certs-block {
  margin-top: 2.5rem;
}

/* Responsive behavior */
@media (max-width: 1100px) {
  .feature { gap: 2rem; }
  .feature-chi .feature-media img { max-height: 360px; }
  .feature-allevamento .feature-media img { max-height: 420px; }
}

@media (max-width: 768px) {
  .feature {
    grid-template-columns: 1fr;
    grid-template-areas: "media" "content";
    margin: 2.5rem 0;
  }
  .feature-media img { width: 88%; margin: 0 auto 1rem auto; }
  .feature-content h2 { text-align: left; }
  .feature-content p { font-size: 1rem; }
}

/* === Lightbox styles === */
.section img { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 260ms step-start;
  z-index: 9999;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox img.lightbox-img,
.lightbox video.lightbox-video {
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 96px);
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  transform: scale(0.96);
  transition: transform 300ms cubic-bezier(.2,.9,.3,1), opacity 240ms ease;
}
.lightbox.open img.lightbox-img,
.lightbox.open video.lightbox-video {
  transform: scale(1);
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10010;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 26px;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.lightbox-close:focus { outline: 2px solid var(--accent); }

/* When open, prevent body scroll */
body.lightbox-open { overflow: hidden; }

@media (max-width: 480px) {
  .lightbox img.lightbox-img, .lightbox video.lightbox-video {
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 64px);
    border-radius: 8px;
  }
  .lightbox-close { width: 40px; height: 40px; top: 12px; right: 12px; }
}


.video-fade.top-fade {
  top: 0;
  background: linear-gradient(180deg, rgba(7, 19, 30, 0.95), transparent);
}

.video-fade.bottom-fade {
  bottom: 0;
  background: linear-gradient(0deg, rgba(7, 19, 30, 0.95), transparent);
}

.certs-block ul {
  margin: 1rem 0 0;
  padding-left: 1.3rem;
  color: var(--text-muted);
  line-height: 1.85;
}

.certs-block li {
  margin-bottom: 0.9rem;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}

.site-footer h2,
.site-footer .footer-brand {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.section-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 1.05;
}

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

.site-footer p {
  margin: 0.4rem 0;
  color: var(--text-muted);
}

.footer-nav {
  display: grid;
  gap: 0.85rem;
  align-items: start;
}

  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
  }

  .gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

/* Gallery page background */
.gallery-page {
  background-image:
    linear-gradient(rgba(7, 19, 30, 0.72), rgba(8, 20, 31, 0.72)),
    url('images/Collage.png');
  background-size: auto, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll, fixed;
}

@media (max-width: 860px) {
  .gallery-page {
    background-attachment: scroll, scroll;
  }
}

  .contact-section {
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
  }

  .contact-section::before {
    content: none;
  }

  .contact-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(7, 19, 30, 0.62);
    z-index: 1;
  }

  .contact-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
  }

  .contact-content {
    position: relative;
    z-index: 2;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .contact-section .section-header {
    margin-bottom: 3rem;
  }

  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 3rem;
    align-items: flex-start;
  }

  .contact-stack {
    display: grid;
    gap: 2rem;
  }

  .contact-card,
  .contact-form,
  .map-card {
    padding: 2.5rem;
    border-radius: 28px;
    background: rgba(10, 19, 31, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  }

  .contact-card h2,
  .contact-card h3,
  .map-card h2,
  .map-card h3 {
    margin-top: 0;
    color: var(--text);
    font-size: 1.15rem;
  }

  .contact-card p {
    margin: 0.85rem 0;
    color: rgba(255, 255, 255, 0.78);
  }

  .contact-form {
    display: grid;
    gap: 1.25rem;
  }

  .contact-form label {
    display: grid;
    gap: 0.65rem;
    color: var(--text);
    font-size: 0.95rem;
  }

  .contact-form input,
  .contact-form textarea {
    width: 100%;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    outline: none;
    font: inherit;
  }

  .contact-form input::placeholder,
  .contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.55);
  }

  .contact-form textarea {
    min-height: 12rem;
    resize: vertical;
  }

  .map-frame {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .map-frame iframe {
    width: 100%;
    min-height: 300px;
    border: 0;
    display: block;
  }

  .certs-list {
    margin: 1.25rem 0 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
    line-height: 1.9;
  }

  @media (max-width: 860px) {
    .hero-grid,
    .section-split,
    .footer-inner,
    .card-grid,
    .contact-grid {
      grid-template-columns: 1fr;
    }

    .section-split.reverse {
      direction: ltr;
    }

    .card-grid,
    .contact-stack {
      gap: 1.25rem;
    }

    .contact-section {
      min-height: auto;
      padding: 3.5rem 0;
    }

    .contact-grid {
      gap: 1.5rem;
    }

    .contact-card,
    .contact-form,
    .map-card {
      padding: 1.75rem;
    }
  }

  @media (max-width: 640px) {
    .header-inner {
      flex-wrap: wrap;
    }

    .site-nav {
      display: none;
      width: 100%;
      flex-direction: column;
      gap: 1rem;
      margin-top: 1rem;
    }

    .site-nav.open {
      display: flex;
    }

    .mobile-menu-toggle {
      display: inline-flex;
    }

    .hero {
      padding-top: 2.5rem;
    }

    .hero-copy h1 {
      font-size: clamp(2.5rem, 12vw, 4.3rem);
    }

    .button {
      width: 100%;
    }

    .hero-media,
    .pet-card,
    .media-card,
    .certs-block {
      border-radius: 24px;
    }
  }

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

  .site-nav.open {
    display: flex;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 12vw, 4.3rem);
  }

  .button {
    width: 100%;
  }

  .hero-media,
  .pet-card,
  .media-card,
  .certs-block {
    border-radius: 24px;
  }
}

/* Chi Siamo split — photo stretches to match text height */
.chi-siamo-split {
  align-items: stretch;
}

.chi-siamo-split .media-card {
  display: flex;
}

/* Author photo (Luigi) */
.author-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  cursor: pointer;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.author-photo:hover {
  transform: scale(1.04);
}

/* ==============================================
   HERO ENTRANCE ANIMATIONS
   ============================================== */

@keyframes heroFadeUp {
  from { opacity: 0; translate: 0 32px; }
  to   { opacity: 1; translate: 0 0; }
}

@keyframes heroSlideIn {
  from { opacity: 0; translate: 56px 0; }
  to   { opacity: 1; translate: 0 0; }
}

.eyebrow {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 60ms;
}

.hero-copy h1 {
  animation: heroFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 160ms;
}

.hero-copy p {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 280ms;
}

.hero-actions {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 380ms;
}

.hero-media {
  animation: heroSlideIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 180ms;
}

/* ==============================================
   SCROLL REVEAL
   ============================================== */

[data-reveal] {
  opacity: 0;
  translate: 0 32px;
  transition:
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    translate 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

.pet-card[data-reveal] {
  transition:
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    translate 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 260ms ease,
    box-shadow 260ms ease;
}

.media-card[data-reveal] {
  transition:
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    translate 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms ease;
}

/* ==============================================
   HOVER EFFECTS
   ============================================== */

.pet-card {
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 260ms ease,
    box-shadow 260ms ease;
}

.pet-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(125, 169, 255, 0.38);
  box-shadow: 0 28px 64px rgba(109, 144, 255, 0.22), inset 0 0 0 1px rgba(125, 169, 255, 0.12);
}

.media-card {
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease;
}

.media-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 48px 100px rgba(0, 0, 0, 0.48);
}

.button.primary:hover {
  box-shadow: 0 26px 60px rgba(109, 144, 255, 0.65);
  transform: translateY(-3px);
}

.button.secondary:hover {
  border-color: rgba(125, 169, 255, 0.55);
  background: rgba(125, 169, 255, 0.1);
  transform: translateY(-2px);
}

/* Nav underline slide */
.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 220ms ease;
}

.site-nav a:hover::after {
  width: 100%;
}

/* Header scroll shadow */
.site-header {
  transition: background 400ms ease, box-shadow 400ms ease;
}

.site-header.scrolled {
  background: rgba(7, 14, 24, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 12px 48px rgba(0, 0, 0, 0.38),
    0 1px 0 rgba(125, 169, 255, 0.06);
}

/* ==============================================
   GALLERY PAGE
   ============================================== */

.gallery-grid img {
  cursor: pointer;
  position: relative;
  transition:
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 280ms ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
  z-index: 2;
}

.gallery-grid img[data-reveal] {
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    translate 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 280ms ease;
}

/* Gallery videos */
.gallery-grid video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: block;
  cursor: pointer;
  position: relative;
}

.gallery-grid video[data-reveal] {
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    translate 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 280ms ease;
}

.gallery-grid video:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
  z-index: 2;
}

/* ==============================================
   LIGHTBOX
   ============================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 320ms ease,
    background 320ms ease,
    backdrop-filter 320ms ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
  background: rgba(4, 10, 20, 0.92);
  backdrop-filter: blur(14px);
}

.lightbox-img {
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 48px 120px rgba(0, 0, 0, 0.65);
  transform: scale(0.86);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox.open .lightbox-img {
  transform: scale(1);
}

.lightbox-video {
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 48px 120px rgba(0, 0, 0, 0.65);
  transform: scale(0.86);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  display: none;
}

.lightbox.open .lightbox-video {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: background 200ms ease, transform 200ms ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.12);
}
