:root {
  --bg: #ffffff;
  --fg: #1d1d1d;
  --accent: #f5dd5f;
  --border: #1d1d1d;
  --header-h: 92px;
}

body.dark-mode {
  --bg: #1d1d1b;
  --fg: #e9e9e9;
  --border: #e9e9e9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Montserrat", Arial, sans-serif;
  padding-top: var(--header-h);
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

body.no-scroll {
  overflow: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

/* HEADER */

.site-header {
  min-height: var(--header-h);
  background: var(--fg);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.logo {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.6rem);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.main-nav a:hover,
.footer-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.theme-toggle {
  width: 34px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  position: relative;
}

.theme-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
  transition: left 0.25s ease;
}

body.dark-mode .theme-toggle::after {
  left: 23px;
}

.burger {
  display: none;
  width: 34px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
}

.burger span {
  height: 2px;
  width: 100%;
  background: currentColor;
}

/* =====================================================
  ICONOS RRSS FIJOS LATERALES
====================================================== */

.fixed-socials {
  position: fixed;
  top: 22vh;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fixed-socials a {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  transition: transform 0.2s ease,
              background 0.2s ease,
              color 0.2s ease;
}

.fixed-socials img {
  width: 22px;
  height: 22px;
  transition: filter 0.3s ease;
}

/* MODO OSCURO */

body.dark-mode .fixed-socials img {
  filter: invert(1);
}

.fixed-socials a:hover {
  transform: translateX(3px);
  background: var(--fg);
  color: var(--bg);
}

/* RESPONSIVE */

@media (max-width: 900px) {

  .fixed-socials {
    top: auto;
    bottom: 1rem;
    left: 1rem;
    flex-direction: row;
  }

}

/* GALERÍA */

.gallery-page {
  padding: clamp(35px, 5vw, 60px) 4.5vw 70px;
}

.gallery-hero,
.gallery-ending {
  margin-bottom: 50px;
}

.gallery-hero h1,
.gallery-hero h2,
.gallery-ending h1 {
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
  font-size: clamp(2rem, 4.5vw, 4.8rem);
}

.gallery-hero h1 span {
  display: inline-block;
  margin-left: 8%;
}

.gallery-hero h2 {
  margin-top: 55px;
  text-align: right;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: clamp(150px, 15vw, 230px);
  gap: 14px;
}

.gallery-item {
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  appearance: none;
}

.media-wrap {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--fg);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.08);
}

.item-1 { grid-column: 1 / 2; grid-row: 1 / 3; }
.item-2 { grid-column: 2 / 3; grid-row: 2 / 4; }
.item-3 { grid-column: 3 / 4; grid-row: 2 / 4; }
.item-4 { grid-column: 4 / 5; grid-row: 1 / 3; }
.item-5 { grid-column: 5 / 6; grid-row: 1 / 3; }
.item-6 { grid-column: 5 / 6; grid-row: 3 / 5; }
.item-7 { grid-column: 1 / 2; grid-row: 4 / 6; }
.item-8 { grid-column: 2 / 3; grid-row: 4 / 6; }
.item-9 { grid-column: 4 / 5; grid-row: 4 / 6; }
.item-10 { grid-column: 1 / 2; grid-row: 6 / 8; }
.item-11 { grid-column: 3 / 4; grid-row: 6 / 8; }
.item-12 { grid-column: 4 / 6; grid-row: 6 / 8; }

.gallery-ending {
  margin-top: clamp(80px, 12vw, 140px);
  text-align: center;
}

/* LIGHTBOX */

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  z-index: 999;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: auto;
  height: auto;

  max-width: 92vw;
  max-height: 88vh;

  opacity: 0;
  transform: scale(0.96) translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.lightbox.active .lightbox-content {
  opacity: 1;
  transform: scale(1) translateY(0);
}

#lightboxMedia {
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightboxMedia img,
#lightboxMedia video {
  display: block;

  max-width: 92vw;
  max-height: 88vh;

  width: auto;
  height: auto;

  object-fit: contain;

  border-radius: 10px;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;

  z-index: 1000;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.65);
  color: white;

  border-radius: 50%;

  font-size: 18px;
  font-weight: 800;

  backdrop-filter: blur(8px);

  transition: transform 0.2s ease,
              background 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.08);
  background: rgba(0, 0, 0, 0.85);
}

.lightbox-error {
  color: white;
  text-align: center;
  font-weight: 700;
}

/* ANIMACIONES */

.reveal {
  opacity: 0;
  transform: translateY(70px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* FOOTER */

.site-footer {
  position: relative;
  min-height: 720px;
  background: var(--accent);
  color: #1d1d1b;
  padding: clamp(1.5rem, 3vw, 3rem);
  overflow: hidden;
}

.footer-bg-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.28;
  pointer-events: none;
}

.footer-cookies-button {
  position: absolute;
  top: clamp(1.5rem, 3vw, 3rem);
  right: clamp(1.5rem, 3vw, 3rem);
  width: 54px;
  height: 54px;
  z-index: 2;
}

.footer-cookies-button img {
  width: 100%;
  height: 100%;
}

.footer-phrase {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
  font-size: clamp(1.9rem, 3.2vw, 4rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.footer-nav {
  position: absolute;
  z-index: 2;
  left: clamp(1.5rem, 3vw, 3rem);
  top: 28%;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: clamp(1rem, 1.35vw, 1.55rem);
  text-transform: uppercase;
}

.footer-contact {
  position: absolute;
  z-index: 3;
  left: clamp(1.5rem, 3vw, 3rem);
  right: clamp(1.5rem, 3vw, 3rem);
  top: 47%;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  font-size: clamp(1.25rem, 2vw, 2.35rem);
  font-weight: 900;
}

.footer-legal {
  position: absolute;
  z-index: 3;
  left: clamp(1.5rem, 3vw, 3rem);
  right: clamp(1.5rem, 3vw, 3rem);
  top: 61%;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  font-size: clamp(0.9rem, 1.15vw, 1.35rem);
}

.footer-mega-brand {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: -0.08em;
  width: 100%;
  font-size: clamp(4rem, 11vw, 13rem);
  font-weight: 900;
  line-height: 0.72;
  letter-spacing: -0.075em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* RESPONSIVE */

@media (max-width: 1000px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
  }

  .gallery-item {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .gallery-item:nth-child(3n + 1) {
    grid-row: span 2 !important;
  }

  .gallery-item:nth-child(5n) {
    grid-column: span 2 !important;
  }
}

@media (max-width: 900px) {

  :root {
    --header-h: 82px;
  }

  .site-header {
    padding: 1.3rem 1.4rem;
  }

  .burger {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--fg);
    color: var(--bg);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 1.4rem 1.4rem;
    display: none;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a,
  .main-nav .theme-toggle {
    padding: 1rem 0;
    border-top: 1px solid currentColor;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
    gap: 10px;
  }

  .gallery-item,
  .gallery-item:nth-child(3n + 1),
  .gallery-item:nth-child(5n) {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .gallery-item:nth-child(4n) {
    grid-column: span 2 !important;
  }

  .gallery-hero h2 {
    text-align: left;
  }

  .footer-contact,
  .footer-legal {
    flex-direction: column;
  }

  .footer-contact {
    top: 46%;
  }

  .footer-legal {
    top: 64%;
  }

  .footer-mega-brand {
    font-size: clamp(3.8rem, 18vw, 7rem);
    white-space: normal;
    line-height: 0.85;
  }
}

@media (max-width: 500px) {

  :root {
    --header-h: 74px;
  }

  .gallery-page {
    padding: 35px 5vw 60px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }

  .gallery-item:nth-child(4n) {
    grid-column: auto !important;
  }

  .gallery-hero h1,
  .gallery-hero h2,
  .gallery-ending h1 {
    font-size: clamp(2rem, 9vw, 3.2rem);
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-close {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .site-header,
  .site-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer-phrase {
    font-size: clamp(1.6rem, 9vw, 2.8rem);
  }
}