/* ============================================
   VOLCANO SHIBARI — Dark Cinematic
   ============================================ */

/* --- Custom Properties --- */
:root {
  --black: #000000;
  --off-black: #0a0a0a;
  --teal: #2d7b7b;
  --teal-glow: #3d9b9b;
  --amber: #c87533;
  --amber-glow: #d4944a;
  --rope: #b8956a;
  --cream: #f0e6da;
  --white: #ffffff;
  --white-muted: rgba(255, 255, 255, 0.6);
  --white-faint: rgba(255, 255, 255, 0.12);

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Libre Caslon Text', 'Georgia', serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

/* --- Grain Overlay --- */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* --- Scroll Reveal --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] { transition-delay: 0.15s; }
[data-reveal-delay="2"] { transition-delay: 0.3s; }
[data-reveal-delay="3"] { transition-delay: 0.45s; }
[data-reveal-delay="4"] { transition-delay: 0.6s; }

/* --- Keyframe Animations --- */
@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes heroImageReveal {
  0% { opacity: 0; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1.05); }
}

@keyframes lineExpand {
  0% { transform: scaleX(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scaleX(1); opacity: 1; }
}

/* --- Page Entrance — Cinematic Curtain --- */
.page-home::after {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 10001;
  pointer-events: none;
  animation: fadeOut 1.5s ease-out both;
}

.page-galeria::after,
.page-contacto::after {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 10001;
  pointer-events: none;
  animation: fadeOut 0.8s ease-out both;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem 5rem;
  transition: background 0.5s ease, backdrop-filter 0.5s ease;
  animation: fadeIn 1s var(--ease) 0.2s both;
}

.page-home .nav {
  animation-delay: 1.2s;
}

.nav.scrolled {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  padding: 0.4rem 0;
}

.nav-logo span {
  color: var(--teal);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-muted);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--teal);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--white); }
.nav-links a.active::after { width: 100%; }

/* Mobile menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--cream);
  margin: 6px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 2.5rem 0;
}

.divider-line {
  width: 60px;
  height: 1px;
  background: var(--white-faint);
}

.divider-diamond {
  width: 6px;
  height: 6px;
  background: var(--amber);
  transform: rotate(45deg);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--black);
  padding: 2rem 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--white-faint);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.05em;
}

.footer-socials {
  display: flex;
  gap: 1.2rem;
}

.footer-socials a {
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.3s ease;
}

.footer-socials a:hover {
  color: var(--white);
}

.footer-socials svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============================================
   FOCUS STYLES
   ============================================ */
:focus-visible {
  outline: 2px solid var(--teal-glow);
  outline-offset: 3px;
}

/* ============================================
   SHARED HERO PATTERN
   All heroes use the same structure:
   hero-bg > hero-bg-img + hero-vignette
   hero-text > eyebrow (optional) + title
   ============================================ */
@keyframes heroZoom {
  0% { transform: scale(1.05); }
  100% { transform: scale(1.15); }
}

/* ============================================
   INDEX — HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  background:
    url('../hero_desktop.JPG') center/cover no-repeat;
  filter: grayscale(30%);
  animation: heroImageReveal 2s var(--ease) both, heroZoom 20s ease-in-out 2s infinite alternate;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.85) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 30%, transparent 60%, rgba(0,0,0,0.5) 100%);
}

.hero-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 6rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
  animation: fadeInDown 1.2s var(--ease) 0.5s both;
  text-shadow: 0 0 80px rgba(45, 123, 123, 0.1);
}

.hero-sub {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  animation: fadeInUp 1s var(--ease) 0.9s both;
}

.hero-text::after {
  content: '';
  display: block;
  height: 1px;
  width: 80px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  margin: 1.8rem auto 0;
  transform-origin: center;
  animation: lineExpand 1.2s var(--ease) 1.3s both;
}

/* ============================================
   INDEX — ABOUT (EDITORIAL SPLIT)
   ============================================ */
.about-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 100vh;
}

.about-image {
  position: relative;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%) contrast(1.05);
  transition: filter 0.8s ease;
}

.about-image:hover img {
  filter: grayscale(0%) contrast(1.1);
}

.about-text {
  background: var(--off-black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem;
}

.about-eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--teal-glow);
  margin-bottom: 1.5rem;
}

.section-label {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  font-weight: 300;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.about-body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.95;
  color: rgba(255,255,255,0.65);
  max-width: 380px;
  margin-bottom: 3rem;
}

.about-divider {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: rgba(255,255,255,0.5);
  transition: all 0.35s var(--ease);
}

.social-link:hover {
  border-color: var(--teal);
  color: var(--teal-glow);
  background: rgba(45, 123, 123, 0.1);
  transform: translateY(-2px);
}

.social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ============================================
   INDEX — GALLERY PREVIEW
   ============================================ */
.gallery-preview {
  position: relative;
  height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--off-black);
}

.gallery-mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  opacity: 0.45;
}

.gallery-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(50%);
}

.gallery-overlay {
  position: relative;
  z-index: 2;
  padding: 3rem;
}

.gallery-overlay-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.gallery-overlay-sub {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.gallery-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.9em 2.2em;
  transition: all 0.3s ease;
}

.gallery-link:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.gallery-link svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ============================================
   CONTACTO — HERO
   ============================================ */
.contact-hero {
  position: relative;
  height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.contact-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.contact-hero-bg-img {
  position: absolute;
  inset: 0;
  background:
    url('../Fotos Mini Beast-Volcano/28.09 - Shibari_Volcano y Mini Beast-47.JPG') center/cover no-repeat;
  filter: grayscale(40%) contrast(1.1);
  animation: heroImageReveal 1.5s var(--ease) both, heroZoom 25s ease-in-out 1.5s infinite alternate;
}

.contact-hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.85) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 40%, transparent 50%, rgba(0,0,0,0.6) 100%);
}

.contact-hero-text {
  position: relative;
  z-index: 2;
}

.contact-hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--teal-glow);
  margin-bottom: 0.6rem;
  animation: fadeInDown 0.8s var(--ease) 0.3s both;
}

.contact-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--cream);
  letter-spacing: -0.02em;
  animation: fadeInUp 1s var(--ease) 0.5s both;
}

/* ============================================
   CONTACTO — EDITORIAL SPLIT
   ============================================ */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: 80vh;
  overflow: hidden;
}

.contact-image {
  position: relative;
  overflow: hidden;
}

.contact-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%) contrast(1.05);
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
  transition: filter 0.8s ease;
}

.contact-image:hover img {
  filter: grayscale(0%) contrast(1.1);
}

.contact-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, transparent 60%, rgba(10,10,10,0.8) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

.contact-text {
  background: var(--off-black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 5rem;
  position: relative;
}

.contact-text::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(45,123,123,0.15) 50%, transparent);
}

.contact-body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.95;
  color: rgba(255,255,255,0.7);
  max-width: 420px;
  margin-bottom: 2.5rem;
}

.contact-divider {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 1em;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  padding: 0.9em 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: all 0.35s var(--ease);
  max-width: 300px;
}

.contact-link:last-child { border-bottom: none; }

.contact-link:hover {
  color: var(--teal-glow);
  padding-left: 0.8em;
  border-bottom-color: rgba(45, 123, 123, 0.15);
}

.contact-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease);
}

.contact-link:hover svg {
  transform: scale(1.15);
}

.contact-location {
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.05em;
}

/* ============================================
   GALERÍA — HERO
   ============================================ */
.gallery-hero {
  position: relative;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.gallery-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.gallery-hero-bg-img {
  position: absolute;
  inset: 0;
  background:
    url('../Fotos Mini Beast-Volcano/28.09 - Shibari_Volcano y Mini Beast-33.JPG') center 40%/cover no-repeat;
  filter: grayscale(50%) contrast(1.05);
  animation: heroImageReveal 1.5s var(--ease) both, heroZoom 25s ease-in-out 1.5s infinite alternate;
}

.gallery-hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.9) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 40%, transparent 50%, rgba(0,0,0,0.7) 100%);
}

.gallery-hero-text {
  position: relative;
  z-index: 2;
}

.gallery-hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--teal-glow);
  margin-bottom: 0.6rem;
  animation: fadeInDown 0.8s var(--ease) 0.3s both;
}

.gallery-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--cream);
  letter-spacing: -0.02em;
  animation: fadeInUp 1s var(--ease) 0.5s both;
}

.gallery-section {
  padding: 2rem var(--space-md) 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================
   MUSEO GALLERY GRID
   ============================================ */
.museo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.museo-item {
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
  cursor: pointer;
}

.museo-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.museo-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  filter: grayscale(15%) contrast(1.05);
  transition: filter 0.8s ease, transform 0.6s var(--ease);
}

.museo-item:hover img {
  filter: grayscale(0%) contrast(1.1);
  transform: scale(1.03);
}

.museo-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color 0.6s ease;
  pointer-events: none;
}

.museo-item:hover::after {
  border-color: var(--white-faint);
}

/* Wide images — explicitly marked, not every-5th */
.museo-item.museo-wide {
  grid-column: 1 / -1;
}

.museo-item.museo-wide img {
  aspect-ratio: 21 / 9;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: default;
  animation: fadeIn 0.3s ease both;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--white-muted);
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
  z-index: 2;
}

.lightbox-close:hover {
  color: var(--white);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white-muted);
  font-size: 3rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 1rem;
  z-index: 2;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--white);
}

/* ============================================
   CINEMATIC ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */

/* Image reveals — sliding overlay curtain (transform-based, GPU accelerated) */
.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--off-black);
  z-index: 2;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-image.revealed::after {
  transform: translateX(100%);
}

.contact-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--off-black);
  z-index: 3;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-image.revealed::after {
  transform: translateX(-100%);
}

/* Divider reveal */
.divider-line {
  transform-origin: center;
  transform: scaleX(0);
  transition: transform 0.8s var(--ease);
}

.divider.revealed .divider-line {
  transform: scaleX(1);
}

.divider-diamond {
  opacity: 0;
  transform: rotate(45deg) scale(0);
  transition: opacity 0.5s var(--ease) 0.3s, transform 0.5s var(--ease) 0.3s;
}

.divider.revealed .divider-diamond {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

/* Gallery items — stagger + alternating slide direction */
.museo-item {
  transition-delay: calc(var(--reveal-delay, 0) * 0.12s);
}

.museo-item:nth-child(odd) {
  transform: translateX(-20px) translateY(30px);
}

.museo-item:nth-child(even) {
  transform: translateX(20px) translateY(30px);
}

.museo-item.revealed {
  transform: translateX(0) translateY(0);
}

/* Gallery hover — teal ambient glow overlay */
.museo-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(45,123,123,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.museo-item:hover::before {
  opacity: 1;
}

/* Gallery mosaic — varied Ken Burns per image */
.gallery-mosaic img:nth-child(odd) {
  animation: heroZoom 25s ease-in-out infinite alternate;
}

.gallery-mosaic img:nth-child(even) {
  animation: heroZoom 30s ease-in-out 3s infinite alternate-reverse;
}

/* Nav scrolled — teal border accent */
.nav.scrolled {
  border-bottom: 1px solid rgba(45, 123, 123, 0.1);
}

/* Nav logo hover — brand glow */
.nav-logo span {
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-logo:hover span {
  color: var(--teal-glow);
  text-shadow: 0 0 12px rgba(45, 123, 123, 0.3);
}

/* Social link hover — teal glow */
.social-link:hover {
  box-shadow: 0 0 15px rgba(45, 123, 123, 0.2);
}

/* Gallery overlay — backlit text glow */
.gallery-overlay-title {
  text-shadow: 0 0 40px rgba(45, 123, 123, 0.25);
}

/* Contact link hover — teal left accent */
.contact-link:hover {
  box-shadow: inset 3px 0 0 var(--teal);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
  }
  .hero-bg-img { animation: none; transform: none; }
  .gallery-hero-bg-img { animation: none; transform: none; }
  .contact-hero-bg-img { animation: none; transform: none; }
  .contact-image img { animation: none; transform: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .museo-item { opacity: 1; transform: none; }
  .about-image::after,
  .contact-image::after { display: none; }
  .divider-line { transform: scaleX(1); }
  .divider-diamond { opacity: 1; transform: rotate(45deg); }
  .page-home::after,
  .page-galeria::after,
  .page-contacto::after { display: none; }
  .hero-text::after { animation: none; opacity: 1; transform: none; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .about-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .contact-section {
    max-height: none;
    overflow: visible;
  }

  .about-image,
  .contact-image {
    height: 50vh;
  }

  .about-text,
  .contact-text {
    padding: 3rem 2rem;
  }

  .contact-text::before {
    display: none;
  }

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

  .gallery-preview {
    height: 40vh;
  }

  .contact-hero {
    height: 40vh;
  }
}

@media (max-width: 768px) {
  /* --- NAV --- */
  .nav {
    padding: 1rem 1.25rem;
  }

  .nav-logo {
    font-size: 1.05rem;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1.5rem 1.25rem 2rem;
    gap: 0;
    border-bottom: 1px solid rgba(45, 123, 123, 0.15);
    /* Animated slide-down */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s var(--ease), opacity 0.3s ease, padding 0.4s var(--ease);
    display: flex;
    padding-top: 0;
    padding-bottom: 0;
  }

  .nav-links.open {
    max-height: 300px;
    opacity: 1;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    color: var(--white-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links a.active {
    color: var(--teal-glow);
  }

  .nav-links a::after {
    display: none;
  }

  /* Hamburger — 44px minimum touch target */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-toggle span {
    width: 20px;
    height: 2px;
    margin: 3px 0;
    transition: transform 0.35s var(--ease), opacity 0.25s ease;
  }

  /* Hamburger → X animation */
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* --- HEROES --- */
  .gallery-hero {
    height: 40vh;
  }

  .contact-hero {
    height: 35vh;
  }

  /* Swap hero to portrait image on mobile */
  .hero-bg-img {
    background-image: url('../hero_mobile.jpg');
  }

  /* Hide teal line on mobile hero */
  .hero-text::after {
    display: none;
  }

  /* Prevent hero bg overflow */
  .gallery-hero-bg-img,
  .contact-hero-bg-img,
  .hero-bg-img {
    inset: -5px;
  }

  /* --- ABOUT SECTION --- */
  .about-image {
    height: 45vh;
  }

  .about-body {
    max-width: none;
    font-size: 0.9rem;
  }

  .social-links {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .social-link {
    width: 44px;
    height: 44px;
  }

  /* --- GALLERY --- */
  .gallery-section {
    padding: 1.5rem 1rem 2rem;
  }

  .museo-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .museo-item img {
    aspect-ratio: auto;
    height: auto;
  }

  .museo-item.museo-wide img {
    aspect-ratio: auto;
    height: auto;
  }

  /* Gallery preview mosaic */
  .gallery-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }

  .gallery-preview {
    height: 35vh;
  }

  .gallery-link {
    padding: 0.8em 1.8em;
    font-size: 0.8rem;
  }

  /* --- CONTACT --- */
  .contact-image {
    height: 40vh;
  }

  .contact-text {
    padding: 2.5rem 1.25rem;
  }

  .contact-body {
    font-size: 0.95rem;
    max-width: none;
  }

  .contact-link {
    padding: 1em 0;
    font-size: 0.85rem;
    max-width: none;
  }

  .contact-link svg {
    width: 20px;
    height: 20px;
  }

  /* --- FOOTER (touch-friendly socials) --- */
  .footer {
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
    padding: 1.5rem 1.25rem;
  }

  .footer-socials {
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  .footer-socials svg {
    width: 18px;
    height: 18px;
  }

  /* --- LIGHTBOX (mobile-optimized) --- */
  .lightbox-prev,
  .lightbox-next {
    font-size: 2.5rem;
    padding: 1rem 0.5rem;
    min-width: 44px;
    min-height: 44px;
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 2rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lightbox-img {
    max-width: 95vw;
    max-height: 80vh;
  }

  /* --- DIVIDER (subtler on mobile) --- */
  .divider {
    padding: 1.5rem 0;
  }

  .divider-line {
    width: 40px;
  }
}

/* ============================================
   TOUCH FEEDBACK (mobile active states)
   ============================================ */
@media (hover: none) {
  .contact-link:active {
    color: var(--teal-glow);
    padding-left: 0.8em;
    box-shadow: inset 3px 0 0 var(--teal);
  }

  .social-link:active {
    border-color: var(--teal);
    color: var(--teal-glow);
    background: rgba(45, 123, 123, 0.1);
  }

  .gallery-link:active {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
  }

  .footer-socials a:active {
    color: var(--white);
  }

  .nav-links a:active {
    color: var(--teal-glow);
  }
}

/* ============================================
   SMALL MOBILE (iPhone SE, 320-375px)
   ============================================ */
@media (max-width: 375px) {
  .hero-title {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }

  .gallery-hero-title,
  .contact-hero-title {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .section-label {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .about-text {
    padding: 2.5rem 1.25rem;
  }

  .social-links {
    gap: 0.6rem;
  }
}
