/* ============================================================
   HRC TECHNOLOGIES — Reconstrucción estática
   Sistema de diseño: negro + dorado, tipografía Figtree
   ============================================================ */

:root {
  --bg:            #000000;
  --bg-2:          #0a0a0a;
  --card:          #14120a;
  --card-hover:    #1b1809;
  --border:        rgba(201, 162, 39, 0.28);
  --border-soft:   rgba(255, 255, 255, 0.08);

  --gold:          #c9a227;   /* acento brillante: iconos, bordes, tabs activos */
  --gold-light:    #e9d9a0;   /* logo / detalles claros */
  --gold-btn:      rgba(142, 119, 16, 0.85);
  --gold-btn-hov:  rgba(176, 148, 20, 0.95);

  --text:          #ffffff;
  --text-muted:    #c3c3c3;
  --text-dim:      #9a9a9a;

  --radius:        8px;
  --radius-lg:     24px;
  --maxw:          1200px;
  --header-h:      92px;

  --font: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-muted);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { color: var(--text); font-weight: 600; line-height: 1.2; }

/* Section titles ("Servicios", "Galería De Apps", ...) */
.section { padding: 96px 0; position: relative; }
.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 56px;
  letter-spacing: .5px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 15px 34px;
  border-radius: var(--radius);
  background: var(--gold-btn);
  color: #fff;
  font-weight: 600;
  font-size: 1.02rem;
  border: 1px solid rgba(255, 234, 145, 0.25);
  cursor: pointer;
  transition: background .25s ease, transform .2s ease, box-shadow .25s ease;
}
.btn:hover {
  background: var(--gold-btn-hov);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(201, 162, 39, 0.25);
}

/* ============================================================
   HEADER / NAV  (barra flotante tipo píldora)
   ============================================================ */
.site-header {
  position: fixed;
  top: 18px; left: 0; right: 0;
  z-index: 100;
  transition: top .3s ease;
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 26px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(12, 11, 6, 0.72);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header.scrolled .nav {
  background: rgba(8, 7, 4, 0.92);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.nav-logo img { height: 40px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0 auto;
  list-style: none;
}
.nav-links a {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 500;
  padding: 6px 2px;
  position: relative;
  transition: color .2s ease;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -3px;
  width: 0; height: 2px; background: var(--gold);
  transition: width .25s ease;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.lang { color: var(--gold-light); }

/* En desktop el wrapper es transparente (los hijos actúan como directos del nav) */
.nav-menu { display: contents; }
.nav-social { display: flex; gap: 12px; }
.nav-social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-light);
  transition: background .2s ease, transform .2s ease;
}
.nav-social a:hover { background: rgba(201, 162, 39, 0.2); transform: translateY(-2px); }
.nav-social svg { width: 18px; height: 18px; fill: currentColor; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 42px; height: 42px; color: var(--gold-light);
}
.nav-toggle svg { width: 26px; height: 26px; stroke: currentColor; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  min-height: 100svh; /* móvil: evita el salto por la barra del navegador */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 140px 24px 90px;
  background: #000;
}
/* Video de fondo + su imagen fallback (poster) */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.82));
}
.hero-inner { max-width: 820px; position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  margin-bottom: 26px;
  letter-spacing: .5px;
}
.hero p {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 40px;
}

/* ============================================================
   SERVICIOS
   ============================================================ */
.services-layout {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  /* Alinea las tarjetas al borde izquierdo del contenedor y deja el lado
     derecho libre para que la mano llegue al filo de la pantalla. */
  padding-left: max(24px, calc((100vw - var(--maxw)) / 2));
  padding-right: 0;
}
.services-cards {
  flex: 0 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 320px));
  gap: 24px;
  align-items: stretch;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .service-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    background: var(--card-hover);
  }
}
.service-icon {
  width: 46px; height: 46px; color: var(--gold);
  margin-bottom: 26px;
}
.service-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; }
.service-card h3 { font-size: 1.35rem; margin-bottom: 16px; }
.service-card p { color: var(--text-dim); font-size: 1rem; }
.services-visual {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.services-visual img {
  width: clamp(240px, 26vw, 380px);
  max-width: 100%;
  border-radius: var(--radius-lg);
}

/* ============================================================
   GALERÍA (tabs + carrusel de mockups)
   ============================================================ */
.gallery-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 50px;
  align-items: center;
}
.gallery-tabs { display: flex; flex-direction: column; gap: 12px; }
.gallery-tab {
  text-align: center;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 1.02rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .22s ease;
}
.gallery-tab:hover { border-color: var(--border); color: var(--text); }
.gallery-tab.active {
  background: var(--gold-btn);
  color: #fff;
  border-color: rgba(255, 234, 145, 0.4);
}

.gallery-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 620px;
}
.gallery-arrow {
  width: 52px; height: 52px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim);
  transition: color .2s ease, transform .2s ease;
}
.gallery-arrow:hover { color: var(--gold-light); transform: scale(1.1); }
.gallery-arrow svg { width: 40px; height: 40px; stroke: currentColor; fill: none; }

.phone {
  position: relative;
  width: 300px; height: 610px;
  border-radius: 44px;
  background: #0d0d0d;
  border: 3px solid #2a2a2a;
  box-shadow: 0 30px 70px rgba(0,0,0,.6), inset 0 0 0 6px #000;
  padding: 10px;
  overflow: hidden;
}
.phone::before { /* notch */
  content: '';
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 26px; background: #000; border-radius: 16px; z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #000;
  position: relative;
}
.phone-screen img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .4s ease;
}
.phone-screen img.active { opacity: 1; }

.gallery-dots { display: flex; justify-content: center; gap: 9px; margin-top: 26px; }
.gallery-dots .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.25); cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.gallery-dots .dot.active { background: var(--gold); transform: scale(1.2); }

/* ============================================================
   NUESTROS CLIENTES  (carrusel infinito de logos)
   ============================================================ */
.clients-intro {
  text-align: center;
  color: var(--text-dim);
  max-width: 620px;
  margin: -32px auto 0;
  font-size: 1.05rem;
}
.clients-marquee {
  position: relative;
  margin-top: 50px;
  overflow: hidden;
  /* Difumina los bordes izquierdo/derecho para el efecto "sin corte". */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.clients-track {
  display: flex;
  width: max-content;
  animation: clients-scroll 32s linear infinite;
}
@media (hover: hover) and (pointer: fine) {
  .clients-marquee:hover .clients-track { animation-play-state: paused; }
}
@keyframes clients-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.client-chip {
  flex: 0 0 auto;
  width: 250px;
  height: 140px;
  margin-right: 30px;
  display: grid;
  place-items: center;
  padding: 26px 30px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
  transition: transform .3s ease, box-shadow .3s ease;
}
.client-chip:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 46px rgba(201, 162, 39, .32);
}
.client-chip img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
}
@media (prefers-reduced-motion: reduce) {
  .clients-track { animation: none; }
  /* Sin animación, el carrusel se vuelve deslizable con el dedo para no ocultar clientes */
  .clients-marquee {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: none;
            mask-image: none;
    padding-bottom: 6px;
  }
}

/* ============================================================
   NOSOTROS
   ============================================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-visual { position: relative; }
.about-visual img {
  border-radius: var(--radius-lg);
  width: 100%;
  /* Reserva el espacio antes de que cargue (lazy): sin saltos de layout
     y la insignia nunca queda flotando sobre el texto. */
  aspect-ratio: 1641 / 2048;
  object-fit: cover;
}
.about-list { display: flex; flex-direction: column; }

/* Intro persuasiva bajo el título */
.about-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 760px;
  margin: -36px auto 56px;
  font-size: 1.12rem;
  line-height: 1.7;
}
.about-intro strong { color: var(--gold-light); }

/* Insignia flotante sobre la imagen */
.about-badge {
  position: absolute;
  left: 20px; bottom: 20px;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  background: linear-gradient(135deg, rgba(30, 25, 8, .95), rgba(12, 11, 6, .95));
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}
.about-badge strong { font-size: 2.1rem; font-weight: 700; color: var(--gold-light); line-height: 1; }
.about-badge span { color: var(--text-muted); font-size: .85rem; line-height: 1.35; }

/* Barras de nivel (gráficos) */
.about-skills { padding-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.skill-top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.skill-top span { color: var(--text); font-weight: 500; font-size: .98rem; }
.skill-top b { color: var(--gold-light); font-size: .95rem; }
.skill-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.skill-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  box-shadow: 0 0 12px rgba(201, 162, 39, .45);
  transition: width 1.3s cubic-bezier(.25, .8, .3, 1);
}

/* Contadores de logros */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 70px;
}
.stat-card {
  text-align: center;
  padding: 34px 20px 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .3s ease, border-color .3s ease;
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--gold); }
.stat-number {
  font-size: 2.7rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.1;
  margin-bottom: 8px;
}
.stat-label { color: var(--text-dim); font-size: .96rem; }
.about-item { padding: 30px 0; border-bottom: 1px solid var(--border-soft); }
.about-item:last-child { border-bottom: none; }
.about-item .service-icon { margin-bottom: 16px; width: 40px; height: 40px; }
.about-item h3 { font-size: 1.4rem; margin-bottom: 12px; }
.about-item p { color: var(--text-dim); }

/* ============================================================
   EQUIPO
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.team-card { text-align: center; }
.team-photo {
  width: 200px; height: 200px;
  margin: 0 auto 26px;
  border-radius: 16px;
  object-fit: cover;
  background: #14120a;
  border: 1px solid var(--border-soft);
}
/* Fotos recortadas con marco dorado sutil y elegante (igual para todos) */
.team-photo-cut {
  background: linear-gradient(180deg, #2a2109 0%, #14120a 55%, #0b0a05 100%);
  border: 1px solid rgba(201, 162, 39, 0.6);
  border-radius: 16px;
  object-fit: cover;
  box-shadow: inset 0 0 22px rgba(201, 162, 39, 0.10);
}
.team-role { color: var(--gold-light); font-weight: 600; font-size: .95rem; letter-spacing: .5px; margin-bottom: 6px; }
.team-card h3 { font-size: 1.7rem; margin-bottom: 18px; }
.team-card p { color: var(--text-dim); font-size: .98rem; }

/* ============================================================
   CONTACTO
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}
.contact-info { display: flex; flex-direction: column; gap: 26px; padding-top: 10px; }
.contact-item { display: flex; align-items: center; gap: 18px; }
.contact-item .ci-icon {
  width: 26px; height: 26px; flex: 0 0 auto; color: var(--gold);
}
.contact-item .ci-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; }
.contact-item span, .contact-item a { color: var(--text-muted); font-size: 1.05rem; }
.contact-item a:hover { color: var(--gold-light); }

/* Mapa de ubicación (tema oscuro sin API key) */
.contact-map {
  position: relative;
  margin-top: 10px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
  line-height: 0;
}
.contact-map iframe {
  width: 100%;
  height: 300px;
  border: 0;
  display: block;
  /* Convierte el mapa claro de Google en un mapa oscuro que combina con el sitio */
  filter: invert(0.92) hue-rotate(180deg) contrast(0.9) saturate(0.75) brightness(0.95);
}
.contact-map-tag {
  position: absolute;
  left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  background: rgba(12, 11, 6, .88);
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--gold-light);
  font-size: .85rem; font-weight: 600;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .2s ease, transform .2s ease;
}
.contact-map-tag svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.contact-map-tag:hover { background: rgba(201, 162, 39, .2); transform: translateY(-2px); }

/* ============================================================
   FORMULARIO DE CONTACTO (moderno + animado)
   ============================================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 34px 32px 30px;
  background: linear-gradient(160deg, rgba(30, 25, 8, .55), rgba(10, 9, 5, .55));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.cf-head { text-align: left; }
.cf-eyebrow {
  display: inline-block;
  color: var(--gold-light);
  font-size: .82rem; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 8px;
}
.cf-title { font-size: clamp(1.35rem, 3vw, 1.7rem); margin-bottom: 8px; }
.cf-sub { color: var(--text-dim); font-size: .98rem; line-height: 1.6; }

/* Chips "¿qué quieres construir?" */
.cf-block-label {
  display: block; color: var(--text); font-weight: 600;
  font-size: .95rem; margin-bottom: 14px;
}
.cf-opt { color: var(--text-dim); font-style: normal; font-weight: 400; font-size: .82rem; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cf-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-family: var(--font); font-size: .92rem; font-weight: 500;
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.cf-chip svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.cf-chip:hover { border-color: var(--border); color: var(--text); transform: translateY(-2px); }
.cf-chip.active {
  background: var(--gold-btn);
  border-color: rgba(255, 234, 145, .5);
  color: #fff;
  box-shadow: 0 6px 18px rgba(201, 162, 39, .3);
  transform: translateY(-2px) scale(1.02);
}
.cf-chip.active svg { stroke: #fff; }

/* Campos con etiqueta flotante */
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-field { position: relative; }
.cf-field input,
.cf-field textarea {
  width: 100%;
  padding: 24px 16px 10px;
  background: rgba(142, 119, 16, .1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color .2s ease, background .2s ease, box-shadow .25s ease;
}
.cf-field textarea { resize: vertical; min-height: 92px; }
.cf-field label {
  position: absolute; left: 16px; top: 16px;
  color: var(--text-dim);
  font-size: 1rem;
  pointer-events: none;
  transition: top .18s ease, font-size .18s ease, color .18s ease;
}
.cf-field input:focus,
.cf-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(142, 119, 16, .16);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .16);
}
.cf-field input:focus ~ label,
.cf-field input:not(:placeholder-shown) ~ label,
.cf-field textarea:focus ~ label,
.cf-field textarea:not(:placeholder-shown) ~ label {
  top: 7px; font-size: .72rem; color: var(--gold-light);
}
.cf-field.cf-error input,
.cf-field.cf-error textarea { border-color: #d9534f; animation: cfShake .35s; }
@keyframes cfShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Botón enviar */
.cf-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
}
.cf-submit svg { width: 20px; height: 20px; fill: #fff; }
.cf-note { text-align: center; color: var(--text-dim); font-size: .85rem; margin-top: -8px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 40px;
  background: var(--bg-2);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}
.footer-logo img { height: 46px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; list-style: none; }
.footer-links a { color: var(--text-muted); transition: color .2s ease; }
.footer-links a:hover { color: var(--gold-light); }
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.06); color: var(--gold-light);
  transition: background .2s ease, transform .2s ease;
}
.footer-social a:hover { background: rgba(201,162,39,.2); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; fill: currentColor; }
.footer-copy { color: var(--text-dim); font-size: .9rem; }

.footer-legal a {
  color: var(--text-dim);
  font-size: .9rem;
  text-decoration: underline;
  cursor: pointer;
  transition: color .2s ease;
}
.footer-legal a:hover { color: var(--gold-light); }

/* ============================================================
   MODAL (Política de privacidad)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; }
body.modal-open { overflow: hidden; touch-action: none; }
html:has(body.modal-open) { overflow: hidden; }
.modal {
  width: 100%;
  max-width: 720px;
  max-height: 86vh;                        /* fallback navegadores viejos */
  max-height: min(86dvh, calc(100dvh - 40px)); /* viewport visible real en móvil */
  touch-action: pan-y;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  background: #0d0c07;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: modalIn .25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-header h3 { font-size: 1.2rem; color: var(--text); line-height: 1.3; }
.modal-close {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.7rem;
  line-height: 1;
  transition: background .2s ease, color .2s ease;
}
.modal-close:hover { background: rgba(201, 162, 39, .2); color: var(--gold-light); }
.modal-body {
  padding: 6px 26px 22px;
  overflow-y: auto;
  color: var(--text-dim);
}
.modal-body .modal-meta {
  color: var(--gold-light);
  font-size: .85rem;
  letter-spacing: .3px;
  margin: 16px 0 10px;
}
.modal-body h4 { color: var(--text); font-size: 1.02rem; margin: 20px 0 8px; }
.modal-body p { margin-bottom: 10px; font-size: .96rem; line-height: 1.7; }
.modal-body ol { margin: 8px 0 12px; padding-left: 20px; }
.modal-body li { margin-bottom: 6px; font-size: .96rem; line-height: 1.65; }
.modal-body a { color: var(--gold-light); text-decoration: underline; }
.modal-footer {
  padding: 16px 26px 22px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: flex-end;
}

/* Floating WhatsApp */
.wa-float {
  position: fixed; bottom: 26px; right: 26px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }

/* ============================================================
   HERO — palabra rotativa
   ============================================================ */
.hero-rotate {
  display: inline-block;
  color: var(--gold-light);
  transition: opacity .35s ease, transform .35s ease;
  will-change: opacity, transform;
}
.hero-rotate.out { opacity: 0; transform: translateY(12px); }

/* Subtítulo persuasivo bajo el título (reutilizado en varias secciones) */
.portfolio-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 680px;
  margin: -34px auto 54px;
  font-size: 1.08rem;
  line-height: 1.65;
}

/* ============================================================
   PORTAFOLIO / NUESTRAS APPS
   ============================================================ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 24px;
}
.app-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.app-mockup {
  position: relative;
  width: 100%;
  max-width: 250px;
  aspect-ratio: 460 / 989;
  border-radius: 34px;
  background: #101014;
  border: 8px solid #17171c;
  box-shadow: 0 26px 55px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(255, 255, 255, .05);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}
.app-mockup::before { /* notch */
  content: '';
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 42%; height: 18px; background: #0a0a0d;
  border-radius: 0 0 12px 12px; z-index: 2;
}
.app-mockup img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-card:hover .app-mockup {
  transform: translateY(-8px);
  box-shadow: 0 34px 72px rgba(201, 162, 39, .28), inset 0 0 0 2px rgba(255, 255, 255, .05);
}
.app-info { margin-top: 20px; }
.app-info h3 { font-size: 1.2rem; margin-bottom: 2px; }
.app-info span { display: block; color: var(--text-dim); font-size: .9rem; margin-bottom: 8px; }
.app-info em { color: var(--gold-light); font-style: normal; font-size: .9rem; font-weight: 600; }

/* ============================================================
   CÓMO TRABAJAMOS (proceso)
   ============================================================ */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 26px 30px;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.step-card:hover { transform: translateY(-6px); border-color: var(--gold); background: var(--card-hover); }
.step-num {
  position: absolute; top: 16px; right: 22px;
  font-size: 1.7rem; font-weight: 700;
  color: rgba(201, 162, 39, .3);
  letter-spacing: 1px;
}
.step-card .service-icon { margin-bottom: 22px; }
.step-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.step-card p { color: var(--text-dim); font-size: .98rem; }

/* ============================================================
   TECNOLOGÍAS
   ============================================================ */
.tech-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  max-width: 920px; margin: 0 auto;
}
.tech-badge {
  padding: 11px 22px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem; font-weight: 500;
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
}
.tech-badge:hover { color: var(--gold-light); border-color: var(--gold); background: rgba(201, 162, 39, .1); transform: translateY(-3px); }

/* ============================================================
   CTA FINAL
   ============================================================ */
.cta-final { padding: 10px 0 96px; }
.cta-box {
  text-align: center;
  padding: 64px 32px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 130% at 50% 0%, rgba(201, 162, 39, .16), rgba(201, 162, 39, 0) 60%),
    linear-gradient(160deg, #14120a, #0a0906);
  border: 1px solid var(--border);
}
.cta-box h2 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin-bottom: 16px; }
.cta-box h2 span { color: var(--gold-light); }
.cta-box p { color: var(--text-muted); max-width: 560px; margin: 0 auto 30px; font-size: 1.08rem; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); border-color: var(--gold); box-shadow: none; }

/* ============================================================
   REVEAL al hacer scroll (el JS agrega la clase .reveal)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.25, .8, .3, 1), transform .7s cubic-bezier(.25, .8, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-rotate { transition: none !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .services-layout { padding: 0 24px; justify-content: center; }
  .services-cards { grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; }
  .services-visual { display: none; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-layout { grid-template-columns: 260px 1fr; gap: 30px; }
}

@media (max-width: 860px) {
  /* Píldora con aire lateral; el desplegable se ancla a ella */
  .site-header { left: 12px; right: 12px; }
  .nav { position: relative; padding: 11px 18px; }
  .nav-menu {
    display: none;
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; gap: 16px;
    background: rgba(8, 7, 4, .97);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
  }
  .nav.open .nav-menu { display: flex; }
  .nav-links {
    flex-direction: column; gap: 14px; margin: 0; text-align: center;
  }
  .nav-links a { display: inline-block; padding: 6px 4px; }
  .nav-social {
    justify-content: center; gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
  }
  .nav-toggle { display: grid; place-items: center; margin-left: auto; }

  .about-layout { grid-template-columns: 1fr; gap: 36px; }
  .about-visual { max-width: 420px; margin: 0 auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); margin-top: 50px; }
  .team-grid { grid-template-columns: 1fr; gap: 50px; }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .gallery-layout { grid-template-columns: 1fr; gap: 40px; }
  .gallery-tabs {
    flex-direction: row; flex-wrap: wrap; justify-content: center;
  }
  .gallery-tab { flex: 0 0 auto; }
}

@media (max-width: 560px) {
  .section { padding: 70px 0; }
  .section-title { font-size: clamp(1.5rem, 6.6vw, 1.85rem); margin-bottom: 40px; }
  .services-cards { grid-template-columns: minmax(0, 400px); justify-content: center; }
  .service-card { padding: 30px 22px; }
  /* Portafolio: carrusel deslizable de celulares */
  .portfolio-grid {
    grid-template-columns: none;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 22px;
    padding: 4px 2px 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .portfolio-grid::-webkit-scrollbar { display: none; }
  .app-card { flex: 0 0 70%; scroll-snap-align: center; }
  .app-mockup { max-width: 210px; }
  /* Proceso en una sola columna */
  .process-grid { grid-template-columns: 1fr; }
  .step-card { padding: 32px 24px 26px; }
  /* Tecnologías y CTA */
  .tech-badge { padding: 9px 16px; font-size: .92rem; }
  .cta-box { padding: 44px 22px; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }
  .client-chip { width: 200px; height: 116px; margin-right: 20px; padding: 20px 24px; }
  /* Hero: título en 2 líneas naturales; sin salto por la barra del navegador */
  .hero { padding: 112px 20px 60px; }
  .hero h1 { font-size: clamp(1.7rem, 8.2vw, 2.2rem); letter-spacing: 0; }
  .hero h1 br { display: none; }
  .hero p { font-size: 1.02rem; }
  .about-intro { font-size: 1.02rem; margin-top: -28px; }
  /* Insignia contenida dentro de la foto */
  .about-badge { left: 12px; bottom: 12px; padding: 10px 14px; gap: 10px; max-width: calc(100% - 24px); }
  .about-badge strong { font-size: 1.6rem; }
  .about-badge span { font-size: .8rem; }
  .about-badge span br { display: none; }
  /* Stats compactas para 2 columnas angostas */
  .stats-grid { gap: 14px; }
  .stat-card { padding: 24px 12px 22px; }
  .stat-number { font-size: 1.9rem; }
  .stat-label { font-size: .88rem; }
  .phone { width: 260px; height: 530px; }
  .gallery-arrow { width: 40px; height: 40px; }
  .gallery-arrow svg { width: 30px; height: 30px; }
  .cf-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 26px 18px 24px; }
  .team-card h3 { font-size: clamp(1.25rem, 5.2vw, 1.7rem); }
  /* Botón flotante de WhatsApp + holgura para que no tape el pie ni el formulario */
  .wa-float { width: 52px; height: 52px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .wa-float svg { width: 28px; height: 28px; }
  .site-footer { padding-bottom: 92px; }
  /* Modal más compacto en móvil */
  .modal-header { padding: 16px 18px; }
  .modal-header h3 { font-size: 1.05rem; }
  .modal-body, .modal-footer { padding-left: 18px; padding-right: 18px; }
}
