/* ============================================================
   JMS INGENIERÍA S.A.S. — Estilos principales
   Paleta: Naranja #F47B20 · Amarillo #F9B800 · Navy #1B2A4A
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --orange:       #F47B20;
  --orange-dark:  #D4650F;
  --orange-light: #FFA04D;
  --yellow:       #F9B800;
  --navy:         #1B2A4A;
  --navy-dark:    #0F1C33;
  --dark:         #1C1C1C;
  --gray-dark:    #3D3D3D;
  --gray-mid:     #6B6B6B;
  --gray-light:   #F4F4F4;
  --border:       #E0E0E0;
  --white:        #FFFFFF;

  --ff-head: 'Barlow Condensed', sans-serif;
  --ff-body: 'Inter', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 6px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.18);

  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--ff-body);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ---------- Foco visible (accesibilidad teclado) ---------- */
a:focus-visible,
button:focus-visible,
.project-card:focus-visible,
.filter-btn:focus-visible,
.gallery-thumb:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- Utilidades ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.text-accent { color: var(--orange); }
.section { padding: 96px 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  transition: var(--transition);
}
.btn--primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(244,123,32,.35);
}
.btn--primary:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(244,123,32,.45);
}
.btn--ghost {
  border: 2px solid rgba(255,255,255,.6);
  color: var(--white);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--white);
  background: rgba(255,255,255,.12);
}
.btn--outline-nav {
  border: 1.5px solid var(--orange);
  color: var(--orange);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
}
.btn--outline-nav:hover {
  background: var(--orange);
  color: var(--white);
}
.btn--full { width: 100%; justify-content: center; }

/* ---------- Encabezados de sección ---------- */
.section__header { text-align: center; margin-bottom: 56px; }
.section__tag {
  display: inline-block;
  background: rgba(244,123,32,.12);
  color: var(--orange);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--ff-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 14px;
}
.section__sub {
  color: var(--gray-mid);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: var(--white);
  padding: 12px 0;
  box-shadow: var(--shadow-md);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar__logo-img {
  height: 48px;
  width: auto;
  transition: opacity var(--transition);
}
.navbar__logo-img:hover { opacity: .85; }

/* Logo blanco: visible por defecto (navbar transparente sobre hero) */
.navbar__logo-light { display: block; height: 72px; }
.navbar__logo-dark  { display: none; }

/* Al hacer scroll (fondo blanco): mostrar logo oscuro tamaño normal */
.navbar.scrolled .navbar__logo-light { display: none; }
.navbar.scrolled .navbar__logo-dark  { display: block; }
.navbar__brand {
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: .01em;
  transition: color var(--transition);
}
.navbar.scrolled .navbar__brand { color: var(--dark); }
.navbar__nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.navbar__nav a {
  font-weight: 500;
  font-size: .95rem;
  color: rgba(255,255,255,.88);
  transition: color var(--transition);
  position: relative;
}
.navbar__nav a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width var(--transition);
}
.navbar__nav a:hover::after { width: 100%; }
.navbar__nav a:hover { color: var(--white); }
.navbar.scrolled .navbar__nav a { color: var(--gray-dark); }
.navbar.scrolled .navbar__nav a:hover { color: var(--orange); }
/* el btn--outline-nav ya tiene su propio estilo */
.navbar.scrolled .btn--outline-nav { color: var(--orange); border-color: var(--orange); }
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.navbar__toggle span {
  display: block;
  width: 26px; height: 2.5px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.navbar.scrolled .navbar__toggle span { background: var(--dark); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../imagenes/Aeropuerto%20de%20ipiales/WhatsApp%20Image%202026-05-27%20at%209.39.08%20AM.jpeg');
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 8s ease-out;
}
.hero__bg.loaded { transform: scale(1); }
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11,20,38,.82) 0%,
    rgba(27,42,74,.70) 50%,
    rgba(244,123,32,.18) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding-top: 80px;
}
.hero__tag {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange-light);
  margin-bottom: 16px;
}
.hero__title {
  font-family: var(--ff-head);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  color: var(--white);
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.hero__sub {
  color: rgba(255,255,255,.78);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero__scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero__scroll-indicator span {
  display: block;
  width: 2px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,.6), transparent);
  margin: 0 auto;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .6; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ============================================================
   MARCA
   ============================================================ */
.marca {
  background: var(--white);
  padding: 64px 0;
}
.marca__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.marca__logo {
  width: 100%;
  max-width: 420px;
  height: auto;
}
.marca__tagline {
  font-family: var(--ff-head);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 600;
  color: var(--navy);
  max-width: 640px;
}

/* ============================================================
   STATS
   ============================================================ */
.stats {
  background: var(--navy);
  padding: 52px 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-item__number {
  font-family: var(--ff-head);
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
}
.stat-item__plus {
  font-family: var(--ff-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--yellow);
  vertical-align: super;
}
.stat-item p {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: .02em;
}

/* ============================================================
   SERVICIOS
   ============================================================ */
.servicios { background: var(--white); }
.servicios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  padding: 36px 28px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  transition: width var(--transition);
}
.service-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}
.service-card:hover::before { width: 100%; }
.service-card__icon {
  width: 56px; height: 56px;
  background: rgba(244,123,32,.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: background var(--transition);
}
.service-card:hover .service-card__icon { background: var(--orange); }
.service-card__icon svg {
  width: 28px; height: 28px;
  color: var(--orange);
  transition: color var(--transition);
}
.service-card:hover .service-card__icon svg { color: var(--white); }
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dark);
}
.service-card p { color: var(--gray-mid); font-size: .93rem; line-height: 1.65; }

/* ============================================================
   PROYECTOS
   ============================================================ */
.proyectos { background: var(--gray-light); }
.proyectos__filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 9px 22px;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--gray-dark);
  transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}
.proyectos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}
.project-card__img {
  height: 220px;
  position: relative;
  overflow: hidden;
}
.project-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.45));
}
.project-card:hover .project-card__img { filter: brightness(1.05); }
.project-card__info { padding: 22px; }
.project-card__tag {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(244,123,32,.1);
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 10px;
}
.project-card__info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 7px;
}
.project-card__info p { color: var(--gray-mid); font-size: .88rem; }
/* Cards ocultas por filtro */
.project-card.hidden {
  display: none;
}

/* ============================================================
   NOSOTROS
   ============================================================ */
.nosotros { background: var(--white); }
.nosotros__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.nosotros__media { position: relative; }
.nosotros__img-main {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
}
.nosotros__img-badge {
  position: absolute;
  bottom: -24px;
  right: -24px;
  background: var(--white);
  border: 3px solid var(--orange);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.badge__mascot {
  width: 90px;
  height: auto;
  display: block;
  margin: 0 auto 6px;
}
.badge__label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.3;
}
.nosotros__text .section__tag { display: inline-block; }
.nosotros__text .section__title { text-align: left; margin-bottom: 20px; }
.nosotros__text p {
  color: var(--gray-dark);
  margin-bottom: 14px;
  line-height: 1.75;
}
.nosotros__valores {
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nosotros__valores li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.valor-icon {
  width: 28px; height: 28px;
  min-width: 28px;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  margin-top: 2px;
}
.nosotros__valores li strong { font-weight: 700; color: var(--dark); }
.nosotros__valores li div { font-size: .93rem; color: var(--gray-mid); line-height: 1.5; }

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto { background: var(--navy-dark); }
.contacto .section__tag {
  background: rgba(244,123,32,.15);
  color: var(--orange-light);
}
.contacto .section__title { color: var(--white); text-align: left; }
.contacto__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 72px;
  align-items: flex-start;
}
.contacto__info > p { color: rgba(255,255,255,.65); margin: 12px 0 32px; line-height: 1.7; }
.contacto__data { display: flex; flex-direction: column; gap: 24px; }
.contacto__data li { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
  width: 44px; height: 44px;
  min-width: 44px;
  background: rgba(244,123,32,.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-icon svg { width: 20px; height: 20px; color: var(--orange); }
.contacto__data strong {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 2px;
}
.contacto__data span { color: rgba(255,255,255,.65); font-size: .93rem; line-height: 1.5; }

/* Formulario */
.contacto__form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--gray-dark); }
.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  color: var(--dark);
  background: var(--gray-light);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(244,123,32,.15);
  background: var(--white);
}
.form-status {
  margin-top: 12px;
  font-size: .9rem;
  font-weight: 500;
  text-align: center;
  min-height: 20px;
}
.form-status.success { color: #16a34a; }
.form-status.error { color: #dc2626; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding: 64px 24px 40px;
}
.footer__logo-img {
  height: 52px;
  width: auto;
  margin-bottom: 14px;
}
.footer__logo-link { display: inline-block; }
.footer__brand p { color: rgba(255,255,255,.5); font-size: .9rem; line-height: 1.65; max-width: 300px; }
.footer__links h4 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: 16px;
}
.footer__links a {
  display: block;
  color: rgba(255,255,255,.6);
  font-size: .93rem;
  margin-bottom: 10px;
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--orange); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 20px 0;
}
.footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 24px;
}
.footer__bottom p { color: rgba(255,255,255,.3); font-size: .85rem; text-align: center; margin: 0; }
.footer__legal-link {
  color: rgba(255,255,255,.4);
  font-size: .85rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__legal-link:hover { color: var(--orange); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px; height: 44px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top svg { width: 18px; height: 18px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .servicios__grid { grid-template-columns: repeat(2, 1fr); }
  .nosotros__inner { gap: 48px; }
  .contacto__inner { gap: 48px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 48px; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }

  /* Navbar mobile */
  .navbar__toggle { display: flex; }
  .navbar__nav {
    position: fixed;
    top: 0; right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px 32px;
    gap: 24px;
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
  }
  .navbar__nav.open { right: 0; }
  .navbar__nav a { color: var(--gray-dark) !important; font-size: 1.1rem; }
  .navbar__nav a:hover { color: var(--orange) !important; }
  .btn--outline-nav { color: var(--orange) !important; border-color: var(--orange) !important; }

  /* Hero */
  .hero__title { font-size: clamp(2.4rem, 8vw, 3.5rem); }

  /* Marca */
  .marca { padding: 48px 0; }
  .marca__logo { max-width: 260px; }

  /* Stats */
  .stats__grid { grid-template-columns: repeat(2, 1fr); }

  /* Servicios */
  .servicios__grid { grid-template-columns: 1fr; }

  /* Proyectos */
  .proyectos__grid { grid-template-columns: 1fr; }

  /* Nosotros */
  .nosotros__inner { grid-template-columns: 1fr; gap: 56px; }
  .nosotros__img-badge { right: 16px; bottom: -16px; }

  /* Contacto */
  .contacto__inner { grid-template-columns: 1fr; gap: 40px; }
  .contacto__form { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .hero__cta { flex-direction: column; }
  .btn { justify-content: center; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .stat-item__number { font-size: 2.4rem; }
}

/* ============================================================
   MASCOT CTA
   ============================================================ */
.mascot-cta {
  background: var(--gray-light);
  padding: 56px 0;
  overflow: hidden;
}
.mascot-cta__inner {
  display: flex;
  align-items: center;
  gap: 40px;
}
.mascot-cta__img {
  width: 300px;
  height: auto;
  flex-shrink: 0;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
}
.mascot-cta__text h2 {
  font-family: var(--ff-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 14px;
}
.mascot-cta__text p {
  color: var(--gray-mid);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 28px;
}

.mascot-cta__img--right {
  align-self: flex-end;
}

@media (max-width: 768px) {
  .mascot-cta__inner {
    flex-direction: column;
    text-align: center;
  }
  .mascot-cta__img { width: 200px; }
  .mascot-cta__img--right { display: none; }
  .mascot-cta__text p { margin: 0 auto 28px; }
}

/* ============================================================
   GALLERY HINT (hover sobre project card)
   ============================================================ */
.project-card[data-gallery] { cursor: pointer; }
.project-card__gallery-hint {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244,123,32,0);
  transition: background var(--transition);
}
.project-card:hover .project-card__gallery-hint {
  background: rgba(27,42,74,.65);
}
.project-card__gallery-hint span {
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 10px 24px;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
}
.project-card:hover .project-card__gallery-hint span {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   GALLERY MODAL / LIGHTBOX
   ============================================================ */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.gallery-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
  cursor: pointer;
}
.gallery-modal__box {
  position: relative;
  z-index: 1;
  background: #161616;
  border-radius: var(--radius-lg);
  width: min(94vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
}
.gallery-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.gallery-modal__title {
  font-family: var(--ff-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .01em;
}
.gallery-modal__close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
.gallery-modal__close:hover { background: rgba(255,255,255,.18); }
.gallery-modal__close svg { width: 18px; height: 18px; color: var(--white); }

/* Thumbnail grid */
.gallery-modal__grid {
  padding: 20px 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  flex: 1;
}
.gallery-thumb {
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  outline: 2px solid transparent;
  transition: outline-color var(--transition);
}
.gallery-thumb:hover { outline-color: var(--orange); }
.gallery-thumb img,
.gallery-thumb video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}
.gallery-thumb:hover img,
.gallery-thumb:hover video { transform: scale(1.06); }
.gallery-thumb--video::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(27,42,74,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/20px no-repeat;
  pointer-events: none;
}

/* Full viewer */
.gallery-modal__viewer {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.gallery-modal__viewer.active { display: flex; }
.gallery-viewer__back {
  color: var(--orange);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 14px 28px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
  transition: color var(--transition);
}
.gallery-viewer__back:hover { color: var(--orange-light); }
.gallery-viewer__main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  min-height: 0;
  overflow: hidden;
}
.gallery-viewer__img {
  flex: 1;
  min-width: 0;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
}
#galleryVideo.gallery-viewer__img { display: none; background: #000; }
.gallery-viewer__nav {
  width: 44px; height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
.gallery-viewer__nav:hover { background: var(--orange); }
.gallery-viewer__counter {
  text-align: center;
  color: rgba(255,255,255,.4);
  font-size: .82rem;
  padding: 10px 0 14px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .gallery-modal__grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .gallery-modal__header { padding: 14px 18px; }
  .gallery-modal__grid { padding: 14px 16px; }
  .gallery-viewer__back { padding: 12px 18px; }
  .gallery-viewer__main { padding: 10px; gap: 6px; }
  .gallery-viewer__nav { width: 36px; height: 36px; min-width: 36px; font-size: 1.5rem; }
}

/* ============================================================
   ANIMACIONES DE ENTRADA
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: .1s; }
.fade-in-delay-2 { transition-delay: .2s; }
.fade-in-delay-3 { transition-delay: .3s; }
.fade-in-delay-4 { transition-delay: .4s; }
.fade-in-delay-5 { transition-delay: .5s; }

/* ============================================================
   ACCESIBILIDAD: prefers-reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero__bg, .hero__bg.loaded { transform: none; }
  .fade-in { opacity: 1; transform: none; }
}
