/* ============================================================
   INTEBAL — Estilos principales
   Tema claro/oscuro · Moderno · Elegante · Industrial
   ============================================================ */

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

:root {
  /* Paleta base */
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  --blue-950: #172554;

  /* Tipografía */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Rajdhani', 'Inter', sans-serif;

  /* Transiciones */
  --t-fast: .2s ease;
  --t-base: .3s ease;
  --t-slow: .6s cubic-bezier(.22, 1, .36, 1);

  /* Layout */
  --container: 1240px;
  --header-h: 76px;

  /* Radios */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
}

/* ---------- TEMA OSCURO (default) ---------- */
[data-theme="dark"] {
  --bg:        #060b18;
  --bg-alt:    #0a1428;
  --bg-card:   #0f1b33;
  --bg-elev:   #13224a;
  --text:      #eaf1ff;
  --text-soft: #a8b8d8;
  --text-mute: #6b7fa3;
  --border:    rgba(96, 165, 250, .16);
  --border-strong: rgba(96, 165, 250, .32);
  --shadow:    0 20px 60px rgba(0, 0, 0, .55);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, .35);
  --grid-line: rgba(96, 165, 250, .07);
  --hero-overlay: linear-gradient(180deg, rgba(6,11,24,.55) 0%, rgba(6,11,24,.88) 60%, rgba(6,11,24,1) 100%);
}

/* ---------- TEMA CLARO ---------- */
[data-theme="light"] {
  --bg:        #f5f8ff;
  --bg-alt:    #eaf1ff;
  --bg-card:   #ffffff;
  --bg-elev:   #ffffff;
  --text:      #0a1428;
  --text-soft: #2a3a5c;
  --text-mute: #5a6b8c;
  --border:    rgba(30, 64, 175, .12);
  --border-strong: rgba(30, 64, 175, .24);
  --shadow:    0 20px 60px rgba(30, 64, 175, .12);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, .2);
  --grid-line: rgba(30, 64, 175, .06);
  --hero-overlay: linear-gradient(180deg, rgba(245,248,255,.55) 0%, rgba(245,248,255,.88) 60%, rgba(245,248,255,1) 100%);
}

/* ---------- BASE ---------- */
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

.text-accent { color: var(--blue-500); }

/* ---------- PRELOADER ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader__spinner { position: relative; width: 80px; height: 80px; }
.preloader__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--blue-500);
  animation: spin 1.2s linear infinite;
}
.preloader__ring:nth-child(2) { inset: 10px; border-top-color: var(--blue-400); animation-duration: 1.6s; animation-direction: reverse; }
.preloader__ring:nth-child(3) { inset: 20px; border-top-color: var(--blue-300); animation-duration: 2s; }
@keyframes spin { to { transform: rotate(360deg); } }
.preloader__text { font-family: var(--font-display); letter-spacing: .3em; font-size: .85rem; color: var(--text-soft); }

/* ---------- SCROLL PROGRESS ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  z-index: 1000;
  box-shadow: 0 0 12px var(--blue-500);
  transition: width .1s linear;
}

/* ---------- HEADER ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: all var(--t-base);
}
.header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: 100%; }

.logo { display: flex; align-items: center; gap: .75rem; }
.logo__img { height: 44px; width: auto; }
.logo__fallback {
  display: none;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.6rem; letter-spacing: .12em;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav__list { display: flex; gap: .25rem; }
.nav__link {
  position: relative; padding: .6rem 1rem; border-radius: var(--r-sm);
  font-weight: 500; font-size: .95rem; color: var(--text-soft);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav__link:hover { color: var(--text); background: var(--border); }
.nav__link.active { color: var(--blue-400); }
.nav__link.active::after {
  content: ''; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  width: 18px; height: 2px; border-radius: 2px; background: var(--blue-500);
  box-shadow: 0 0 8px var(--blue-500);
}

.header__actions { display: flex; align-items: center; gap: .75rem; }

/* Toggle tema */
.theme-toggle {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all var(--t-fast);
}
.theme-toggle:hover { border-color: var(--blue-500); box-shadow: var(--shadow-glow); transform: rotate(15deg); }
.theme-toggle__icon { width: 20px; height: 20px; color: var(--text); position: absolute; transition: all var(--t-base); }
[data-theme="dark"] .theme-toggle__icon--sun  { opacity: 0; transform: scale(.5) rotate(-90deg); }
[data-theme="dark"] .theme-toggle__icon--moon { opacity: 1; transform: scale(1) rotate(0); }
[data-theme="light"] .theme-toggle__icon--sun  { opacity: 1; transform: scale(1) rotate(0); }
[data-theme="light"] .theme-toggle__icon--moon { opacity: 0; transform: scale(.5) rotate(90deg); }

/* Menú móvil */
.menu-toggle { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border-radius: var(--r-sm); }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--t-base); }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.5rem; border-radius: var(--r-md);
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  transition: all var(--t-base); white-space: nowrap; position: relative; overflow: hidden;
}
.btn--primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff; box-shadow: 0 8px 24px rgba(37, 99, 235, .35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(37, 99, 235, .5); }
.btn--primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .7s;
}
.btn--primary:hover::before { transform: translateX(100%); }

.btn--outline { border: 1px solid var(--border-strong); color: var(--text); }
.btn--outline:hover { border-color: var(--blue-500); color: var(--blue-400); background: var(--border); }

.btn--ghost { border: 1px solid var(--border-strong); color: var(--text); backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg-card) 40%, transparent); }
.btn--ghost:hover { border-color: var(--blue-500); color: var(--blue-400); transform: translateY(-2px); }

.btn--whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; box-shadow: 0 8px 24px rgba(37, 211, 102, .3); }
.btn--whatsapp:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(37, 211, 102, .5); }

.btn--lg { padding: 1rem 2rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 5rem;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__img { width: 100%; height: 100%; object-fit: cover; opacity: .35; animation: heroZoom 20s ease-in-out infinite alternate; }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.12); } }
.hero__overlay { position: absolute; inset: 0; background: var(--hero-overlay); }

.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  animation: gridMove 20s linear infinite;
}
@keyframes gridMove { to { background-position: 60px 60px; } }

.hero__particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.particle {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--blue-400); opacity: .5;
  box-shadow: 0 0 12px var(--blue-500);
  animation: floatParticle linear infinite;
}
@keyframes floatParticle {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: .7; }
  90%  { opacity: .7; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.hero__content { position: relative; z-index: 2; max-width: 900px; }

.hero__badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .5rem 1.1rem; border-radius: 999px;
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  border: 1px solid var(--border-strong);
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; color: var(--text-soft);
  backdrop-filter: blur(10px); margin-bottom: 2rem;
}
.hero__badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #25d366; box-shadow: 0 0 12px #25d366; animation: pulseDot 1.6s infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.3); } }

.hero__title {
  font-family: var(--font-display);
  font-weight: 800; line-height: .98; letter-spacing: -.02em;
  font-size: clamp(2.5rem, 8vw, 6rem);
  margin-bottom: 1.5rem;
}
.hero__title-line { display: block; }
.hero__title-line--accent {
  background: linear-gradient(135deg, var(--blue-300) 0%, var(--blue-500) 50%, var(--blue-700) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hero__subtitle { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--text-soft); max-width: 640px; margin-bottom: 2.5rem; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 4rem; }

.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
  padding-top: 2.5rem; border-top: 1px solid var(--border);
}
.hero__stat { display: flex; flex-direction: column; }
.hero__stat-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--blue-400); line-height: 1;
}
.hero__stat-label { font-size: .82rem; color: var(--text-mute); margin-top: .35rem; letter-spacing: .04em; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  color: var(--text-mute); font-size: .72rem; letter-spacing: .25em;
  z-index: 2; transition: color var(--t-base);
}
.hero__scroll:hover { color: var(--blue-400); }
.hero__scroll-mouse {
  width: 26px; height: 42px; border: 2px solid currentColor; border-radius: 14px;
  position: relative;
}
.hero__scroll-mouse::after {
  content: ''; position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  width: 3px; height: 8px; border-radius: 2px; background: currentColor;
  animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 22px; } 100% { opacity: 0; } }

/* ---------- SECCIONES ---------- */
.section { padding: 6rem 0; position: relative; }
.section--alt { background: var(--bg-alt); }

.section__head { max-width: 720px; margin-bottom: 3.5rem; }
.section__tag {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: .85rem; letter-spacing: .2em; color: var(--blue-500);
  margin-bottom: 1rem;
}
.section__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1;
  letter-spacing: -.01em; margin-bottom: 1rem;
}
.section__desc { color: var(--text-soft); font-size: 1.05rem; }

/* ---------- ABOUT ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

.about__media { position: relative; }
.about__img-wrap { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); }
.about__img { width: 100%; height: 520px; object-fit: cover; transition: transform var(--t-slow); }
.about__img-wrap:hover .about__img { transform: scale(1.05); }
.about__img-badge {
  position: absolute; top: 1.5rem; left: 1.5rem;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff; padding: 1rem 1.2rem; border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 12px 32px rgba(37, 99, 235, .4);
}
.about__img-badge-num { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; line-height: 1; }
.about__img-badge-txt { font-size: .7rem; letter-spacing: .2em; }

.about__float-card {
  position: absolute; right: -1.5rem; bottom: 2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 1rem 1.25rem; border-radius: var(--r-md);
  display: flex; align-items: center; gap: .9rem;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
  animation: floatCard 4s ease-in-out infinite;
}
@keyframes floatCard { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.about__float-icon { font-size: 1.6rem; }
.about__float-card strong { display: block; font-size: .9rem; }
.about__float-card span { font-size: .78rem; color: var(--text-mute); }

.about__content .about__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 1.25rem; line-height: 1.2;
}
.about__text { color: var(--text-soft); margin-bottom: 1rem; }
.about__text strong { color: var(--text); }

.about__list { margin: 1.75rem 0; display: grid; gap: .7rem; }
.about__list li { display: flex; align-items: flex-start; gap: .7rem; color: var(--text-soft); font-size: .95rem; }
.about__check {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue-500); color: #fff;
  display: grid; place-items: center; font-size: .75rem; font-weight: 700;
  margin-top: 2px; box-shadow: 0 0 12px rgba(59, 130, 246, .5);
}

.about__cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- SERVICIOS ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.service-card {
  position: relative; padding: 2rem 1.75rem; border-radius: var(--r-lg);
  background: var(--bg-card); border: 1px solid var(--border);
  overflow: hidden; transition: all var(--t-base);
}
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(59, 130, 246, .12), transparent 40%);
  opacity: 0; transition: opacity var(--t-base); pointer-events: none;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }

.service-card__icon {
  width: 54px; height: 54px; border-radius: var(--r-md);
  display: grid; place-items: center; margin-bottom: 1.25rem;
  background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(37,99,235,.05));
  border: 1px solid var(--border-strong); color: var(--blue-400);
  transition: all var(--t-base);
}
.service-card__icon svg { width: 26px; height: 26px; }
.service-card:hover .service-card__icon {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff; transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 8px 24px rgba(37, 99, 235, .4);
}

.service-card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: .6rem; }
.service-card__desc { color: var(--text-soft); font-size: .92rem; line-height: 1.6; }

.service-card__line {
  position: absolute; left: 1.75rem; right: 1.75rem; bottom: 1.25rem;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-500), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-slow);
}
.service-card:hover .service-card__line { transform: scaleX(1); }

/* ---------- GALERÍA ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px; gap: 1rem;
}
.gallery__item {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  cursor: pointer; border: 1px solid var(--border);
  transition: all var(--t-base);
}
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.gallery__item:hover { border-color: var(--blue-500); box-shadow: var(--shadow-glow); }
.gallery__item:hover img { transform: scale(1.08); }

.gallery__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6,11,24,.9) 100%);
  display: flex; align-items: flex-end; padding: 1.25rem;
  opacity: 0; transition: opacity var(--t-base);
}
.gallery__item:hover .gallery__overlay { opacity: 1; }
.gallery__overlay span {
  color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: .95rem; letter-spacing: .04em;
  transform: translateY(10px); transition: transform var(--t-base);
}
.gallery__item:hover .gallery__overlay span { transform: translateY(0); }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin-inline: auto; display: grid; gap: .9rem; }

.faq__item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
  transition: all var(--t-base);
}
.faq__item:hover { border-color: var(--border-strong); }
.faq__item[open] { border-color: var(--blue-500); box-shadow: 0 0 0 1px var(--blue-500), var(--shadow-glow); }

.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1rem; color: var(--text);
  transition: color var(--t-fast);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__item[open] .faq__q { color: var(--blue-400); }

.faq__icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--border); color: var(--text);
  font-size: 1.1rem; font-weight: 400;
  transition: all var(--t-base);
}
.faq__item[open] .faq__icon { background: var(--blue-500); color: #fff; transform: rotate(45deg); }

.faq__a { padding: 0 1.5rem 1.35rem; color: var(--text-soft); font-size: .95rem; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- CONTACTO ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; align-items: start; }

.contact__info { display: grid; gap: 1rem; }
.contact__card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.5rem; border-radius: var(--r-md);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all var(--t-base);
}
.contact__card:not(.contact__card--static):hover { transform: translateX(6px); border-color: var(--blue-500); box-shadow: var(--shadow-glow); }
.contact__card strong { display: block; font-size: .95rem; }
.contact__card span { font-size: .88rem; color: var(--text-soft); }

.contact__icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: var(--r-sm);
  display: grid; place-items: center;
}
.contact__icon svg { width: 22px; height: 22px; }
.contact__icon--wa    { background: rgba(37, 211, 102, .15); color: #25d366; }
.contact__icon--phone { background: rgba(59, 130, 246, .15); color: var(--blue-400); }
.contact__icon--mail  { background: rgba(168, 85, 247, .15); color: #a855f7; }
.contact__icon--clock { background: rgba(245, 158, 11, .15); color: #f59e0b; }

.contact__form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 2rem; box-shadow: var(--shadow);
}
.contact__form-title { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-soft); margin-bottom: .45rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: .85rem 1rem; border-radius: var(--r-sm);
  background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: .95rem;
  transition: all var(--t-fast);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-mute); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
  background: var(--bg-card);
}
.form-group textarea { resize: vertical; min-height: 110px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-note { font-size: .82rem; color: var(--text-mute); text-align: center; margin-top: 1rem; }
.form-note a { color: var(--blue-400); text-decoration: underline; }

/* ---------- FOOTER ---------- */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-top: 4rem; }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-bottom: 3rem; }

.footer__logo {
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem;
  letter-spacing: .12em;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer__tagline { font-size: .85rem; color: var(--blue-400); font-weight: 600; margin: .35rem 0 1rem; letter-spacing: .04em; }
.footer__desc { font-size: .88rem; color: var(--text-soft); max-width: 320px; }

.footer__col h4 { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin-bottom: 1rem; letter-spacing: .04em; }
.footer__col ul { display: grid; gap: .5rem; }
.footer__col li, .footer__col a { font-size: .88rem; color: var(--text-soft); transition: color var(--t-fast); }
.footer__col a:hover { color: var(--blue-400); }

.footer__social { display: flex; gap: .6rem; margin-top: 1.25rem; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-soft); transition: all var(--t-base);
}
.footer__social a:hover { background: var(--blue-500); color: #fff; border-color: var(--blue-500); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.footer__social svg { width: 18px; height: 18px; }

.footer__bottom { border-top: 1px solid var(--border); padding: 1.5rem 0; }
.footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer__bottom p { font-size: .82rem; color: var(--text-mute); }

/* ---------- WHATSAPP FLOTANTE ---------- */
.whatsapp-float {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 800;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 12px 32px rgba(37, 211, 102, .45);
  transition: all var(--t-base);
}
.whatsapp-float:hover { transform: scale(1.1) rotate(8deg); box-shadow: 0 16px 40px rgba(37, 211, 102, .65); }
.whatsapp-float svg { width: 30px; height: 30px; position: relative; z-index: 2; }
.whatsapp-float__pulse {
  position: absolute; inset: 0; border-radius: 50%;
  background: #25d366; opacity: .6;
  animation: waPulse 2s ease-out infinite;
}
@keyframes waPulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--bg-card); border: 1px solid var(--blue-500);
  color: var(--text); padding: 1rem 1.5rem; border-radius: var(--r-md);
  box-shadow: var(--shadow), var(--shadow-glow);
  font-size: .92rem; font-weight: 500; z-index: 1000;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
  max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.22, 1, .36, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVIDAD REFORZADA — Móviles, Tablets y Plegables
   Solo adaptabilidad. Sin cambios de diseño.
   ============================================================ */

/* ---------- AJUSTES BASE PARA MÓVILES ---------- */
@supports (padding: max(0px)) {
  .header__inner,
  .container {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  .whatsapp-float {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .footer__bottom {
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
}

/* Contenedor fluido: nunca pega en bordes en pantallas chicas */
.container {
  width: min(100% - 1.25rem, var(--container));
}

/* Hero con altura real de móvil (evita saltos por barra del navegador) */
.hero {
  min-height: 100svh;
  min-height: 100dvh;
}
@supports not (height: 100svh) {
  .hero { min-height: 100vh; }
}

/* Imágenes y videos siempre contenidos */
img, video, svg { max-width: 100%; height: auto; }
.gallery__item img,
.about__img,
.hero__img { height: 100%; }

/* Evitar desbordes horizontales por animaciones */
body { overflow-x: clip; }
@supports not (overflow: clip) {
  body { overflow-x: hidden; }
}

/* ---------- TABLETS GRANDES (1024px — 1280px) ---------- */
@media (max-width: 1280px) {
  .container { width: min(100% - 2rem, var(--container)); }
  .hero__content { max-width: 100%; }
  .services { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- TABLETS (768px — 1024px) ---------- */
@media (max-width: 1024px) {
  .container { width: min(100% - 1.75rem, var(--container)); }

  .services { grid-template-columns: repeat(2, 1fr); }

  .about { grid-template-columns: 1fr; gap: 2.5rem; }
  .about__img { height: clamp(320px, 50vw, 440px); }
  .about__float-card { right: 1rem; bottom: 1rem; }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: clamp(160px, 22vw, 220px);
  }

  .contact { grid-template-columns: 1fr; gap: 2rem; }
  .contact__info { grid-template-columns: repeat(2, 1fr); }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer__brand { grid-column: 1 / -1; }
  .footer__desc { max-width: 100%; }
}

/* ---------- TABLETS VERTICALES / MÓVILES GRANDES (600px — 768px) ---------- */
@media (max-width: 768px) {
  :root { --header-h: 68px; }

  .container { width: min(100% - 1.5rem, var(--container)); }

  /* --- HEADER --- */
  .header__inner { gap: .5rem; }
  .logo__img { height: 38px; }
  .logo__fallback { font-size: 1.35rem; }

  /* Nav como panel deslizante */
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.25rem 1.75rem;
    transform: translateY(-120%);
    transition: transform var(--t-base);
    box-shadow: var(--shadow);
    z-index: 899;
  }
  .nav.open { transform: translateY(0); }
  .nav__list { flex-direction: column; gap: .25rem; }
  .nav__link {
    display: block;
    padding: .9rem 1rem;
    font-size: 1rem;
    border-radius: var(--r-sm);
  }
  .nav__link.active::after { display: none; }
  .nav__link.active { background: var(--border); }

  .menu-toggle { display: flex; }
  .btn--whatsapp span { display: none; }
  .btn--whatsapp { padding: .75rem; width: 44px; height: 44px; }
  .btn--whatsapp svg { width: 20px; height: 20px; }

  /* --- HERO --- */
  .hero {
    padding: calc(var(--header-h) + 2rem) 0 4rem;
    min-height: auto;
  }
  .hero__badge {
    font-size: .7rem;
    padding: .45rem .9rem;
    letter-spacing: .08em;
    margin-bottom: 1.5rem;
  }
  .hero__title { margin-bottom: 1.25rem; }
  .hero__subtitle { margin-bottom: 2rem; font-size: 1rem; }
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
    margin-bottom: 3rem;
  }
  .hero__actions .btn { width: 100%; }

  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding-top: 2rem;
  }
  .hero__stat-num { font-size: 2rem; }
  .hero__stat-label { font-size: .78rem; }

  .hero__scroll { display: none; }

  /* --- SECCIONES --- */
  .section { padding: 4rem 0; }
  .section__head { margin-bottom: 2.5rem; }
  .section__title { font-size: clamp(1.6rem, 6vw, 2.25rem); }
  .section__desc { font-size: .98rem; }

  /* --- ABOUT --- */
  .about { gap: 2rem; }
  .about__img { height: clamp(260px, 60vw, 380px); }
  .about__img-badge {
    top: 1rem;
    left: 1rem;
    padding: .75rem 1rem;
  }
  .about__img-badge-num { font-size: 1.4rem; }
  .about__img-badge-txt { font-size: .62rem; }
  .about__float-card {
    position: static;
    margin-top: 1rem;
    animation: none;
    width: 100%;
  }
  .about__cta {
    flex-direction: column;
    align-items: stretch;
  }
  .about__cta .btn { width: 100%; }

  /* --- SERVICIOS --- */
  .services { grid-template-columns: 1fr; gap: 1rem; }
  .service-card { padding: 1.75rem 1.5rem; }
  .service-card__line { display: none; }

  /* --- GALERÍA --- */
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: clamp(140px, 32vw, 200px);
    gap: .75rem;
  }
  .gallery__item--wide,
  .gallery__item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  .gallery__overlay { opacity: 1; padding: 1rem; }
  .gallery__overlay span { transform: none; font-size: .85rem; }

  /* --- FAQ --- */
  .faq__q {
    padding: 1.1rem 1.15rem;
    font-size: .95rem;
  }
  .faq__a { padding: 0 1.15rem 1.15rem; font-size: .92rem; }
  .faq__icon { width: 26px; height: 26px; font-size: 1rem; }

  /* --- CONTACTO --- */
  .contact { gap: 2rem; }
  .contact__info { grid-template-columns: 1fr; gap: .75rem; }
  .contact__card { padding: 1.1rem 1.25rem; }
  .contact__form { padding: 1.5rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-group { margin-bottom: 1rem; }

  /* --- FOOTER --- */
  .footer { padding-top: 3rem; }
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
  }
  .footer__brand { grid-column: auto; }
  .footer__bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: .75rem;
  }
  .footer__bottom p { font-size: .78rem; }

  /* --- WHATSAPP FLOTANTE --- */
  .whatsapp-float {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
  }
  .whatsapp-float svg { width: 26px; height: 26px; }

  /* Dejar espacio para que el flotante no tape el botón del form */
  .contact__form { margin-bottom: 4.5rem; }

  /* --- TOAST --- */
  .toast {
    bottom: max(5rem, calc(env(safe-area-inset-bottom) + 5rem));
    left: 1rem;
    right: 1rem;
    transform: translateY(120%);
    max-width: none;
  }
  .toast.show { transform: translateY(0); }
}

/* ---------- MÓVILES (400px — 600px) ---------- */
@media (max-width: 600px) {
  .container { width: min(100% - 1.25rem, var(--container)); }

  .logo__img { height: 34px; }
  .logo__fallback { font-size: 1.2rem; letter-spacing: .08em; }

  .hero__badge {
    font-size: .65rem;
    letter-spacing: .05em;
    padding: .4rem .75rem;
  }
  .hero__title { font-size: clamp(2rem, 10vw, 3rem); }
  .hero__subtitle { font-size: .95rem; }

  .hero__stat-num { font-size: 1.75rem; }
  .hero__stat-label { font-size: .72rem; }

  .section { padding: 3.25rem 0; }
  .section__title { font-size: clamp(1.5rem, 7vw, 2rem); }

  .about__img { height: clamp(220px, 65vw, 320px); }

  .service-card { padding: 1.5rem 1.25rem; }
  .service-card__icon { width: 48px; height: 48px; }
  .service-card__icon svg { width: 22px; height: 22px; }
  .service-card__title { font-size: 1.1rem; }

  .contact__form { padding: 1.25rem 1rem; }
  .contact__form-title { font-size: 1.2rem; }

  .footer__logo { font-size: 1.4rem; }

  .whatsapp-float { width: 52px; height: 52px; }
  .whatsapp-float svg { width: 24px; height: 24px; }
}

/* ---------- MÓVILES PEQUEÑOS (320px — 400px) ---------- */
@media (max-width: 400px) {
  .container { width: min(100% - 1rem, var(--container)); }

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

  .logo__img { height: 30px; }
  .logo__fallback { font-size: 1.05rem; }

  .theme-toggle { width: 40px; height: 40px; }
  .theme-toggle__icon { width: 17px; height: 17px; }
  .menu-toggle { width: 40px; height: 40px; }
  .btn--whatsapp { width: 40px; height: 40px; padding: .5rem; }

  .hero { padding: calc(var(--header-h) + 1.5rem) 0 3rem; }
  .hero__title { font-size: clamp(1.75rem, 11vw, 2.5rem); }
  .hero__badge { font-size: .6rem; padding: .35rem .65rem; }

  .hero__stats { gap: 1rem; }
  .hero__stat-num { font-size: 1.5rem; }
  .hero__stat-label { font-size: .68rem; }

  .section { padding: 2.75rem 0; }
  .section__title { font-size: clamp(1.35rem, 8vw, 1.75rem); }

  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: clamp(180px, 60vw, 240px);
  }

  .about__img-badge { padding: .6rem .8rem; }
  .about__img-badge-num { font-size: 1.2rem; }

  .faq__q { padding: 1rem; font-size: .9rem; }
  .faq__a { padding: 0 1rem 1rem; font-size: .88rem; }

  .contact__card { padding: 1rem; gap: .75rem; }
  .contact__icon { width: 42px; height: 42px; }
  .contact__icon svg { width: 20px; height: 20px; }
  .contact__card strong { font-size: .9rem; }
  .contact__card span { font-size: .82rem; }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* evita zoom automático en iOS */
    padding: .75rem .85rem;
  }

  .footer__social a { width: 38px; height: 38px; }
}

/* ---------- MÓVILES MUY PEQUEÑOS (<320px) ---------- */
@media (max-width: 320px) {
  .hero__stat-num { font-size: 1.3rem; }
  .hero__stat-label { font-size: .62rem; }
  .section__title { font-size: 1.3rem; }
  .footer__social a { width: 34px; height: 34px; }
}

/* ---------- TABLETS EN HORIZONTAL (altura reducida) ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 1.5rem) 0 2.5rem;
  }
  .hero__scroll { display: none; }
  .hero__title { font-size: clamp(1.75rem, 5vw, 2.5rem); }
  .hero__subtitle { margin-bottom: 1.5rem; }
  .hero__actions { margin-bottom: 2rem; }
  .nav { max-height: calc(100dvh - var(--header-h)); }
}

/* ---------- PANTALLAS PLEGABLES (Galaxy Fold, etc.) ---------- */
@media (max-width: 280px) {
  .container { width: min(100% - .75rem, var(--container)); }
  .logo__fallback { font-size: .95rem; letter-spacing: .04em; }
  .hero__title { font-size: 1.5rem; }
  .hero__stats { grid-template-columns: 1fr; }
  .theme-toggle { width: 36px; height: 36px; }
  .menu-toggle { width: 36px; height: 36px; }
  .btn--whatsapp { width: 36px; height: 36px; }
}

/* ---------- PREFERENCIAS DE ACCESIBILIDAD ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero__particles { display: none; }
}

/* ---------- MODO AHORRO DE DATOS / CONEXIÓN LENTA ---------- */
@media (prefers-reduced-data: reduce) {
  .hero__particles { display: none; }
  .hero__img { display: none; }
  .hero__bg { background: var(--hero-overlay); }
}

/* ---------- HOVER SOLO EN DISPOSITIVOS CON CURSOR ---------- */
@media (hover: none) {
  .service-card:hover { transform: none; }
  .gallery__item:hover img { transform: none; }
  .btn:hover { transform: none; }
  .whatsapp-float:hover { transform: none; }
  .footer__social a:hover { transform: none; }
  .contact__card:not(.contact__card--static):hover { transform: none; }
  /* Mantener feedback táctil sutil */
  .service-card:active { transform: scale(.98); }
  .btn:active { transform: scale(.97); }
  .gallery__item:active img { transform: scale(1.03); }
}

/* ---------- TOUCH TARGETS MÍNIMOS (44x44 recomendado por Apple/Google) ---------- */
@media (pointer: coarse) {
  .nav__link { min-height: 44px; display: flex; align-items: center; }
  .theme-toggle,
  .menu-toggle,
  .btn,
  .footer__social a,
  .whatsapp-float,
  .faq__q { min-height: 44px; }
  .faq__q { padding-top: 1.1rem; padding-bottom: 1.1rem; }
}

/* ---------- IMPRESIÓN ---------- */
@media print {
  .header, .whatsapp-float, .hero__particles,
  .hero__scroll, .scroll-progress, .preloader { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 1rem 0; page-break-inside: avoid; }
}

/* ---------- PREFERENCIAS ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}