/* Fonts (Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500&family=Space+Mono:wght@400;700&display=swap');

/* Reset base */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
}

body { margin: 0; padding: 0; }
body { color: #fff; }

body {
  background: #000;
  user-select: none;
  -webkit-user-select: none;
}

a,
button,
img {
  -webkit-tap-highlight-color: transparent;
}

a,
button,
img {
  -webkit-tap-highlight-color: transparent;
}

/* Container */
.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

section {
  scroll-margin-top: 60px;
}

/* HERO */
.hero {
  --hero-deco-size: clamp(60px, 20vw, 100px);
  --hero-deco-height: calc(var(--hero-deco-size) * 0.2099567);
  --hero-squares-width: calc(var(--hero-deco-size) * 0.711039);
  --hero-arrow-width: calc(var(--hero-deco-size) * 0.378692);
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;   /* centro verticale */
  justify-content: center; /* centro orizzontale */
  text-align: center;
  background-color: #000;
  background-image: url("../images/BACKGROUND.jpg?v=2");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__title {
  font-family: "Space Mono", monospace;
  letter-spacing: 0.2em;
  font-size: clamp(38px, 5vw, 68px);
  margin: 0 0 12px 0;
  line-height: 1.1;
  white-space: nowrap;
  transform: translateY(-30px);
}

@media (max-width: 768px) {
  .hero__title {
    font-size: clamp(35px, 9vw, 69px);
    letter-spacing: 0.1em;
  }
}

.hero__subtitle {
  font-family: "Rubik", system-ui, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: clamp(14px, 1.4vw, 25px);
  margin: 0;
  opacity: 1;
  line-height: 1.1;
  white-space: nowrap;
  transform: translateY(-30px);
}

@media (max-width: 768px) {
  .hero__subtitle {
    font-size: clamp(12.8px, 1.4vw, 25px);
    letter-spacing: 0.1em;
  }
}





/* NAVBAR overlay */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;

  padding: 24px 0;

  transition: background 0.2s ease, backdrop-filter 0.2s ease;
  
  overflow: visible;
}

@media (max-width: 768px) {

  .nav.nav--open::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 320px;

    border-bottom: 1px solid rgba(255,255,255,0.18);

    z-index: -1;
  }

}

/* contenitore interno */

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* link */

.nav__links {
  display: flex;
  gap: 28px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav__links a {
  font-family: "Space Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;

  transition: color 0.15s ease;
}

.nav__links a:hover {
  color: #ffbc58;
}

.nav__icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav__icons img {
  width: 20px;
  height: 20px;
  object-fit: contain;

  transition: opacity 0.15s ease;
}

.nav__icons a:hover img {
  opacity: 0.7;
}

/* nav glass allo scroll */

.nav.scrolled {
  background: rgba(0,0,0,0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

@media (max-width: 768px) {
  .nav__links {
    gap: 12px;
  }

  .nav__icons {
    gap: 10px;
  }

  .nav__links a {
    font-size: 16px;
  }

  .nav__icons img {
    width: 16px;
    height: 16px;
  }

}




/* brand mobile */

.nav__brand {
  display: block;
  font-family: "Space Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav__brand:hover {
  color: #ffbc58;
}

/* hamburger */

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 22px;
  padding: 0;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: white;
  margin-bottom: 6px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__toggle span:last-child {
  margin-bottom: 0;
}

/* menu mobile */

.nav__mobile-menu {
  display: none;
}

.nav__mobile-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin-top: 10px;
}

.nav__mobile-icons img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  transition: opacity 0.15s ease;
}

.nav__mobile-icons a:hover img {
  opacity: 0.7;
}

/* MOBILE */

@media (max-width: 768px) {
  .cards {
    margin-bottom: 0;
  }

  .nav__brand {
    display: block;
  }

  .nav__links,
  .nav__icons {
    display: none;
  }

  .nav__toggle {
    display: block;
  }

  .nav__mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding-top: 24px;
    padding-bottom: 24px;
    text-align: center;

    background: rgba(0, 0, 0, 0.90);
    border-top: 1px solid rgba(255, 255, 255, 0.24);
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: max-height 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
  }

  .nav__mobile-menu a {
    font-family: "Space Mono", monospace;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.15s ease;
  }

  .nav__mobile-work {
    width: 100%;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.24);
  }

  .nav__mobile-work-toggle {
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-family: "Space Mono", monospace;
    font-size: 16px;
    font-weight: 700;
    display: block;
    text-align: center;
    position: relative;
    cursor: pointer;
  }

  .nav__mobile-work-toggle > span:first-child {
    display: inline-block;
  }

  .nav__mobile-work-arrow {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    position: absolute;
    top: 50%;
    left: calc(50% + 28px);
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.2s ease;
  }

  .nav__mobile-submenu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 0;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.15s ease, opacity 0.15s ease, transform 0.15s ease, margin-top 0.15s ease;
  }

  .nav__mobile-submenu a {
    font-size: 14px;
    letter-spacing: 0.04em;
    border: none;
    padding: 0;
  }

.nav__mobile-menu > a {
  display: block;
  width: 100%;
  font-family: "Space Mono", monospace;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.15s ease;

  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.24);
}


.nav__mobile-icons a {
  border-bottom: none;
  padding-bottom: 0;
}

  .nav__mobile-menu a:hover {
    color: #ffbc58;
  }

  .nav__mobile-work-toggle:hover {
    color: #ffbc58;
  }

  .nav--open .nav__mobile-menu {
    max-height: 420px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav--open.nav--work-open .nav__mobile-menu {
    max-height: 560px;
  }

  .nav--work-open .nav__mobile-submenu {
    max-height: 180px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 16px;
    pointer-events: auto;
  }

  .nav--work-open .nav__mobile-work-arrow {
    transform: translateY(-50%) rotate(225deg);
  }
}

/* animazione hamburger â†’ X */

.nav--open .nav__toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav--open .nav__toggle span:nth-child(2) {
  opacity: 0;
}

.nav--open .nav__toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}






/* Section spacing */
.work {
  padding: 90px 0;
  background-color: #000;
  position: relative;
  overflow: hidden;
  z-index: 3;
}

@media (max-width: 768px) {
  .work {
    padding: 60px 0 120px;
  }
}

.work > * {
  position: relative;
  z-index: 1;
}

/* Section heading */
.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-family: "Space Mono", monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: clamp(22px, 2vw, 26px);
  margin: 0 0 40px 0;
  opacity: 1;
  white-space: nowrap;

  padding: 6px 12px;
  display: inline-block;
  position: relative;          /* necessario per ::before */
}


@media (max-width: 768px) {
  .section-title {
    font-size: clamp(20px, 2vw, 26px);
    letter-spacing: 0.1em;
  }
}


/* bordo tratteggiato controllabile, 4 lati garantiti */
.section-title::before{
  content: "";
  position: absolute;
  inset: 0;                    /* copre esattamente il box */
  pointer-events: none;
  border-radius: 0px;          /* opzionale */

  /* spessore bordo */
  --b: 2px;

  /* controllo pieni/vuoti */
  --dash: 12px;                /* tratto pieno */
  --gap: 4px;                  /* vuoto */

  background:
    /* TOP */
    repeating-linear-gradient(
      to right,
      #a9a9a9 0 var(--dash),
      transparent var(--dash) calc(var(--dash) + var(--gap))
    ) top / calc(var(--dash) + var(--gap)) var(--b) repeat-x,

    /* BOTTOM */
    repeating-linear-gradient(
      to right,
      #a9a9a9 0 var(--dash),
      transparent var(--dash) calc(var(--dash) + var(--gap))
    ) bottom / calc(var(--dash) + var(--gap)) var(--b) repeat-x,

    /* LEFT */
    repeating-linear-gradient(
      to bottom,
      #a9a9a9 0 var(--dash),
      transparent var(--dash) calc(var(--dash) + var(--gap))
    ) left / var(--b) calc(var(--dash) + var(--gap)) repeat-y,

    /* RIGHT */
    repeating-linear-gradient(
      to bottom,
      #a9a9a9 0 var(--dash),
      transparent var(--dash) calc(var(--dash) + var(--gap))
    ) right / var(--b) calc(var(--dash) + var(--gap)) repeat-y;
}

.section-subtitle {
  font-family: "Rubik", system-ui, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: clamp(14px, 2vw, 16px);
  margin: 0;
  opacity: 1;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .section-subtitle {
    font-size: clamp(12.8px, 2vw, 16px);
    letter-spacing: 0.1em;
  }
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: stretch;
  margin-bottom: 60px;
}

.card {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
}

.card__img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.card:hover .card__img {
  transform: scale(1.04);
}

.card:hover .card__label {
  transform: translateY(-6px);
}

.card__label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 22px;

  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(4px);
  
  transition: transform 0.25s ease;
}

.contact-anchor {
  position: absolute;
  top: 105%;
  left: 50%;

  width: 1px;
  height: 1px;

  transform: translateX(-50%);

  pointer-events: none;
}

@media (max-width: 1024px) {
  .card__label {
    font-size: 2vw;
  }
}

@media (max-width: 850px) {
  .card__label {
    font-size: 22px;
  }
}

@media (max-width: 600px) {
  .card__label {
    font-size: 22px;
  }
}

/* Mobile layout */
@media (max-width: 850px) {
  .cards {
    grid-template-columns: 1fr;
    margin-bottom: 0;
  }
}

.about {
  padding: 90px 0;
  text-align: center;

  background-color: #000;
  background-image: url("../images/about-bg-blue-cmp.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* foto */

.about-photo {
  width: 100%;
  height: 480px;
  overflow: hidden;
  margin-top: 0px;
  border-radius: 18px;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 768px) {
  .about-photo {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .about-photo img {
    
  }
}

/* bio */

.about-bio {
  max-width: 800px;
  margin: 0 auto;
  margin-top: 30px;
}

.about-bio p {
  font-family: "Rubik", sans-serif;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.6;
  margin-top: 80px;
}

@media (max-width: 768px) {
  .about-bio p {
    font-size: clamp(12.8px, 1.2vw, 18px);
    letter-spacing: 0;
  }
}

/* clients */

.clients {
  margin-top: 60px;
}

.clients-title {
  font-family: "Space Mono", monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: clamp(18px, 1.6vw, 22px);
  margin-bottom: 80px;
  white-space: nowrap;
}

.clients img {
  max-width: 80%;
  width: 100%;
  opacity: 1;
}

@media (max-width: 850px) {
  .clients img {
    max-width: 100%;
  }
}

.contact {
  padding: 120px 0;
  text-align: center;

  background-color: #000;
  background-image: linear-gradient(rgba(0,0,0,0.20), rgba(0,0,0,0.20)),
    url("../images/contact-bg-blue-cmp.jpg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.contact-text {
  max-width: 600px;
  margin: 30px auto;
}

.contact-text p {
  font-family: "Rubik", sans-serif;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .contact-text p {
    font-size: clamp(12.8px, 1.2vw, 18px);
    letter-spacing: 0;
  }
}

.email-btn {
  display: inline-block;
  position: relative;
  margin-top: 80px;

  font-family: "Space Mono", monospace;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(16px, 1.2vw, 22px);

  padding: 14px 28px;

  color: black;
  text-decoration: none;
  background-color: white;
  border-radius: 4px;
  border: 2px solid white;

  transition: all 0.1s ease;
}

.email-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -20px;
  transform: translateX(-50%);

  width: 26px;
  height: 13.86px;
  background: white;

  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.email-btn:hover {
  background: rgba(255,255,255,0.1);
  color: white;
  backdrop-filter: blur(6px);
}

@media (max-width: 768px) {
  .email-btn {
    padding: 8px 12px;
  }
}

.footer {
  background: black;
  border-top: 1px solid rgba(255,255,255,0.18);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__text {
  font-family: "Rubik", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  color: white;
}

.footer__icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer__icons img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transition: opacity 0.15s ease;
}

.footer__icons a:hover img {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .footer__inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
  }

  .footer__icons {
    order: 1;
  }

  .footer__text {
    order: 2;
    font-size: 12px;
  }
}



@media (hover: none) and (pointer: coarse) {
  .nav__brand:hover,
  .nav__brand:active,
  .nav__brand:focus,
  .nav__brand:focus-visible,
  .nav__links a:hover,
  .nav__links a:active,
  .nav__links a:focus,
  .nav__links a:focus-visible,
  .nav__mobile-menu a:hover,
  .nav__mobile-menu a:active,
  .nav__mobile-menu a:focus,
  .nav__mobile-menu a:focus-visible {
    color: #ffffff;
  }

  .nav__mobile-work-toggle:hover,
  .nav__mobile-work-toggle:active,
  .nav__mobile-work-toggle:focus,
  .nav__mobile-work-toggle:focus-visible {
    color: #ffffff;
  }

  .explore-more__links a:hover,
  .explore-more__links a:active,
  .explore-more__links a:focus,
  .explore-more__links a:focus-visible {
    color: #ffffff;
  }

  .nav__icons a:hover img,
  .nav__icons a:active img,
  .nav__icons a:focus img,
  .nav__icons a:focus-visible img,
  .nav__mobile-icons a:hover img,
  .nav__mobile-icons a:active img,
  .nav__mobile-icons a:focus img,
  .nav__mobile-icons a:focus-visible img {
    opacity: 1;
  }
}



@media (max-width: 768px) {

  .nav__links a:hover,
  .nav__mobile-menu a:hover,
  .nav__mobile-work-toggle:hover,
  .nav__brand:hover,
  .explore-more__links a:hover {
    color: #ffffff !important;
  }

}



.hero {
  position: relative;
  overflow: hidden;
}

.hero-ill-wrap {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  z-index: 1;
  pointer-events: none;
}

.hero-illustration {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% - var(--hero-deco-height) - 100px);
  width: var(--hero-squares-width);
  height: var(--hero-deco-height);
  object-fit: contain;
}

.hero-scroll-link {
  position: absolute;
  right: 0;
  top: calc(100% - var(--hero-deco-height) - 100px);
  width: var(--hero-arrow-width);
  height: var(--hero-deco-height);
  display: block;
  pointer-events: auto;
}

.hero-scroll-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero .container:last-of-type {
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .hero > .container:last-of-type {
    transform: translateY(-20px);
  }
}

/* =========================
   3D ART PAGE
========================= */

.gallery-page {
  background: #000;
  padding-top: 140px;
  padding-bottom: 90px;
  --gallery-section-gap: 100px;
}

.gallery-page__title {
  font-family: "Space Mono", monospace;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 12px 0;
}


.gallery-page__subtitle {
  font-family: "Rubik", sans-serif;
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.5;
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--gallery-section-gap) auto;
}

/* gallery */

.art-gallery {
  --gallery-gap: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--gallery-gap);
}

.art-gallery__row {
  display: flex;
  width: 100%;
  gap: var(--gallery-gap);
  align-items: flex-start;
}

.art-gallery__item {
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
  text-decoration: none;
}

.art-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.animations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.animations-grid__item {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  overflow: hidden;
  position: relative;
}

.animations-grid__item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.anim-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.02));
}

.anim-controls__play {
  border: none;
  background: none;
  color: #fff;
  font-family: "Space Mono", monospace;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 2px 0;
  min-width: 24px;
  -webkit-tap-highlight-color: transparent;
}

.anim-controls__time {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  justify-self: end;
}

.anim-controls__bar {
  grid-column: 1 / -1;
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.anim-controls__buffered,
.anim-controls__progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  border-radius: inherit;
}

.anim-controls__buffered {
  background: rgba(255, 255, 255, 0.45);
}

.anim-controls__progress {
  background: #ffffff;
}

.anim-controls__loading {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  justify-self: start;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.anim-controls.is-loading .anim-controls__loading {
  opacity: 1;
}

.anim-controls--lightbox {
  padding: 10px 10px 8px;
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  padding: 24px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__viewport {
  width: min(1200px, 100%);
  height: min(90vh, 900px);
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  cursor: grab;
}

.lightbox__viewport.is-dragging {
  cursor: grabbing;
}

.lightbox__track {
  height: 100%;
  display: flex;
  transition: transform 0.35s ease;
}

.lightbox__slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__media {
  position: relative;
  height: min(90vh, 900px);
  aspect-ratio: 9 / 16;
  width: auto;
  max-width: min(100%, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.lightbox__slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  -webkit-tap-highlight-color: transparent;
}


.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 56px;
  height: 56px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: none) and (pointer: coarse) {
  .animations-grid__item:focus,
  .animations-grid__item:focus-visible,
  .animations-grid__item video:focus,
  .animations-grid__item video:focus-visible,
  .anim-controls__play:focus,
  .anim-controls__play:focus-visible,
  .anim-controls__bar:focus,
  .anim-controls__bar:focus-visible,
  .lightbox__slide video:focus,
  .lightbox__slide video:focus-visible,
  .lightbox__arrow:focus,
  .lightbox__arrow:focus-visible {
    outline: none;
  }
}

.lightbox__arrow--prev {
  left: calc((100vw - min(1200px, 100vw)) / 2 + 20px);
}

.lightbox__arrow--next {
  right: calc((100vw - min(1200px, 100vw)) / 2 + 20px);
}

.lightbox__arrow.is-disabled {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .lightbox {
    padding: 12px;
  }

  .lightbox__viewport {
    height: min(82vh, 700px);
  }

  .lightbox__arrow {
    width: 44px;
    height: 44px;
    font-size: 34px;
  }


  .lightbox__arrow--prev {
    left: 4px;
  }

  .lightbox__arrow--next {
    right: 4px;
  }
}

/* nasconde gli elementi sorgente originali:
   il JS li legge e poi costruisce le righe */
.art-gallery__source {
  display: none;
}

.explore-more {
  --explore-separator-space: 96px;
  --explore-content-offset: 88px;
  position: relative;
  margin-top: var(--explore-separator-space);
  padding-top: var(--explore-content-offset);
  text-align: center;
}

.explore-more::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  border-top: 1px solid rgba(255,255,255,0.18);
}

.explore-more__title {
  margin: 0 0 20px 0;
  font-family: "Space Mono", monospace;
  font-size: clamp(16px, 1.6vw, 20px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 12px;
  display: inline-block;
  position: relative;
}

.explore-more__title::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  --b: 2px;
  --dash: 12px;
  --gap: 4px;

  background:
    repeating-linear-gradient(
      to right,
      #a9a9a9 0 var(--dash),
      transparent var(--dash) calc(var(--dash) + var(--gap))
    ) top / calc(var(--dash) + var(--gap)) var(--b) repeat-x,
    repeating-linear-gradient(
      to right,
      #a9a9a9 0 var(--dash),
      transparent var(--dash) calc(var(--dash) + var(--gap))
    ) bottom / calc(var(--dash) + var(--gap)) var(--b) repeat-x,
    repeating-linear-gradient(
      to bottom,
      #a9a9a9 0 var(--dash),
      transparent var(--dash) calc(var(--dash) + var(--gap))
    ) left / var(--b) calc(var(--dash) + var(--gap)) repeat-y,
    repeating-linear-gradient(
      to bottom,
      #a9a9a9 0 var(--dash),
      transparent var(--dash) calc(var(--dash) + var(--gap))
    ) right / var(--b) calc(var(--dash) + var(--gap)) repeat-y;
}

.explore-more__links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 34px;
}

.explore-more__links a {
  font-family: "Space Mono", monospace;
  font-size: clamp(17px, 1.7vw, 22px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.15s ease;
}

.explore-more__links a:hover {
  color: #ffbc58;
}

@media (max-width: 768px) {
  .gallery-page {
    padding-top: 120px;
    padding-bottom: 80px;
    --gallery-section-gap: 70px;
  }

  .gallery-page__title {
    font-size: clamp(22px, 5.2vw, 28px);
    letter-spacing: 0;
    margin-bottom: 10px;
  }

  .gallery-page__subtitle {
    font-size: 13px;
    margin-bottom: var(--gallery-section-gap);
  }

  .art-gallery {
    --gallery-gap: 12px;
  }

  .animations-grid {
    gap: 12px;
  }

  .explore-more {
    --explore-separator-space: 68px;
    --explore-content-offset: 62px;
    margin-top: var(--explore-separator-space);
    padding-top: var(--explore-content-offset);
    width: calc(100% - 10px);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .explore-more__links {
    gap: 28px;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .animations-grid {
    grid-template-columns: 1fr;
  }
}


