/* assets/css/styles.css */

/* =========================
   Fuentes locales (assets/fonts)
   ========================= */
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   RedBite — Versión Profesional + Bubble Menu Móvil (PHP + assets)
   ========================================================= */

:root {
  --bg: #03030A;
  --bg-surface: #0C0C18;
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.55);
  --stroke-light: rgba(255, 255, 255, 0.08);
  --stroke-medium: rgba(255, 255, 255, 0.12);
  --stroke-strong: rgba(255, 255, 255, 0.18);
  --accent: #FF3B3B;
  --accent-glow: rgba(255, 59, 59, 0.4);
  --accent-soft: rgba(255, 59, 59, 0.15);
  --panel-bg: rgba(20, 20, 30, 0.6);
  --shadow-heavy: 0 30px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 59, 59, 0.15) inset;
  --shadow-lift: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  --radius-card: 24px;
  --radius-element: 16px;
  --container: 1280px;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
    monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 350;
  letter-spacing: -0.01em;
}

/* Tipografía refinada */
h1,
h2,
h3,
h4,
.h1,
.h2,
.h3 {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h1,
.h1 {
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 700;
}

h2,
.h2 {
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  font-weight: 650;
}

h3,
.h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

.accent {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}
.muted {
  color: var(--text-muted);
  font-weight: 400;
}

.container {
  width: min(var(--container), calc(100% - 4rem));
  margin: 0 auto;
}

/* =========================
   SVG icons (sprite)
   ========================= */
.ico {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  fill: currentColor;
}
.ico-lg {
  width: 34px;
  height: 34px;
}

.brand-logo {
  height: 26px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 18px rgba(255, 59, 59, 0.12));
}

/* =========================
   Fondo dinámico
   ========================= */
.bg-kinetic {
  position: fixed;
  inset: -50%;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(
        circle at 30% 40%,
        rgba(255, 59, 59, 0.12) 0%,
        transparent 30%
      ),
    radial-gradient(
        circle at 80% 70%,
        rgba(255, 100, 100, 0.08) 0%,
        transparent 35%
      ),
    radial-gradient(
        circle at 10% 80%,
        rgba(200, 200, 255, 0.03) 0%,
        transparent 40%
      ),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.01) 0px,
      rgba(255, 255, 255, 0.01) 2px,
      transparent 2px,
      transparent 8px
    );
  animation: bgWarp 40s linear infinite alternate;
}

@keyframes bgWarp {
  0% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    transform: scale(1.3) rotate(3deg);
  }
}

.bg-noise-advanced {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.2;
  mix-blend-mode: soft-light;
  background-image: url("../img/noise.svg");
  animation: noisePan 3s steps(2) infinite;
}

@keyframes noisePan {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-2%, -1%);
  }
}

/* =========================
   NAV
   ========================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(5, 5, 15, 0.7);
  border-bottom: 1px solid var(--stroke-medium);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
}

.brand-dot {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255, 59, 59, 0.2), 0 0 30px var(--accent);
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.9);
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link .ico {
  color: var(--accent);
}

.nav-link:hover {
  background: var(--accent-soft);
  color: white;
  transform: translateY(-1px);
}

.nav-link.active {
  background: rgba(255, 59, 59, 0.2);
  color: white;
  border: 1px solid rgba(255, 59, 59, 0.3);
}

.nav-cta {
  background: var(--accent);
  color: white !important;
  padding: 0.6rem 1.8rem !important;
  border-radius: 40px;
  font-weight: 600;
  margin-left: 0.5rem;
  box-shadow: 0 10px 20px -8px rgba(255, 59, 59, 0.4);
}

.nav-cta .ico {
  color: white;
}

.nav-cta:hover {
  background: #ff4f4f;
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -10px var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--stroke-medium);
  border-radius: 40px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  margin: 5px auto;
  transition: 0.2s;
}

/* =========================================================
   BUBBLE MENU (SOLO MÓVIL) — flotante tipo “burbujas”
   ========================================================= */

.bubble-nav { display: none; }

@media (max-width: 768px) {
  /* En móvil: apagamos hamburguesa + menú normal (bubble reemplaza) */
  .menu-toggle { display: none !important; }
  .nav-links { display: none !important; }

  .bubble-nav{
    display: block;
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 9998;
    pointer-events: none; /* clicks solo en hijos */
  }

  .bubble-fab{
    pointer-events: auto;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(10,10,18,.65);
    backdrop-filter: blur(18px) saturate(180%);
    display: grid;
    place-items: center;
    cursor: pointer;
    position: relative;
    box-shadow:
      0 18px 35px -18px rgba(0,0,0,.75),
      0 0 0 1px rgba(255,59,59,.12) inset;
    transition: transform .2s ease, border-color .2s ease;
  }

  .bubble-fab .ico{
    width: 22px;
    height: 22px;
    color: white;
  }

  .bubble-fab-ring{
    position: absolute;
    inset: -10px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255,59,59,.22), transparent 62%);
    filter: blur(2px);
    opacity: .85;
    pointer-events: none;
    animation: bubblePulse 2.2s ease-in-out infinite;
  }

  @keyframes bubblePulse{
    0%,100% { transform: scale(.98); opacity: .75; }
    50%     { transform: scale(1.06); opacity: 1; }
  }

  .bubble-menu{
    pointer-events: none;
    position: absolute;
    right: 0;
    bottom: 74px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    transform-origin: bottom right;
  }

  .bubble-item{
    pointer-events: auto;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(14,14,22,.72);
    backdrop-filter: blur(18px) saturate(180%);
    display: grid;
    place-items: center;
    text-decoration: none;

    transform: translateY(10px) scale(.88);
    opacity: 0;
    filter: blur(2px);
    transition:
      transform .25s cubic-bezier(.2,.9,.25,1.2),
      opacity .22s ease,
      filter .22s ease,
      border-color .22s ease;
    box-shadow: 0 18px 40px -22px rgba(0,0,0,.75);
  }

  .bubble-icon .ico{
    width: 22px;
    height: 22px;
    color: var(--accent);
    filter: drop-shadow(0 0 14px rgba(255,59,59,.25));
  }

  .bubble-item:hover{
    border-color: rgba(255,59,59,.55);
    transform: translateY(0) scale(1.02);
  }

  .bubble-item-cta{
    background: rgba(255,59,59,.18);
    border-color: rgba(255,59,59,.45);
  }
  .bubble-item-cta .ico{ color: white; }

  .bubble-nav.is-open .bubble-menu{ pointer-events: auto; }
  .bubble-nav.is-open .bubble-item{
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }

  .bubble-nav.is-open .bubble-item:nth-child(1){ transition-delay: 0ms; }
  .bubble-nav.is-open .bubble-item:nth-child(2){ transition-delay: 25ms; }
  .bubble-nav.is-open .bubble-item:nth-child(3){ transition-delay: 50ms; }
  .bubble-nav.is-open .bubble-item:nth-child(4){ transition-delay: 75ms; }
  .bubble-nav.is-open .bubble-item:nth-child(5){ transition-delay: 100ms; }
  .bubble-nav.is-open .bubble-item:nth-child(6){ transition-delay: 125ms; }
  .bubble-nav.is-open .bubble-item:nth-child(7){ transition-delay: 150ms; }

  .bubble-nav.is-open .bubble-fab{
    transform: translateY(-2px) scale(1.03);
    border-color: rgba(255,59,59,.55);
  }
}

/* =========================
   HERO
   ========================= */
.hero {
  min-height: 95vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 2rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-pre {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
  font-weight: 600;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 50ch;
  margin: 1.5rem 0;
  line-height: 1.6;
  font-weight: 350;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: -0.01em;
  color: white;
}

.btn .ico {
  width: 18px;
  height: 18px;
  color: currentColor;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 15px 25px -10px rgba(255, 59, 59, 0.5);
}

.btn-primary:hover {
  background: #ff5252;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 25px 35px -12px var(--accent);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--stroke-strong);
  color: white;
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border-radius: 40px;
  border: 1px solid var(--stroke-medium);
  box-shadow: var(--shadow-heavy);
  overflow: hidden;
  position: relative;
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
  transition: transform 0.4s ease;
}

.hero-panel:hover {
  transform: perspective(1000px) rotateY(-3deg) rotateX(1deg) translateY(-5px);
}

.panel-header {
  padding: 1.5rem 1.8rem;
  border-bottom: 1px solid var(--stroke-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.led {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent);
  animation: flicker 1.5s infinite;
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.panel-content {
  padding: 2rem;
}

.terminal-window {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 24px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border: 1px solid var(--stroke-light);
  margin-bottom: 1.8rem;
}

.terminal-line {
  display: flex;
  gap: 1rem;
  color: var(--text-secondary);
  line-height: 2;
}
.terminal-prompt {
  color: var(--accent);
  font-weight: 600;
}
.terminal-output {
  color: white;
}

.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke-light);
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
}

.chip:hover {
  border-color: var(--accent);
  color: white;
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.scroll-indicator span {
  width: 26px;
  height: 42px;
  border: 2px solid var(--stroke-strong);
  border-radius: 30px;
  position: relative;
}

.scroll-indicator span::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 8px;
  background: var(--accent);
  left: 50%;
  transform: translateX(-50%);
  top: 6px;
  border-radius: 4px;
  animation: scrollBounce 1.8s infinite;
}

@keyframes scrollBounce {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  80% {
    transform: translateX(-50%) translateY(15px);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0;
  }
}

/* =========================
   Secciones
   ========================= */
.section {
  padding: 6rem 0;
  position: relative;

  /* ✅ evita que el sticky navbar tape títulos al navegar por #anclas */
  scroll-margin-top: 92px;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header h2 {
  margin-bottom: 1rem;
}
.section-header p {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--text-secondary);
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.logo-container {
  background: var(--panel-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--stroke-medium);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.about-logo {
  width: min(340px, 80%);
  height: auto;
  z-index: 2;
}

.logo-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1.2);
  }
}

.mv-card {
  background: var(--panel-bg);
  border: 1px solid var(--stroke-light);
  border-radius: var(--radius-card);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: 0.3s;
}

.mv-card:hover {
  border-color: var(--accent);
  transform: translateX(8px);
}

/* Servicios */
.service-card {
  background: var(--panel-bg);
  border: 1px solid var(--stroke-light);
  border-radius: var(--radius-card);
  padding: 2rem;
  transition: 0.3s;
  height: 100%;
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--accent-soft);
  border-radius: 20px;
  color: var(--accent);
}

.service-card h3 {
  margin-bottom: 1rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.service-tags span {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke-light);
  padding: 0.3rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
}

/* Metodología */
.phases-container {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
}

.phase-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.phase-number {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  box-shadow: 0 15px 30px -8px var(--accent);
}

.phase-step p {
  color: var(--text-secondary);
}

.phase-connector {
  position: absolute;
  top: 30px;
  right: -50%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* =========================
   GALERÍA (3 fotos)
   ========================= */

.gallery-grid.gallery-3 {
  max-width: 760px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.gallery-item {
  margin: 0;
}

.gallery-item.big {
  grid-column: 1 / -1;
}

.gallery-link {
  position: relative;
  display: block;

  background: #ffffff;
  border: 4px solid #000000;
  border-radius: 0;
  overflow: hidden;

  transform: none;
  box-shadow: none;

  transition: border-color 0.2s ease;
}

.gallery-item.big .gallery-link {
  aspect-ratio: 16 / 9;
}
.gallery-item:not(.big) .gallery-link {
  aspect-ratio: 16 / 10;
}

.gallery-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gallery-link:hover {
  border-color: var(--accent);
}

.gallery-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;

  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.gallery-caption {
  margin-top: 10px;
  font-size: 0.95rem;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .gallery-grid.gallery-3 {
    max-width: 560px;
    grid-template-columns: 1fr;
  }
  .gallery-item.big {
    grid-column: auto;
  }
  .gallery-item.big .gallery-link {
    aspect-ratio: 16 / 10;
  }
}

/* =========================
   Mapa
   ========================= */
.map-container {
  background: linear-gradient(145deg, #1a1a2a, #0a0a14);
  border-radius: var(--radius-card);
  border: 1px solid var(--stroke-medium);
  height: 400px;
  position: relative;
  overflow: hidden;
}

.map-overlay {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  padding: 1.5rem;
  border-radius: var(--radius-element);
  border: 1px solid var(--stroke-light);
}

/* Contacto */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-info {
  background: var(--panel-bg);
  border-radius: var(--radius-card);
  padding: 2.5rem;
  border: 1px solid var(--stroke-medium);
}

.contact-item {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--stroke-light);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-icon {
  background: var(--accent-soft);
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  color: var(--accent);
}

.contact-icon .ico {
  width: 22px;
  height: 22px;
}

/* Form */
.form {
  background: var(--panel-bg);
  border-radius: var(--radius-card);
  padding: 2.5rem;
  border: 1px solid var(--stroke-medium);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-control,
.form-select {
  width: 100%;
  padding: 1.2rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--stroke-light);
  border-radius: 50px;
  color: white;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: 0.2s;
  appearance: none;
}

.form-select {
  background-image: url("../icons/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 1.5rem center;
  background-size: 16px;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-control {
  border-radius: 30px;
  min-height: 150px;
  resize: vertical;
}

.form-note {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.note-ok {
  color: rgba(255, 255, 255, 0.85);
}
.note-err {
  color: var(--accent);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--stroke-light);
  margin-top: 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Animaciones */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ✅ Bloquear scroll cuando el visor está abierto */
.no-scroll {
  overflow: hidden;
}

/* =========================
   LIGHTBOX / VISOR
   ========================= */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.lightbox.is-open {
  display: block;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.lightbox-panel {
  position: relative;
  max-width: min(980px, 92vw);
  max-height: 88vh;
  margin: 6vh auto 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(14, 14, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
}

.lightbox-media {
  width: 100%;
  height: calc(88vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}

.lightbox-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.lightbox-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-caption {
  font-size: 0.95rem;
  opacity: 0.9;
}

.lightbox-open {
  font-size: 0.9rem;
  opacity: 0.9;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .phases-container {
    flex-direction: column;
    gap: 2rem;
  }
  .phase-connector {
    display: none;
  }
}

@media (max-width: 768px) {
  .container{
    width: min(var(--container), calc(100% - 2rem));
  }

  /* ✅ FIX CLAVE: en celular, las secciones .grid-2 ya no quedan en 2 columnas */
  .grid-2{
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 2rem;
  }

  .hero {
    min-height: auto;
    padding: 2.5rem 0 4rem;
  }

  .hero-panel {
    transform: none;
  }
  .hero-panel:hover {
    transform: translateY(-5px);
  }

  .hero-description{
    max-width: 100%;
    font-size: 1.05rem;
  }

  .btn{
    width: 100%;
    padding: .95rem 1.2rem;
  }

  .stats{
    flex-wrap: wrap;
    gap: 1.2rem;
  }

  .panel-content{ padding: 1.4rem; }
  .terminal-window{ padding: 1.1rem; }

  .section{
    padding: 4.5rem 0;
    scroll-margin-top: 72px; /* mejor para el sticky en móvil */
  }

  .section-header{
    margin-bottom: 2.5rem;
  }

  .logo-container{
    min-height: 300px;
    padding: 2rem;
  }

  .contact-info,
  .form{
    padding: 1.6rem;
  }

  /* Afinado visual cards en móvil */
  .service-card{
    padding: 1.6rem;
  }
  .service-tags span{
    font-size: .78rem;
    padding: .28rem .9rem;
  }

  .footer-content{
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Extra: celulares muy chicos */
@media (max-width: 420px){
  .service-card{
    padding: 1.35rem;
    border-radius: 20px;
  }
}
