/* ============================================================
   ConlySmart · styles.css
   Mobile-first · Dark theme · Glassmorphism · Sin dependencias
   ============================================================ */

/* ---------- Fuente (alojada en el propio servidor, sin Google Fonts) ---------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('fonts/inter-latin-v1.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Variables ---------- */
:root {
  --bg: #0a0a0f;
  --bg-alt: #0d0d16;
  --surface: #12121c;
  --surface-2: #1e293b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --blue: #3b82f6;
  --violet: #8b5cf6;
  --cyan: #38bdf8;

  --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --shadow-blue: 0 12px 32px -8px rgba(59, 130, 246, 0.45);
  --shadow-card: 0 8px 30px -12px rgba(0, 0, 0, 0.6);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1160px;
  --nav-h: 68px;

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

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 760px; }

.section { padding: 72px 0; }
.section--alt { background: rgba(13, 13, 22, 0.55); }

.section__head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section__eyebrow {
  display: inline-block; font-weight: 800; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 12px;
}
.section__title { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 12px; }
.section__lead { color: var(--text-muted); font-size: 1.05rem; }

/* ============================================================
   Botones
============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 800;
  font-size: 0.95rem; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  will-change: transform;
}
.btn--lg { padding: 15px 30px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 20px -8px rgba(59,130,246,0.6); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-blue); }

.btn--outline { border: 1px solid var(--border-strong); color: var(--text); background: rgba(255,255,255,0.02); }
.btn--outline:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 8px 24px -12px rgba(59,130,246,0.5); }

/* ============================================================
   Logo
============================================================ */
.logo-mark { flex-shrink: 0; }
.logo-word { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.logo-word__conly { color: var(--text); }
.logo-word__smart { color: var(--blue); }

/* ============================================================
   Navbar (glassmorphism)
============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px -18px rgba(0,0,0,0.9);
}
.navbar__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.navbar__logo { display: flex; align-items: center; gap: 10px; }

.navbar__nav { display: flex; align-items: center; gap: 24px; }
.navbar__link { color: var(--text-muted); font-weight: 400; font-size: 0.95rem; transition: color 0.2s; position: relative; }
.navbar__link::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--gradient); transition: width 0.25s var(--ease);
}
.navbar__link:hover { color: var(--text); }
.navbar__link:hover::after { width: 100%; }

.lang-switch { display: flex; gap: 2px; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 3px; }
.lang-switch__btn { font-size: 0.78rem; font-weight: 800; padding: 4px 9px; border-radius: 6px; color: var(--text-dim); transition: all 0.2s; }
.lang-switch__btn.is-active { background: var(--blue); color: #fff; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 1100; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero
============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 60px; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__mesh { width: 100%; height: 100%; }

.hero__content { position: relative; z-index: 1; max-width: 820px; text-align: center; margin: 0 auto; }
.hero__badge {
  display: inline-block; font-size: 0.85rem; font-weight: 800;
  padding: 7px 16px; border-radius: 100px; margin-bottom: 24px;
  background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.35); color: var(--cyan);
}
.hero__title { font-size: clamp(2rem, 6vw, 3.6rem); margin-bottom: 20px; }
.hero__subtitle { font-size: clamp(1.05rem, 2.5vw, 1.3rem); color: var(--text-muted); max-width: 640px; margin: 0 auto 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ============================================================
   Grids & Cards
============================================================ */
.grid { display: grid; gap: 20px; }
.grid--services { grid-template-columns: 1fr; }
.grid--projects { grid-template-columns: 1fr; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card--service:hover, .card--project:hover {
  transform: translateY(-6px);
  border-color: rgba(59,130,246,0.4);
  box-shadow: 0 20px 40px -16px rgba(59,130,246,0.35);
}
.card__icon {
  width: 54px; height: 54px; border-radius: 14px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(59,130,246,0.12); color: var(--cyan);
  border: 1px solid rgba(59,130,246,0.25);
}
.card__title { font-size: 1.2rem; margin-bottom: 8px; }
.card__text { color: var(--text-muted); font-size: 0.96rem; }

/* Proyectos */
.card--project { display: flex; flex-direction: column; position: relative; }
.card__link { margin-top: 16px; font-weight: 800; color: var(--cyan); font-size: 0.92rem; }
.card__link--soon { color: var(--text-dim); }
.card--project[aria-disabled="true"] { opacity: 0.72; cursor: default; }
.card--cta { background: linear-gradient(135deg, rgba(59,130,246,0.14), rgba(139,92,246,0.14)); border-color: rgba(139,92,246,0.4); }

.tag {
  align-self: flex-start; font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 100px; margin-bottom: 14px;
  background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border);
}
.tag--webpwa { background: rgba(59,130,246,0.15); color: var(--blue); border-color: rgba(59,130,246,0.4); }
.tag--pwa { background: rgba(139,92,246,0.15); color: var(--violet); border-color: rgba(139,92,246,0.4); }
.tag--accent { background: rgba(56,189,248,0.15); color: var(--cyan); border-color: rgba(56,189,248,0.4); }

/* ============================================================
   Timeline / Proceso
============================================================ */
.timeline { display: grid; gap: 20px; grid-template-columns: 1fr; position: relative; }
.timeline__step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; position: relative;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.timeline__step:hover { transform: translateY(-4px); border-color: rgba(139,92,246,0.4); }
.timeline__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 14px;
  font-weight: 800; font-size: 1.1rem; color: #fff; background: var(--gradient);
  box-shadow: 0 8px 20px -8px rgba(59,130,246,0.6);
}
.timeline__title { font-size: 1.1rem; margin-bottom: 6px; }
.timeline__text { color: var(--text-muted); font-size: 0.95rem; }

/* ============================================================
   Formulario
============================================================ */
.form { display: flex; flex-direction: column; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr; gap: 18px; }
.form__group { display: flex; flex-direction: column; gap: 7px; }
.form__label { font-size: 0.9rem; font-weight: 800; color: var(--text); }
.req { color: var(--violet); }

.form__input {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 15px;
  color: var(--text); font-size: 0.98rem; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form__input::placeholder { color: var(--text-dim); }
.form__input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2); background: #14141f;
}
.form__textarea { resize: vertical; min-height: 120px; }
select.form__input { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}

.form__group--check { flex-direction: row; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.form__check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; color: var(--text-muted); cursor: pointer; }
.form__check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.form__check a { color: var(--cyan); text-decoration: underline; }

.form__error { font-size: 0.82rem; color: #f87171; min-height: 0; display: none; }
.form__error.is-visible { display: block; }
.form__input.is-invalid { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,0.15); }

.form__feedback { font-size: 0.98rem; font-weight: 800; text-align: center; padding: 4px; border-radius: 10px; display: none; }
.form__feedback.is-success { display: block; color: #34d399; }
.form__feedback.is-error { display: block; color: #f87171; }

/* ============================================================
   Footer
============================================================ */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 56px 0 24px; }
.footer__inner { display: grid; grid-template-columns: 1fr; gap: 32px; }
.footer__brand .logo-word { font-size: 1.15rem; }
.footer__tagline { color: var(--text-dim); font-size: 0.88rem; margin: 12px 0 6px; }
.footer__email a { color: var(--cyan); font-weight: 800; font-size: 0.95rem; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__heading { font-size: 0.95rem; margin-bottom: 4px; }
.footer__col a { color: var(--text-muted); font-size: 0.92rem; transition: color 0.2s; }
.footer__col a:hover { color: var(--cyan); }
.footer__bottom { text-align: center; color: var(--text-dim); font-size: 0.85rem; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }

/* ============================================================
   Scroll-to-top
============================================================ */
.scroll-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-blue);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-3px); }

/* ============================================================
   Animaciones (fade-in via Intersection Observer)
============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { opacity: 0; }
.fade-in.is-visible { animation: fadeInUp 0.7s var(--ease) forwards; }

/* Escalonado para hijos de un grid/timeline */
.grid .fade-in.is-visible:nth-child(2) { animation-delay: 0.08s; }
.grid .fade-in.is-visible:nth-child(3) { animation-delay: 0.16s; }
.grid .fade-in.is-visible:nth-child(4) { animation-delay: 0.24s; }
.grid .fade-in.is-visible:nth-child(5) { animation-delay: 0.32s; }
.grid .fade-in.is-visible:nth-child(6) { animation-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .fade-in { opacity: 1; }
}

/* ============================================================
   Legal pages
============================================================ */
.legal { padding: calc(var(--nav-h) + 50px) 0 70px; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 8px; }
.legal .legal__updated { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 32px; }
.legal h2 { font-size: 1.3rem; margin: 32px 0 12px; color: var(--text); }
.legal h3 { font-size: 1.08rem; margin: 20px 0 8px; }
.legal p, .legal li { color: var(--text-muted); margin-bottom: 12px; }
.legal ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.legal a { color: var(--cyan); text-decoration: underline; }

/* ============================================================
   Scrollbar personalizado
============================================================ */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 100px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #334155; }
* { scrollbar-width: thin; scrollbar-color: #1e293b var(--bg); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color 0.25s var(--ease); }
.faq__item[open] { border-color: rgba(59, 130, 246, 0.45); }
.faq__q { list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 800; position: relative; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--cyan); font-size: 1.4rem; line-height: 1; }
.faq__item[open] .faq__q::after { content: '−'; }
.faq__a { padding: 0 20px 20px; color: var(--text-muted); }
.footer__admin { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }
.footer__admin:hover { color: var(--cyan); }

/* ============================================================
   Fondo de red interactiva + efectos visuales (v4)
============================================================ */
.net-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }
.footer { background: rgba(13, 13, 22, 0.75); }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 1200;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
  transform-origin: 0 50%; transform: scaleX(0);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

/* Texto con degradado animado */
.text-gradient {
  background: linear-gradient(90deg, #38bdf8, #3b82f6, #8b5cf6, #38bdf8);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradientShift 8s linear infinite;
}
@keyframes gradientShift { to { background-position: 300% 0; } }

/* Punto pulsante en el badge */
.hero__badge { display: inline-flex; align-items: center; gap: 10px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); position: relative; flex-shrink: 0; }
.pulse-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--cyan);
  animation: pulseRing 2s var(--ease) infinite;
}
@keyframes pulseRing { from { transform: scale(1); opacity: 0.7; } to { transform: scale(3.2); opacity: 0; } }

/* Halos del hero flotando */
.glow { transform-box: fill-box; transform-origin: center; }
.glow--a { animation: floatA 14s ease-in-out infinite alternate; }
.glow--b { animation: floatB 18s ease-in-out infinite alternate; }
@keyframes floatA { to { transform: translate(90px, 60px) scale(1.12); } }
@keyframes floatB { to { transform: translate(-110px, -50px) scale(0.92); } }

/* Brillo que recorre el botón principal */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg); transition: left 0.7s var(--ease);
}
.btn--primary:hover::after { left: 140%; }

/* Foco de luz que sigue al ratón dentro de las tarjetas */
.card, .timeline__step, .faq__item { position: relative; }
.card::before, .timeline__step::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(56, 189, 248, 0.10), transparent 60%);
  opacity: 0; transition: opacity 0.35s var(--ease); z-index: 0;
}
.card:hover::before, .timeline__step:hover::before { opacity: 1; }
.card > *, .timeline__step > * { position: relative; z-index: 1; }
.card--service:hover .card__icon { transform: translateY(-4px) rotate(-6deg); box-shadow: 0 10px 24px -10px rgba(56,189,248,0.6); }
.card__icon { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }

/* Tarjetas de proyecto con captura */
.grid > * { min-width: 0; }
.card--project { will-change: transform; }
.card__media {
  margin: -26px -26px 20px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
  background: #0d1220; border-bottom: 1px solid var(--border); position: relative;
}
.browser-bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  background: rgba(255,255,255,0.04); border-bottom: 1px solid var(--border);
}
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #334155; }
.browser-bar i:nth-child(1) { background: #f87171; }
.browser-bar i:nth-child(2) { background: #fbbf24; }
.browser-bar i:nth-child(3) { background: #34d399; }
.browser-bar em {
  font-style: normal; font-size: 0.72rem; color: var(--text-dim); margin-left: 8px;
  padding: 2px 10px; border-radius: 6px; background: rgba(255,255,255,0.04);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__media img {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  transition: transform 1.2s var(--ease);
}
.card--project:hover .card__media img { transform: scale(1.06); }
.card__media::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; pointer-events: none;
  background: linear-gradient(to top, rgba(18,18,28,0.55), transparent);
}
.media-badge {
  position: absolute; top: 46px; right: 12px; z-index: 2;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: #e0f2fe; padding: 5px 11px; border-radius: 100px;
  background: rgba(10,10,15,0.72); border: 1px solid rgba(56,189,248,0.45); backdrop-filter: blur(6px);
}
.soon-art {
  aspect-ratio: 16 / 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background-size: 200% 200%; animation: softPan 10s ease-in-out infinite alternate;
}
.card__media--sqin .soon-art { background-image: linear-gradient(135deg, #0f2b2b, #1b1f3a 50%, #2a1838); }
.card__media--tia .soon-art { background-image: linear-gradient(135deg, #1b1740, #10233f 50%, #0d2d3a); }
.soon-art__name { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; color: rgba(241,245,249,0.9); }
.soon-art__label {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); padding: 4px 12px; border-radius: 100px; border: 1px solid rgba(56,189,248,0.35);
}
@keyframes softPan { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

/* Línea del proceso que se dibuja al entrar en pantalla */
@media (min-width: 1024px) {
  .timeline::before { transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease); }
  .timeline.is-drawn::before { transform: scaleX(1); }
}

/* Variantes de aparición */
.section__head.fade-in.is-visible { animation-name: fadeInBlur; }
@keyframes fadeInBlur {
  from { opacity: 0; transform: translateY(24px); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .net-bg { display: none; }
  .scroll-progress { display: none; }
}

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 767px) {
  .navbar__nav {
    position: fixed; top: var(--nav-h); right: 0;
    width: min(80vw, 320px); height: calc(100vh - var(--nav-h));
    flex-direction: column; align-items: flex-start; gap: 20px;
    padding: 30px 28px;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform 0.35s var(--ease);
    overflow-y: auto;
  }
  .navbar__nav.is-open { transform: translateX(0); }
  .navbar__cta { width: 100%; }
  .hamburger { display: flex; }
}

/* Tablet: 768px+ */
@media (min-width: 768px) {
  .section { padding: 90px 0; }
  .grid--services { grid-template-columns: repeat(2, 1fr); }
  .grid--projects { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .form__row { grid-template-columns: 1fr 1fr; }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
  .grid--services { grid-template-columns: repeat(4, 1fr); }
  .grid--projects { grid-template-columns: repeat(3, 1fr); }
  .footer__inner { grid-template-columns: 2fr 1fr 1fr 1fr; }

  /* Timeline horizontal con línea conectora */
  .timeline { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .timeline::before {
    content: ''; position: absolute; top: 42px; left: 8%; right: 8%; height: 2px;
    background: linear-gradient(90deg, rgba(59,130,246,0.5), rgba(139,92,246,0.5)); z-index: 0;
  }
  .timeline__step { background: var(--bg); z-index: 1; }
}

/* ============================================================
   v6 · Estilo comercial limpio (tipo Apple)
============================================================ */
:root { --radius-lg: 28px; --light-bg: #f5f5f7; --light-text: #1d1d1f; --light-muted: #6e6e73; }
h1, h2, h3 { letter-spacing: -0.035em; }
.muted { color: var(--text-dim); }
.section { padding: 96px 0; }
.section__head { margin-bottom: 56px; }
.section__title { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; }
.section__eyebrow { letter-spacing: 0.08em; font-size: 0.85rem; }

/* Botones */
.btn { border-radius: 980px; font-weight: 600; }
.btn--sm { padding: 8px 16px; font-size: 0.85rem; }
.btn--ghost { border: 1px solid var(--border-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--blue); }
.btn--light { background: #fff; color: #0a0a0f; }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(255,255,255,0.5); }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font-weight: 600; font-size: 1.02rem; }
.link-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-more span { transition: transform 0.25s var(--ease); }
.link-more:hover span { transform: translateX(3px); }

/* Menú translúcido */
.navbar { background: rgba(10,10,15,0.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.navbar__link { font-weight: 500; font-size: 0.9rem; }

/* Hero */
.hero { min-height: auto; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 72px) 0 40px; background: radial-gradient(900px 480px at 50% 0%, rgba(59,130,246,0.14), transparent 70%); }
.hero__eyebrow { color: var(--text-muted); font-weight: 600; font-size: 0.95rem; margin-bottom: 18px; }
.hero__title { font-size: clamp(3rem, 11vw, 7rem); line-height: 1.02; letter-spacing: -0.05em; margin-bottom: 22px; padding-bottom: 0.06em;
  background: linear-gradient(180deg, #ffffff 30%, #a5b4fc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__subtitle { max-width: 620px; }
.hero__actions { align-items: center; gap: 26px; }

.devices { position: relative; max-width: 920px; margin: 64px auto 0; padding-bottom: 20px; }
.laptop { width: 88%; margin: 0 auto; }
.laptop__screen { border: 10px solid #1c1c24; border-bottom-width: 14px; border-radius: 18px 18px 0 0; overflow: hidden; background: #000; box-shadow: 0 40px 80px -30px rgba(59,130,246,0.45); }
.laptop__screen img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.laptop__base { height: 16px; width: 112%; margin-left: -6%; background: linear-gradient(180deg, #3a3a46, #16161d); border-radius: 0 0 16px 16px; }
.phone { position: absolute; right: 0; bottom: 0; width: 22%; min-width: 96px; border: 7px solid #1c1c24; border-radius: 26px; overflow: hidden; background: #000; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.8); }
.phone__screen img { width: 100%; height: auto; aspect-ratio: 9 / 19; object-fit: cover; }

/* Garantías */
.promises { padding: 40px 0 16px; }
.promises__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.promise { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border-strong); padding-top: 16px; }
.promise strong { font-weight: 700; font-size: 1rem; }
.promise span { color: var(--text-muted); font-size: 0.92rem; }

/* Bento servicios */
.bento { display: grid; grid-template-columns: 1fr; gap: 20px; }
.tile { background: var(--surface); border-radius: var(--radius-lg); padding: 40px 34px; box-shadow: var(--shadow-card); transition: transform 0.4s var(--ease); }
.tile:hover { transform: scale(1.01); }
.tile__eyebrow { color: var(--cyan); font-weight: 600; font-size: 0.9rem; margin-bottom: 12px; }
.tile__title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.1; margin-bottom: 14px; }
.tile__text { color: var(--text-muted); max-width: 560px; }
.tile--accent { background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%); }
.tile--accent .tile__eyebrow { color: #bae6fd; }
.tile--accent .tile__text { color: #e2e8f0; }

/* Secciones claras */
.section--light { background: var(--light-bg); color: var(--light-text); }
.section--light .section__eyebrow { color: #2563eb; }
.section--light .section__lead, .section--light .muted { color: var(--light-muted); }
.section--light .card { background: #fff; border-color: rgba(0,0,0,0.06); box-shadow: 0 10px 30px -16px rgba(0,0,0,0.25); }
.section--light .card__text { color: var(--light-muted); }
.section--light .card__title { color: var(--light-text); }
.section--light .card__link { color: #2563eb; }
.section--light .card__link--soon { color: #86868b; }
.section--light .tag { background: rgba(0,0,0,0.05); color: #424245; border-color: rgba(0,0,0,0.08); }
.section--light .tag--webpwa { color: #1d4ed8; background: rgba(59,130,246,0.1); }
.section--light .tag--pwa { color: #6d28d9; background: rgba(139,92,246,0.1); }
.section--light .tag--accent { color: #0369a1; background: rgba(56,189,248,0.14); }
.section--light .card::before { display: none; }
.section--light .card__media { background: #e8e8ed; border-bottom-color: rgba(0,0,0,0.06); }
.section--light .card__media::after { display: none; }
.section--light .browser-bar { background: #f0f0f3; border-bottom-color: rgba(0,0,0,0.06); }
.section--light .browser-bar em { color: #6e6e73; background: #fff; }
.section--light .card--cta { background: linear-gradient(135deg, #0a0a0f, #1e1b4b); border: 0; }
.section--light .card--cta .card__title { color: #fff; }
.section--light .card--cta .card__text { color: #cbd5e1; }
.section--light .card--cta .card__link { color: var(--cyan); }
.section--light .card--cta .tag { color: var(--cyan); background: rgba(56,189,248,0.15); border-color: rgba(56,189,248,0.4); }

/* Galería horizontal */
.section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; text-align: left; max-width: none; }
.gallery__controls { display: flex; gap: 10px; flex-shrink: 0; }
.gallery__btn { width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,0.07); color: var(--light-text); font-size: 1.5rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background 0.25s var(--ease); }
.gallery__btn:hover { background: rgba(0,0,0,0.14); }
.gallery__count { align-self: center; min-width: 52px; text-align: center; font-weight: 600; font-size: 0.9rem; color: var(--light-muted); font-variant-numeric: tabular-nums; }
.gallery { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px max(20px, calc((100vw - var(--maxw)) / 2 + 20px)) 30px; scroll-padding: 0 max(20px, calc((100vw - var(--maxw)) / 2 + 20px)); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
.gallery > .card { flex: 0 0 min(84vw, 380px); scroll-snap-align: start; border-radius: var(--radius-lg); }
.gallery > .card .card__media { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.gallery > .card--cta { justify-content: center; }

/* Proceso con móvil fijo */
.story { display: grid; grid-template-columns: 1fr; gap: 32px; }
.story__sticky { display: none; }
.story__steps { display: flex; flex-direction: column; gap: 20px; }
.story__step { background: var(--surface); border-radius: var(--radius-lg); padding: 30px; transition: opacity 0.5s var(--ease); }
.story__kicker { color: var(--cyan); font-weight: 600; font-size: 0.85rem; }
.story__step h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 8px 0 10px; }
.story__step p { color: var(--text-muted); }
.story__phone { width: 260px; aspect-ratio: 9 / 18.5; border: 10px solid #1c1c24; border-radius: 42px; background: #05050a; overflow: hidden; margin: 0 auto; box-shadow: 0 40px 80px -30px rgba(139,92,246,0.5); }
.story__screen { position: relative; width: 100%; height: 100%; }
.story__panel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 28px 22px;
  opacity: 0; transform: translateY(16px) scale(0.98); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.story__panel.is-active { opacity: 1; transform: none; }
.story__panel[data-panel="1"] { background: linear-gradient(160deg, #0c4a6e, #0a0a0f 70%); }
.story__panel[data-panel="2"] { background: linear-gradient(160deg, #1e3a8a, #0a0a0f 70%); }
.story__panel[data-panel="3"] { background: linear-gradient(160deg, #4c1d95, #0a0a0f 70%); }
.story__panel[data-panel="4"] { background: linear-gradient(160deg, #065f46, #0a0a0f 70%); }
.story__num { font-size: 4.2rem; font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: #fff; }
.story__label { font-weight: 700; font-size: 1.3rem; color: #e2e8f0; }
.story__bars { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.story__bars i { height: 10px; border-radius: 6px; background: rgba(255,255,255,0.16); }
.story__bars i:nth-child(1) { width: 90%; }
.story__bars i:nth-child(2) { width: 70%; }
.story__bars i:nth-child(3) { width: 50%; }

/* Precios */
.plans { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; background: #fff; color: var(--light-text); border-radius: var(--radius-lg); padding: 34px 28px; box-shadow: 0 10px 30px -16px rgba(0,0,0,0.25); }
.plan--featured { background: #0a0a0f; color: #f1f5f9; box-shadow: 0 30px 60px -24px rgba(59,130,246,0.55); }
.plan__badge { position: absolute; top: 18px; right: 18px; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 100px; background: var(--gradient); color: #fff; }
.plan__name { font-size: 1.5rem; }
.plan__tagline { color: var(--light-muted); font-size: 0.95rem; min-height: 3em; }
.plan--featured .plan__tagline { color: #94a3b8; }
.plan__price { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.plan__from { display: block; font-size: 0.85rem; font-weight: 500; letter-spacing: 0; color: var(--light-muted); }
.plan--featured .plan__from { color: #94a3b8; }
.plan__price--custom { font-size: 1.4rem; letter-spacing: -0.02em; }
.plan .btn--ghost { border-color: rgba(0,0,0,0.18); color: var(--light-text); }
.plan--featured .btn--ghost { border-color: var(--border-strong); color: #fff; }
.plan__list { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid rgba(0,0,0,0.08); padding-top: 18px; margin-top: 4px; }
.plan--featured .plan__list { border-top-color: var(--border); }
.plan__list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.plan__list svg { flex-shrink: 0; margin-top: 3px; color: #2563eb; }
.plan--featured .plan__list svg { color: var(--cyan); }

/* Opiniones */
.quotes { display: grid; grid-template-columns: 1fr; gap: 20px; }
.quote { background: #fff; border-radius: var(--radius-lg); padding: 30px; box-shadow: 0 10px 30px -16px rgba(0,0,0,0.25); display: flex; flex-direction: column; gap: 18px; }
.quote blockquote, .quote p { font-size: 1.08rem; color: var(--light-text); }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote__avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--gradient); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quote strong { display: block; font-weight: 700; color: var(--light-text); }
.quote em { font-style: normal; color: var(--light-muted); font-size: 0.9rem; }

/* Auditoría */
.audit { padding: 0 0 96px; background: var(--light-bg); }
.audit__inner { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; border-radius: var(--radius-lg); padding: 44px 34px; }
.audit__eyebrow { font-weight: 600; font-size: 0.9rem; color: #dbeafe; margin-bottom: 8px; }
.audit__title { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.1; margin-bottom: 10px; }
.audit__text { color: #e0e7ff; max-width: 560px; }

/* CTA final a pantalla completa */
.final { min-height: 88vh; display: flex; align-items: center; text-align: center; padding: 120px 0;
  background: radial-gradient(800px 500px at 50% 60%, rgba(139,92,246,0.22), transparent 70%), radial-gradient(700px 400px at 30% 30%, rgba(59,130,246,0.18), transparent 70%), var(--bg); }
.final__inner { max-width: 860px; }
.final__title { font-size: clamp(2.6rem, 9vw, 6rem); line-height: 1.02; letter-spacing: -0.05em; margin-bottom: 20px; }
.final__text { color: var(--text-muted); font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 600px; margin: 0 auto 34px; }
.final__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 26px; }

/* Contacto */
.section--contact { background: var(--bg-alt); }
.section--contact .form { background: var(--surface); border-radius: var(--radius-lg); padding: 32px 24px; box-shadow: var(--shadow-card); }
.form__input { border-radius: 12px; }
.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* WhatsApp flotante */
.wa-float { position: fixed; left: 20px; bottom: 20px; z-index: 1100; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px -8px rgba(37,211,102,0.6); transition: transform 0.25s var(--ease); }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

@media (min-width: 768px) {
  .section { padding: 130px 0; }
  .promises__grid { grid-template-columns: repeat(4, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile--wide { grid-column: span 2; }
  .tile { padding: 52px 48px; }
  .plans { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .quotes { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .audit__inner { flex-direction: row; align-items: center; justify-content: space-between; padding: 56px; }
  .section--contact .form { padding: 44px; }
  .audit { padding-bottom: 130px; }
}
@media (min-width: 1024px) {
  .story { grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
  .story__sticky { display: block; position: sticky; top: calc(var(--nav-h) + 40px); }
  .story__steps { gap: 0; }
  .story__step { background: transparent; padding: 0; min-height: 70vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.3; }
  .story__step.is-active { opacity: 1; }
  .story__step h3 { font-size: 2.6rem; }
  .story__phone { width: 300px; }
}
@media (max-width: 767px) {
  .section__head--row { align-items: flex-start; }
  .gallery__btn { width: 38px; height: 38px; }
  .navbar__cta.btn--sm { padding: 12px 22px; font-size: 0.95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery { scroll-behavior: auto; }
}

/* ============================================================
   v7 · Portada profesional + proceso compacto con color por paso
============================================================ */
.hero { background: radial-gradient(900px 480px at 50% 0%, rgba(59,130,246,0.12), transparent 70%); }
.hero__title { font-size: clamp(2.6rem, 8vw, 5.6rem); line-height: 1.04; }
.hero__eyebrow { color: var(--cyan); letter-spacing: 0.02em; }
#servicios, #proceso, #faq { background: transparent; }

.story { --c1: #38bdf8; --c2: #3b82f6; --c3: #8b5cf6; --c4: #10b981; --accent: var(--c1); }
.story[data-active="2"] { --accent: var(--c2); }
.story[data-active="3"] { --accent: var(--c3); }
.story[data-active="4"] { --accent: var(--c4); }
.story__step[data-step="1"] { --step: var(--c1); }
.story__step[data-step="2"] { --step: var(--c2); }
.story__step[data-step="3"] { --step: var(--c3); }
.story__step[data-step="4"] { --step: var(--c4); }
.story__kicker { color: var(--step); }
.story__step { border-left: 3px solid var(--step); background: rgba(18,18,28,0.85); }

/* Recuadro lateral: tarjeta compacta en lugar de móvil alto */
.story__phone { width: 100%; max-width: 400px; aspect-ratio: 5 / 4; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px -30px var(--accent); transition: box-shadow 0.6s var(--ease), border-color 0.6s var(--ease); border-color: var(--accent); }
.story__panel { justify-content: center; padding: 34px; }
.story__panel[data-panel="1"] { background: linear-gradient(145deg, #0284c7, #0c4a6e 55%, #0a0a0f); }
.story__panel[data-panel="2"] { background: linear-gradient(145deg, #2563eb, #1e3a8a 55%, #0a0a0f); }
.story__panel[data-panel="3"] { background: linear-gradient(145deg, #7c3aed, #4c1d95 55%, #0a0a0f); }
.story__panel[data-panel="4"] { background: linear-gradient(145deg, #059669, #065f46 55%, #0a0a0f); }
.story__num { font-size: 3.6rem; }
.story__bars i { background: rgba(255,255,255,0.22); }

@media (min-width: 1024px) {
  .story__sticky { top: calc(50vh - 160px); }
  .story__step { opacity: 0.55; min-height: 55vh; border-left: 0; background: transparent; padding-left: 26px; position: relative; }
  .story__step::before { content: ''; position: absolute; left: 0; top: 30%; bottom: 30%; width: 3px; border-radius: 3px; background: var(--step); opacity: 0.35; transition: opacity 0.5s var(--ease); }
  .story__step.is-active::before { opacity: 1; }
}

/* ===================== v8: titular dinámico, terminal y tecnologías ===================== */
.hero__title .rotator { background: linear-gradient(90deg, #38bdf8, #3b82f6 45%, #8b5cf6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; }
.rotator__caret { display: inline-block; width: 0.06em; height: 0.82em; margin-left: 0.06em; vertical-align: -0.06em; background: #38bdf8; border-radius: 2px; animation: caretBlink 1s steps(1) infinite; }
.hero__title-sub { font-size: 0.62em; letter-spacing: -0.03em; }
@keyframes caretBlink { 50% { opacity: 0; } }
@media (max-width: 600px) { .hero__title .rotator { white-space: normal; } .hero__title { min-height: 3.3em; } }

@media (prefers-reduced-motion: reduce) { .rotator__caret { animation: none; } }

.stack { position: relative; z-index: 1; overflow: hidden; padding: 22px 0; border-top: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.stack__track { display: flex; gap: 44px; width: max-content; animation: stackScroll 38s linear infinite; }
.stack__track span { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; color: #64748b; white-space: nowrap; transition: color .2s; }
.stack__track span:hover { color: #e2e8f0; }
.stack:hover .stack__track { animation-play-state: paused; }
@keyframes stackScroll { to { transform: translateX(calc(-50% - 22px)); } }
@media (prefers-reduced-motion: reduce) { .stack__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } }

/* ===================== v9: proyectos en cuadrícula, vista ampliada y presupuesto a medida ===================== */
.projects__hint { margin: 0; max-width: 340px; text-align: right; font-size: 0.95rem; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding-bottom: 10px; }
.projects-grid > .card { border-radius: var(--radius-lg); transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.projects-grid > .card .card__media { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.projects-grid > .card--cta { justify-content: center; }
.projects-grid > .card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -28px rgba(15,23,42,0.45); }
.projects-grid .card__media img { transition: transform 0.9s var(--ease), object-position 3.5s ease-in-out; }
.projects-grid > .card:hover .card__media img { transform: scale(1.04); object-position: bottom; }
.zoom-btn { position: absolute; left: 50%; bottom: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; transform: translate(-50%, 10px); opacity: 0;
  padding: 8px 16px; border-radius: 100px; font: 600 0.85rem/1 inherit; color: #fff; background: rgba(10,10,15,0.8); border: 1px solid rgba(255,255,255,0.22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.2s; }
.zoom-btn:hover { background: #2563eb; }
.card--project:hover .zoom-btn, .zoom-btn:focus-visible { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .zoom-btn { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 760px) { .section__head--row { flex-direction: column; align-items: flex-start; } .projects__hint { text-align: left; } }

.lightbox { width: min(1100px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 18px; background: #0f1320; color: #f1f5f9; box-shadow: 0 40px 120px -20px rgba(0,0,0,0.9); overflow: auto; }
.lightbox::backdrop { background: rgba(5,6,12,0.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox[open] { animation: lbIn 0.35s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.lightbox__close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; font-size: 1.6rem; line-height: 1; color: #fff; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.2); cursor: pointer; }
.lightbox__figure { margin: 0; }
.lightbox__frame { background: #0a0a0f; }
.lightbox__frame img { display: block; width: 100%; height: auto; }
.lightbox figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 22px 26px 26px; }
.lightbox figcaption h3 { font-size: 1.4rem; flex: 1 1 100%; margin: 0; }
.lightbox figcaption p { flex: 1 1 420px; margin: 0; color: #94a3b8; }

.quote-grid { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 1040px; margin: 0 auto; }
@media (min-width: 880px) { .quote-grid { grid-template-columns: 1.35fr 1fr; } }
.quote-card { background: #fff; color: var(--light-text); border-radius: var(--radius-lg); padding: 34px 30px; box-shadow: 0 10px 30px -16px rgba(0,0,0,0.25); }
.quote-card h3 { font-size: 1.45rem; margin-bottom: 20px; }
.quote-list { display: grid; gap: 18px; counter-reset: q; }
.quote-list li { display: grid; grid-template-columns: 38px 1fr; column-gap: 14px; counter-increment: q; }
.quote-list li::before { content: counter(q, decimal-leading-zero); grid-row: span 2; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; font-weight: 800; font-size: 0.85rem; color: #2563eb; background: rgba(37,99,235,0.1); }
.quote-list strong { font-size: 1.02rem; }
.quote-list span { color: var(--light-muted); font-size: 0.95rem; }
.quote-card--dark { background: #0a0a0f; color: #f1f5f9; display: flex; flex-direction: column; box-shadow: 0 30px 60px -24px rgba(59,130,246,0.55); }
.quote-checks { display: grid; gap: 12px; margin-bottom: 26px; }
.quote-checks li { position: relative; padding-left: 30px; color: #e2e8f0; }
.quote-checks li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; color: #0a0a0f; background: var(--cyan); }
.quote-card--dark .btn { margin-top: auto; }
.quote-note { margin-top: 12px; text-align: center; font-size: 0.85rem; color: #94a3b8; }

/* ===== v10: proyectos en movimiento continuo ===== */
.projects__side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.projects-marquee { position: relative; }
.projects-marquee::before, .projects-marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: min(8vw, 90px); z-index: 2; pointer-events: none; }
.projects-marquee::before { left: 0; background: linear-gradient(90deg, #f5f5f7, rgba(245,245,247,0)); }
.projects-marquee::after { right: 0; background: linear-gradient(270deg, #f5f5f7, rgba(245,245,247,0)); }
.projects-track { display: flex; gap: 20px; overflow-x: auto; scroll-behavior: auto; scrollbar-width: none; padding: 8px max(20px, calc((100vw - 1200px) / 2)) 30px; cursor: grab; }
.projects-track::-webkit-scrollbar { display: none; }
.projects-track:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
.projects-track > .card { flex: 0 0 min(80vw, 380px); border-radius: var(--radius-lg); opacity: 1; animation: none; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.projects-track > .card .card__media { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.projects-track > .card--cta { justify-content: center; }
.projects-track > .card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -28px rgba(15,23,42,0.45); }
.projects-track .card__media img { transition: transform 0.9s var(--ease), object-position 3.5s ease-in-out; }
.projects-track > .card:hover .card__media img { transform: scale(1.04); object-position: bottom; }
@media (max-width: 760px) { .projects__side { align-items: flex-start; } }

/* ===== v11: fundidos entre secciones, formulario unido y botón fijo ===== */
/* Las secciones claras se funden con el fondo oscuro arriba y abajo (sin cortes bruscos) */
.section--light { --fade: 110px; background: linear-gradient(180deg, var(--bg) 0, var(--light-bg) var(--fade), var(--light-bg) calc(100% - var(--fade)), var(--bg) 100%);
  padding-top: calc(96px + var(--fade) * 0.6); padding-bottom: calc(96px + var(--fade) * 0.6); }
.final { background: radial-gradient(800px 500px at 50% 60%, rgba(139,92,246,0.22), transparent 70%), radial-gradient(700px 400px at 30% 30%, rgba(59,130,246,0.18), transparent 70%), linear-gradient(180deg, transparent 0, var(--bg) 140px, var(--bg) calc(100% - 140px), var(--bg-alt) 100%); }
.section--contact { background: var(--bg-alt); }
.stack { border-top-color: transparent; border-bottom-color: transparent;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.025) 20%, rgba(255,255,255,0.025) 80%, transparent); }
@media (min-width: 768px) {
  .section--light { --fade: 160px; padding-top: calc(130px + var(--fade) * 0.5); padding-bottom: calc(130px + var(--fade) * 0.5); }
}

/* Contacto: elegir proyecto nuevo o auditoría gratuita */
.intent { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
.intent__opt { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text); cursor: pointer; transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
.intent__opt strong { font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.intent__opt strong em { font-style: normal; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #052e16; background: #4ade80; padding: 2px 8px; border-radius: 999px; }
.intent__opt span { color: var(--text-muted); font-size: 0.92rem; line-height: 1.45; }
.intent__opt:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.intent__opt.is-active { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 14px 34px -18px rgba(59,130,246,0.7); background: linear-gradient(180deg, rgba(59,130,246,0.12), var(--surface)); }
.intent__opt:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
@media (min-width: 640px) { .intent { grid-template-columns: 1fr 1fr; } }

/* Botón fijo «Pedir presupuesto» */
.sticky-cta { position: fixed; left: 50%; bottom: 18px; z-index: 950; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; background: var(--gradient); color: #fff; font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em;
  box-shadow: 0 16px 40px -12px rgba(59,130,246,0.75), 0 0 0 1px rgba(255,255,255,0.12) inset; white-space: nowrap;
  opacity: 0; visibility: hidden; transform: translate(-50%, 24px); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s, box-shadow 0.25s var(--ease); }
.sticky-cta::after { content: "→"; transition: transform 0.25s var(--ease); }
.sticky-cta.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sticky-cta:hover { box-shadow: 0 20px 48px -12px rgba(139,92,246,0.8), 0 0 0 1px rgba(255,255,255,0.18) inset; }
.sticky-cta:hover::after { transform: translateX(4px); }
@media (max-width: 480px) { .sticky-cta { bottom: 14px; padding: 13px 22px; font-size: 0.95rem; } }
@media (prefers-reduced-motion: reduce) { .sticky-cta { transition: opacity 0.2s; } }

/* ===== v12: red de partículas tenue también en las secciones claras ===== */
.section--light { position: relative; isolation: isolate; }
.net-light { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 calc(var(--fade) * 1.3), #000 calc(100% - var(--fade) * 1.3), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 calc(var(--fade) * 1.3), #000 calc(100% - var(--fade) * 1.3), transparent 100%); }

/* ===== v13: formulario corto, WhatsApp directo y auditoría automática ===== */
.opt { font-weight: 400; opacity: 0.6; font-size: 0.85em; }
.form__group[hidden] { display: none; }
.contact-direct { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 10px 18px; border-radius: 999px;
  background: rgba(37,211,102,0.12); border: 1px solid rgba(37,211,102,0.35); color: #4ade80; font-size: 0.95rem; transition: background 0.25s var(--ease), transform 0.25s var(--ease); }
.contact-direct strong { color: #86efac; }
.contact-direct:hover { background: rgba(37,211,102,0.2); transform: translateY(-1px); }
.audit-result { margin-top: 18px; padding: 22px; border-radius: 16px; background: rgba(17,24,39,0.85); border: 1px solid rgba(255,255,255,0.08); }
.audit-result[hidden] { display: none; }
.audit-result__head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.audit-result__score { --c: #facc15; flex: 0 0 78px; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 800; color: var(--c); border: 3px solid var(--c); }
.audit-result__score small { font-size: 0.6rem; font-weight: 600; opacity: 0.7; }
.audit-result__head--good .audit-result__score { --c: #4ade80; }
.audit-result__head--mid .audit-result__score { --c: #facc15; }
.audit-result__head--bad .audit-result__score { --c: #f87171; }
.audit-result__head div strong, .audit-result__head div span { display: block; }
.audit-result__head div span { font-size: 0.88rem; opacity: 0.65; word-break: break-all; }
.audit-result__list li strong { margin-right: 6px; }
.audit-result__list li span { opacity: 0.7; }
.audit-result__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.audit-result__list li { position: relative; padding-left: 26px; color: rgba(255,255,255,0.85); }
.audit-result__list li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.audit-result__list li.is-ok::before { content: "✓"; color: #4ade80; }
.audit-result__list li.is-ko::before { content: "✗"; color: #f87171; }
.audit-result__note { margin-top: 14px; font-size: 0.88rem; opacity: 0.7; }
.quote__project { display: block; margin-top: 2px; font-size: 0.82rem; opacity: 0.65; }

/* ===== v14: un solo color de fondo + día/noche automático según el dispositivo ===== */
:root { color-scheme: dark light; --accent-text: #38bdf8; --card-hi: linear-gradient(135deg, #111827, #1e1b4b); }
/* Sin secciones claras alternas ni fundidos: todo sobre el mismo fondo */
.section--light { background: transparent; color: var(--text); padding-top: 96px; padding-bottom: 96px; }
.net-light { display: none; }
.audit, .section--contact, .footer { background: transparent; }
.final { background: radial-gradient(800px 500px at 50% 60%, rgba(139,92,246,0.18), transparent 70%), radial-gradient(700px 400px at 30% 30%, rgba(59,130,246,0.14), transparent 70%); }
@media (min-width: 768px) { .section--light { padding-top: 130px; padding-bottom: 130px; } }

.section--light .section__eyebrow, .section--light .card__link, .plan__list svg, .link-more, .tile__eyebrow { color: var(--accent-text); }
.section--light .section__lead, .section--light .muted, .section--light .card__text, .plan__tagline, .plan__from, .quote em, .quote-list span, .gallery__count { color: var(--text-muted); }
.section--light .card__title, .quote blockquote, .quote p, .quote strong { color: var(--text); }
.section--light .card__link--soon { color: var(--text-dim); }
.section--light .card, .quote, .quote-card, .plan { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.section--light .card__media { background: var(--surface-2); border-bottom-color: var(--border); }
.section--light .browser-bar { background: var(--bg-alt); border-bottom-color: var(--border); }
.section--light .browser-bar em { color: var(--text-dim); background: var(--surface); }
.section--light .tag { background: var(--border); color: var(--text-muted); border-color: var(--border-strong); }
.section--light .tag--webpwa { color: var(--blue); background: rgba(59,130,246,0.14); }
.section--light .tag--pwa { color: var(--violet); background: rgba(139,92,246,0.14); }
.section--light .tag--accent { color: var(--accent-text); background: rgba(56,189,248,0.14); }
.section--light .card--cta, .plan--featured, .quote-card--dark { background: var(--card-hi); color: #f1f5f9; border: 0; }
.plan--featured .plan__tagline, .plan--featured .plan__from { color: #94a3b8; }
.plan .btn--ghost { border-color: var(--border-strong); color: var(--text); }
.plan__list { border-top-color: var(--border); }
.gallery__btn { background: var(--border); color: var(--text); }
.gallery__btn:hover { background: var(--border-strong); }
.projects-marquee::before { background: linear-gradient(90deg, var(--bg), transparent); }
.projects-marquee::after { background: linear-gradient(270deg, var(--bg), transparent); }
.stack { background: none; }

/* ===== v15: tema claro (automático por sistema o elegido con el botón sol/luna; data-theme lo fija el script del <head>) ===== */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fb; --bg-alt: #eef1f6; --surface: #ffffff; --surface-2: #e2e8f0;
  --border: rgba(15,23,42,0.08); --border-strong: rgba(15,23,42,0.16);
  --text: #0f172a; --text-muted: #475569; --text-dim: #64748b;
  --shadow-card: 0 10px 30px -16px rgba(15,23,42,0.25); --accent-text: #2563eb;
}
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] .navbar, html[data-theme="light"] .navbar.scrolled { background: rgba(247,248,251,0.82); }
html[data-theme="light"] .hero__badge { color: var(--accent-text); }
html[data-theme="light"] .hero { background: radial-gradient(900px 480px at 50% 0%, rgba(59,130,246,0.10), transparent 70%); }
html[data-theme="light"] .hero__title { background: linear-gradient(180deg, #0f172a 35%, #4f46e5); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-theme="light"] .hero__eyebrow { color: #0284c7; }
html[data-theme="light"] .story__step { background: rgba(255,255,255,0.85); box-shadow: var(--shadow-card); }
html[data-theme="light"] .stack__track span:hover { color: #0f172a; }
html[data-theme="light"] .btn--outline { background: rgba(15,23,42,0.02); }
html[data-theme="light"] .form__input:focus { background: #fff; }
html[data-theme="light"] .card__media::after { display: none; }
html[data-theme="light"] .card--cta { color: var(--text); }
html[data-theme="light"] .faq__q::after, html[data-theme="light"] .footer__email a, html[data-theme="light"] .footer__col a:hover, html[data-theme="light"] .footer__admin:hover, html[data-theme="light"] .card__link { color: var(--accent-text); }
html[data-theme="light"] .tag { background: var(--border); }
html[data-theme="light"] .audit-result { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-card); }
html[data-theme="light"] .audit-result__list li { color: var(--text); }
html[data-theme="light"] .contact-direct { color: #15803d; }
html[data-theme="light"] .contact-direct strong { color: #166534; }
html[data-theme="light"] .intent__opt strong em { color: #fff; background: #16a34a; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cbd5e1; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
html[data-theme="light"] * { scrollbar-color: #cbd5e1 var(--bg); }
html[data-theme="light"] .tile--accent .tile__eyebrow { color: #bae6fd; }
@media (max-width: 767px) {
  html[data-theme="light"] .navbar__nav { background: rgba(247,248,251,0.97); }
}

/* Botón sol/luna */
.navbar__nav { margin-left: auto; }
.navbar__tools { display: flex; align-items: center; gap: 6px; margin-left: 18px; }
.theme-toggle { position: relative; width: 40px; height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); background: var(--border); border: 1px solid var(--border-strong); cursor: pointer; transition: background 0.2s, transform 0.3s var(--ease); }
.theme-toggle:hover { background: var(--border-strong); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.theme-toggle svg { position: absolute; width: 19px; height: 19px; transition: opacity 0.35s var(--ease), transform 0.5s var(--ease); }
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
html[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; transform: none; }
html[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease !important; }
@media (max-width: 767px) { .navbar__tools { margin-left: auto; } }
