/* =========================================================
   FB Soluciones — estilos principales
   ========================================================= */

:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Sora", var(--font-body);

  --c-primary: #2f6bff;
  --c-primary-dark: #1f4fd1;
  --c-accent: #b43cff;
  --c-accent-2: #ff3df0;
  --c-navy: #0a0c1e;
  --c-navy-2: #171a3f;

  --bg: #ffffff;
  --bg-alt: #f4f7fc;
  --surface: #ffffff;
  --border: #e3e8f2;
  --text: #16213a;
  --text-muted: #5a6780;
  --text-on-dark: #f5f8ff;

  --shadow-sm: 0 1px 2px rgba(11, 27, 58, .06), 0 2px 8px rgba(11, 27, 58, .06);
  --shadow-md: 0 8px 24px rgba(11, 27, 58, .10);
  --shadow-lg: 0 24px 60px rgba(11, 27, 58, .16);

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1226;
    --bg-alt: #0e1a35;
    --surface: #111f3f;
    --border: #22325a;
    --text: #e9eefb;
    --text-muted: #a3b0cc;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --bg: #0a1226;
  --bg-alt: #0e1a35;
  --surface: #111f3f;
  --border: #22325a;
  --text: #e9eefb;
  --text-muted: #a3b0cc;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.container.narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 1000;
  background: var(--c-primary); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: .75rem;
}
.grad {
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  font-weight: 600; line-height: 1; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(47, 107, 255, .4); outline: 3px solid color-mix(in srgb, var(--c-primary) 40%, transparent); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff; box-shadow: 0 6px 18px rgba(47, 107, 255, .35);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(47, 107, 255, .45); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-sm { padding: .6rem 1.1rem; font-size: .92rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-family: var(--font-head); font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 52px; height: 42px; flex: none; object-fit: contain; filter: drop-shadow(0 0 6px rgba(180, 60, 255, .35)); }
.brand-footer img { width: 200px; height: auto; }
.brand-footer { display: block; margin-left: -14px; }
.brand-text strong { font-weight: 800; }
.brand-text { letter-spacing: -.01em; }

.site-nav ul { display: flex; gap: 1.6rem; list-style: none; }
.site-nav a { color: var(--text-muted); font-weight: 500; font-size: .95rem; position: relative; }
.site-nav a:hover, .site-nav a.active { color: var(--text); text-decoration: none; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--c-primary); transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: .75rem; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; padding: 0 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(180, 60, 255, .2), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(47, 107, 255, .18), transparent 70%),
    var(--bg);
  background:
    radial-gradient(60% 50% at 85% 10%, color-mix(in srgb, var(--c-accent) 20%, transparent), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, color-mix(in srgb, var(--c-primary) 18%, transparent), transparent 70%),
    var(--bg);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .35;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1.4rem; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: var(--text-muted); font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: .5rem; }
.hero-points li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--c-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* Mockups del hero */
.hero-visual { position: relative; min-height: 420px; }
.mock { position: absolute; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); border-radius: var(--radius); }
.mock-web { left: 0; top: 10%; width: 78%; height: 300px; animation: float 7s ease-in-out infinite; }
.mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.mock-bar i:first-child { background: #ff6b6b; } .mock-bar i:nth-child(2) { background: #ffd166; } .mock-bar i:nth-child(3) { background: #06d6a0; }
.mock-body { padding: 20px; display: grid; gap: 12px; }
.mock-line { height: 12px; border-radius: 6px; background: var(--bg-alt); }
.mock-line.w60 { width: 60%; height: 18px; background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); }
.w40 { width: 40%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w90 { width: 90%; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 6px; }
.mock-cards span { height: 70px; border-radius: 10px; background: var(--bg-alt); border: 1px solid var(--border); }
.mock-phone {
  right: 0; bottom: 0; width: 190px; height: 360px; border-radius: 28px; padding: 14px;
  background: var(--c-navy); border-color: var(--c-navy-2); animation: float 6s ease-in-out 1s infinite;
}
.mock-notch { width: 60px; height: 8px; border-radius: 6px; background: #000; margin: 0 auto 12px; opacity: .6; }
.mock-screen { height: calc(100% - 20px); background: var(--surface); border-radius: 18px; padding: 16px; display: grid; gap: 10px; align-content: start; }
.mock-screen .w70 { height: 14px; background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); }
.mock-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.mock-tiles span { height: 52px; border-radius: 10px; background: var(--bg-alt); border: 1px solid var(--border); }
.mock-btn { height: 36px; border-radius: 999px; background: var(--c-primary); margin-top: auto; }
.mock-badge {
  left: 6%; bottom: 4%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px;
  animation: float 5s ease-in-out .5s infinite;
}
.mock-badge small { display: block; color: var(--text-muted); font-size: .78rem; }
.badge-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(180, 60, 255, .18); background: color-mix(in srgb, var(--c-accent) 18%, transparent); color: var(--c-accent); }
.badge-icon svg { width: 22px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Strip ---------- */
.strip { border-block: 1px solid var(--border); background: var(--bg-alt); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item { padding: 1.25rem 1rem; text-align: center; border-left: 1px solid var(--border); }
.strip-item:first-child { border-left: 0; }
.strip-item strong { display: block; font-family: var(--font-head); font-size: 1.25rem; }
.strip-item span { color: var(--text-muted); font-size: .9rem; }

/* ---------- Secciones ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin: 0 auto 3rem; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* Tarjetas de servicios */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(47, 107, 255, .35); border-color: color-mix(in srgb, var(--c-primary) 35%, var(--border)); }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: rgba(47, 107, 255, .12); background: color-mix(in srgb, var(--c-primary) 12%, transparent); color: var(--c-primary);
}
.card-icon svg { width: 26px; height: 26px; }
.card p { color: var(--text-muted); font-size: .97rem; }
.card-list { list-style: none; display: grid; gap: .4rem; margin-top: .75rem; font-size: .92rem; }
.card-list li { padding-left: 1.4rem; position: relative; }
.card-list li::before { content: "✓"; position: absolute; left: 0; color: var(--c-accent); font-weight: 700; }
.card-featured {
  background: linear-gradient(160deg, rgba(47, 107, 255, .1), rgba(180, 60, 255, .1)), var(--surface);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c-primary) 10%, var(--surface)), color-mix(in srgb, var(--c-accent) 10%, var(--surface)));
  border-color: rgba(47, 107, 255, .35);
  border-color: color-mix(in srgb, var(--c-primary) 35%, var(--border));
}
.card-featured .card-icon { background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); color: #fff; }
.card-link { display: inline-block; margin-top: 1rem; font-weight: 600; }
.card-link::after { content: " →"; }

/* Moodle split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-copy p { color: var(--text-muted); }
.checks { list-style: none; display: grid; gap: .8rem; margin: 1.5rem 0 2rem; }
.checks li { padding-left: 2rem; position: relative; color: var(--text-muted); }
.checks li strong { color: var(--text); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .2rem; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(180, 60, 255, .2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b43cff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
  background: color-mix(in srgb, var(--c-accent) 20%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b43cff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

.lms { display: grid; grid-template-columns: 64px 1fr; height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--surface); }
.lms-side { background: var(--c-navy); padding: 16px 14px; display: grid; gap: 14px; align-content: start; }
.lms-logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); margin-bottom: 6px; }
.lms-side i { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .18); }
.lms-main { padding: 20px; display: grid; gap: 16px; align-content: start; background: var(--bg-alt); }
.lms-top { display: flex; justify-content: space-between; align-items: center; }
.lms-top span { height: 14px; border-radius: 7px; background: var(--border); }
.lms-top .pill { width: 90px; height: 28px; border-radius: 999px; background: var(--c-primary); }
.lms-courses { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lms-course { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.lms-course b { display: block; height: 54px; border-radius: 8px; background: linear-gradient(135deg, rgba(47, 107, 255, .6), rgba(180, 60, 255, .6)); background: linear-gradient(135deg, color-mix(in srgb, var(--c-primary) 60%, transparent), color-mix(in srgb, var(--c-accent) 60%, transparent)); }
.lms-course span { height: 9px; border-radius: 5px; background: var(--border); }
.lms-course em { display: block; height: 6px; border-radius: 3px; background: var(--border); position: relative; overflow: hidden; }
.lms-course em::after { content: ""; position: absolute; inset: 0; width: var(--p, 50%); background: var(--c-accent); }

/* Proceso */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; position: relative; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; position: relative; }
.step-num { display: inline-block; font-family: var(--font-head); font-weight: 800; font-size: 2rem; line-height: 1; margin-bottom: .75rem;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { font-size: 1.1rem; }
.step p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* Nosotros */
.section-dark { background: radial-gradient(70% 90% at 80% 0%, rgba(180, 60, 255, .22), transparent 60%), linear-gradient(160deg, var(--c-navy), var(--c-navy-2)); color: var(--text-on-dark); }
.section-dark .eyebrow { color: var(--c-accent); }
.section-dark .section-head p { color: #c7d2ea; }
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.benefit { padding: 1.5rem; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.benefit h3 { font-size: 1.05rem; color: #fff; }
.benefit p { color: #c7d2ea; font-size: .95rem; margin: 0; }

/* FAQ */
.faq { display: grid; gap: .75rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 1.25rem; transition: border-color .2s; }
.faq details[open] { border-color: rgba(47, 107, 255, .4); border-color: color-mix(in srgb, var(--c-primary) 40%, var(--border)); }
.faq summary { cursor: pointer; font-weight: 600; padding: 1rem 2rem 1rem 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--c-primary); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { color: var(--text-muted); padding-bottom: 1rem; margin: 0; }

/* Contacto */
.section-contact { background: var(--bg-alt); border-top: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-copy p { color: var(--text-muted); }
.contact-list { list-style: none; display: grid; gap: 1rem; margin-top: 1.5rem; }
.contact-list li { display: flex; align-items: center; gap: .9rem; }
.contact-list a { color: var(--text); font-weight: 500; }
.ci { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface); border: 1px solid var(--border); color: var(--c-primary); }
.ci svg { width: 20px; }

.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-md); display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(47, 107, 255, .18); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 18%, transparent);
}
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: #e5484d; }
.form-note { margin: 0; font-size: .85rem; color: var(--text-muted); text-align: center; }
.form-note.ok { color: #0e9f6e; font-weight: 600; }
.form-note.err { color: #e5484d; font-weight: 600; }

/* Footer */
.site-footer { background: radial-gradient(50% 60% at 10% 100%, rgba(47, 107, 255, .18), transparent 60%), var(--c-navy); color: #c7d2ea; padding: 3.5rem 0 1.5rem; }
.site-footer .brand, .site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
.footer-tag { margin-top: 1rem; max-width: 36ch; font-size: .95rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.site-footer ul { list-style: none; display: grid; gap: .5rem; }
.site-footer ul a { color: #c7d2ea; font-size: .95rem; }
.site-footer ul a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; }
.to-top { color: #c7d2ea; }

/* ---------- Animaciones de aparición ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .mock, .mock-badge { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps, .benefits { grid-template-columns: repeat(2, 1fr); }
  .site-nav ul { gap: 1.1rem; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 380px; max-width: 520px; margin: 0 auto; width: 100%; }
  .split { grid-template-columns: 1fr; }
  .split-visual { order: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }

  /* Menú móvil */
  .nav-toggle { display: flex; }
  .nav-actions .btn { display: none; }
  .site-header { overflow: visible; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 99;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
    padding: 1rem 16px 1.25rem; transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s;
  }
  .site-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--border); }
  .site-nav li:last-child { border-bottom: 0; }
  .site-nav a { display: block; padding: .9rem 0; font-size: 1.05rem; color: var(--text); }
  .site-nav a::after { display: none; }
}

@media (max-width: 600px) {
  .cards-grid, .steps, .benefits, .field-row, .footer-grid { grid-template-columns: 1fr; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-item:nth-child(3) { border-left: 0; }
  .strip-item:nth-child(n+3) { border-top: 1px solid var(--border); }
  .hero-visual { min-height: 340px; }
  .mock-web { width: 72%; height: 240px; }
  .mock-phone { width: 150px; height: 290px; }
  .mock-badge { bottom: 0; left: 0; padding: 10px 12px; }
  .contact-form { padding: 1.4rem; }
  .btn { width: 100%; }
  .btn-sm { width: auto; }
}

/* ---------- WhatsApp: botones por sección y flotante ---------- */
.btn-wa {
  background: #25d366; color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .35);
}
.btn-wa:hover { background: #1ebe5b; box-shadow: 0 10px 26px rgba(37, 211, 102, .45); }
.btn-wa svg { width: 20px; height: 20px; flex: none; }
.btn-wa-lg { margin-top: 1.5rem; padding: 1rem 1.6rem; font-size: 1.05rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.section-cta {
  margin-top: 2.5rem; padding: 1.5rem 1.75rem; border-radius: var(--radius);
  background: var(--bg-alt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap;
}
.section-cta p { margin: 0; font-weight: 600; font-size: 1.05rem; }
.section-alt .section-cta { background: var(--surface); }
.section-cta-dark { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.section-cta-dark p { color: #fff; }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; align-items: center; gap: .6rem;
  padding: 12px 16px 12px 12px; border-radius: 999px;
  background: #25d366; color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 28px rgba(37, 211, 102, .45), 0 2px 6px rgba(0, 0, 0, .2);
  transition: transform .15s ease, box-shadow .15s ease;
}
.wa-float:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 14px 34px rgba(37, 211, 102, .55), 0 2px 6px rgba(0, 0, 0, .2); }
.wa-float svg { width: 28px; height: 28px; flex: none; }
.wa-float-label { font-size: .95rem; }
@media (max-width: 600px) {
  .wa-float { right: 14px; bottom: 14px; padding: 12px; }
  .wa-float-label { display: none; }
  .section-cta { padding: 1.25rem; }
  .section-cta p { font-size: 1rem; }
}

/* ---------- Formulario: antispam y errores ---------- */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.field-error { display: none; color: #e5484d; font-size: .82rem; font-weight: 500; }
.field.invalid .field-error { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #e5484d; }
.consent { display: flex; align-items: flex-start; gap: .6rem; font-size: .88rem; color: var(--text-muted); cursor: pointer; }
.consent input { margin-top: .2rem; accent-color: var(--c-primary); }
.consent.invalid { color: #e5484d; }
.contact-form button[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Proyectos (portafolio) ---------- */
.cases { display: grid; gap: 2rem; }
.case {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.5rem); box-shadow: var(--shadow-sm);
}
.case:nth-child(even) .case-media { order: 2; }
.case-tag {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--c-primary); margin-bottom: .6rem;
}
.case-tag svg { width: 16px; height: 16px; }
.case h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.case-body p { color: var(--text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 1.2rem; }
.chips span { font-size: .78rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-muted); }
.case-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.4rem; }
.case-actions .btn-ghost { padding: .7rem 1.2rem; }

/* Marco navegador + teléfono */
.case-media { position: relative; }
.frame-browser {
  position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-alt);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.frame-browser::before {
  content: ""; display: block; height: 26px; background: var(--bg-alt); border-bottom: 1px solid var(--border);
  background-image: radial-gradient(circle, #ff6b6b 4px, transparent 5px), radial-gradient(circle, #ffd166 4px, transparent 5px), radial-gradient(circle, #06d6a0 4px, transparent 5px);
  background-size: 14px 14px; background-repeat: no-repeat; background-position: 10px 6px, 26px 6px, 42px 6px;
}
.frame-browser img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.frame-phone {
  position: absolute; right: -6px; bottom: -14px; width: 26%; min-width: 96px;
  border-radius: 18px; padding: 6px; background: var(--c-navy); box-shadow: var(--shadow-lg);
}
.frame-phone img { width: 100%; height: auto; display: block; border-radius: 13px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.case-media a { display: block; cursor: zoom-in; }
.case-media a:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: 12px; }

/* Medical Suite: tres teléfonos */
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; align-items: end; }
.phones a { display: block; border-radius: 20px; padding: 6px; background: var(--c-navy); box-shadow: var(--shadow-md); cursor: zoom-in; transition: transform .2s; }
.phones a:hover { transform: translateY(-4px); }
.phones a:nth-child(2) { transform: translateY(-14px); }
.phones a:nth-child(2):hover { transform: translateY(-18px); }
.phones img { width: 100%; height: auto; display: block; border-radius: 15px; }

/* Miniaturas extra */
.thumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.thumbs a { display: block; width: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); cursor: zoom-in; transition: transform .15s, border-color .15s; }
.thumbs a:hover { transform: translateY(-2px); border-color: var(--c-primary); }
.thumbs img { width: 100%; height: 48px; object-fit: cover; object-position: top; display: block; }
.thumbs a.is-phone img { height: 96px; }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; margin: auto; background: transparent; overflow: visible;
  width: auto; max-width: none; max-height: none;
}
.lightbox::backdrop { background: rgba(5, 8, 20, .88); backdrop-filter: blur(4px); }
.lightbox-inner { position: relative; margin: 0; display: grid; gap: .6rem; justify-items: center; }
.lightbox img {
  display: block; width: auto; height: auto;
  max-width: min(92vw, 1200px); max-height: min(80vh, 820px); object-fit: contain;
  border-radius: 10px; box-shadow: var(--shadow-lg); background: #fff;
}
.lightbox figcaption { color: #e9eefb; font-size: .95rem; text-align: center; padding: 0 56px; }
.lightbox-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: #16213a; font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.lightbox-prev { left: 10px; } .lightbox-next { right: 10px; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: #fff; color: #16213a; font-size: 1.4rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.lightbox-btn:hover, .lightbox-close:hover { background: var(--c-primary); color: #fff; }
.lightbox-btn:focus-visible, .lightbox-close:focus-visible { outline: 3px solid var(--c-accent); }
html:has(dialog.lightbox[open]), html.lightbox-open { overflow: hidden; }

@media (max-width: 860px) {
  .case { grid-template-columns: 1fr; }
  .case:nth-child(even) .case-media { order: 0; }
  .case-media { margin-bottom: 1rem; }
  .frame-phone { width: 30%; }
  .phones { max-width: 420px; margin: 0 auto; }
}

/* ---------- Tecnologías: franja con logotipos en movimiento ---------- */
.tech { padding: 2.5rem 0 2.75rem; border-bottom: 1px solid var(--border); overflow: hidden; }
.tech-head { text-align: center; margin-bottom: 1.5rem; }
.tech-head .eyebrow { margin-bottom: .35rem; }
.tech-head p { margin: 0; color: var(--text-muted); font-size: .95rem; }
.marquee {
  display: flex; gap: 2rem; width: 100%; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; gap: 2rem; list-style: none; flex: none; min-width: 100%;
  justify-content: space-around; animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.tech-item {
  display: flex; align-items: center; gap: .6rem; flex: none;
  padding: .6rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: .92rem; color: var(--text); white-space: nowrap;
  transition: transform .15s, border-color .15s;
}
.tech-item:hover { transform: translateY(-2px); border-color: var(--brand, var(--c-primary)); }
.tech-item svg { width: 24px; height: 24px; flex: none; fill: var(--brand, var(--text)); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 2rem)); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { mask-image: none; -webkit-mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; }
  .marquee-track[aria-hidden="true"] { display: none; }
}
@media (max-width: 600px) {
  .tech { padding: 2rem 0; }
  .tech-item { padding: .5rem .85rem; font-size: .85rem; }
  .tech-item svg { width: 20px; height: 20px; }
  .marquee-track { animation-duration: 36s; }
}
