/* ===== Fuentes de marca ===== */
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-VariableFont_wght.ttf") format("truetype"); font-weight: 100 800; font-display: swap; }

/* ===== Paleta ===== */
:root {
  --fx-navy: #3d3d52;
  --fx-navy-deep: #2c2c3d;
  --fx-cyan: #00ccff;
  --fx-pink: #f206ba;
  --fx-teal: #0aead9;
  --fx-lime: #ccff00;
  --fx-bg: #fafafa;
  --fx-text: #2c2c3d;
  --fx-muted: #6b6b80;
  --font-main: "Barlow", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-main); color: var(--fx-text); background: var(--fx-bg); font-size: 1.08rem; overflow-x: hidden; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.01em; }
a { color: inherit; }
.text-muted-fx { color: var(--fx-muted); }
:focus-visible { outline: 3px solid var(--fx-cyan); outline-offset: 2px; }

/* ===== Botones ===== */
.btn { font-weight: 600; border-radius: 10px; padding: .6rem 1.3rem; transition: transform .15s, box-shadow .15s, background .15s; }
.btn-lg { padding: .85rem 1.7rem; font-size: 1.1rem; }
.btn-fx-lime { background: var(--fx-lime); color: var(--fx-navy-deep); border: 2px solid var(--fx-lime); }
.btn-fx-lime:hover { background: #d9ff3d; color: var(--fx-navy-deep); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(204,255,0,.35); }
.btn-fx-outline { color: #fff; border: 2px solid rgba(255,255,255,.55); }
.btn-fx-outline:hover { color: var(--fx-navy-deep); background: #fff; border-color: #fff; transform: translateY(-2px); }
.btn-fx-dark { background: var(--fx-navy); color: #fff; border: 2px solid var(--fx-navy); }
.btn-fx-dark:hover { background: var(--fx-navy-deep); color: var(--fx-lime); transform: translateY(-2px); }

/* ===== Navbar ===== */
.fx-nav { padding: .7rem 0; transition: background .25s, box-shadow .25s, padding .25s; }
.fx-nav.scrolled, .fx-nav:has(.navbar-collapse.show) { background: var(--fx-navy); box-shadow: 0 4px 20px rgba(0,0,0,.25); padding: .4rem 0; }
.fx-nav .nav-link { color: #fff; font-weight: 500; padding: .5rem .9rem; border-radius: 8px; }
.fx-nav .nav-link:hover, .fx-nav .nav-link.active { color: var(--fx-lime); }
.fx-nav .navbar-toggler { border: 0; color: #fff; font-size: 2rem; line-height: 1; padding: 0 .3rem; }
.fx-nav .navbar-toggler:focus { box-shadow: 0 0 0 3px var(--fx-cyan); }

/* ===== Hero ===== */
.hero { position: relative; background: radial-gradient(1100px 500px at 85% 10%, rgba(0,204,255,.18), transparent 60%), radial-gradient(800px 500px at 0% 100%, rgba(242,6,186,.16), transparent 60%), var(--fx-navy); color: #fff; padding: 9rem 0 6rem; overflow: hidden; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000 30%, transparent 95%); -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%); }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); line-height: 1.05; margin-bottom: 1.2rem; }
.hero .hl { color: var(--fx-lime); display: block; }
.hero .lead { color: rgba(255,255,255,.85); max-width: 40rem; margin-bottom: 2rem; }
.hero-points { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; color: rgba(255,255,255,.9); font-weight: 500; }
.hero-points i { color: var(--fx-teal); margin-right: .3rem; }
.hero-card { background: #f7f7f7; border-radius: 24px; padding: 1.8rem 1.5rem 1.2rem; max-width: 400px; margin: 0 auto; box-shadow: 0 0 0 6px rgba(0,204,255,.12), 0 30px 60px rgba(0,0,0,.3); }
.hero-icon { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; animation: float 4s ease-in-out infinite; }
.status-line { margin-top: 1.2rem; padding: .7rem 1rem; border-radius: 12px; background: var(--fx-navy-deep); font-family: var(--font-mono); font-size: .95rem; color: var(--fx-lime); }
.status-line .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--fx-lime); margin-right: .5rem; animation: pulse 1.4s infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes pulse { 50% { opacity: .25; } }

/* ===== Secciones ===== */
.section { padding: 6rem 0; }
.section-soft { background: #fff; }
.section-head { max-width: 640px; margin: 0 auto 3.2rem; }
.section-head p { color: var(--fx-muted); }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.1; margin-bottom: 1rem; }

/* ===== Proceso ===== */
.section-dark { background: var(--fx-navy); color: #fff; }
.section-dark .section-head p { color: rgba(255,255,255,.75); }
.section-dark .step { height: 100%; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; padding: 2rem 1.7rem; background: rgba(255,255,255,.04); }
.step .num { font-family: var(--font-mono); font-size: 2.6rem; font-weight: 800; color: var(--fx-lime); line-height: 1; display: block; margin-bottom: 1rem; }
.step h3 { font-size: 1.35rem; }
.step p { color: rgba(255,255,255,.78); margin: 0; }

/* ===== Por qué ===== */
.why { height: 100%; background: #fff; border-radius: 16px; padding: 1.5rem; border: 1px solid #e3e3ec; --c: var(--fx-cyan); }
.col-sm-6:nth-child(2) .why { --c: var(--fx-pink); }
.col-sm-6:nth-child(3) .why { --c: var(--fx-teal); }
.col-sm-6:nth-child(4) .why { --c: var(--fx-lime); }
.why i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--c); font-size: 1.5rem; color: var(--fx-navy-deep); }
.col-sm-6:nth-child(2) .why i { color: #fff; }
.why h3 { font-size: 1.2rem; margin: .9rem 0 .3rem; }
.why p { margin: 0; color: var(--fx-muted); font-size: 1rem; }

/* ===== FAQ ===== */
.fx-accordion .accordion-item { border: 2px solid var(--fx-navy); border-radius: 14px !important; margin-bottom: .8rem; overflow: hidden; background: #fff; }
.fx-accordion .accordion-button { font-weight: 600; font-size: 1.1rem; color: var(--fx-navy-deep); background: #fff; box-shadow: none; }
.fx-accordion .accordion-button:not(.collapsed) { background: var(--fx-lime); color: var(--fx-navy-deep); }
.fx-accordion .accordion-body { color: var(--fx-muted); }

/* ===== Contacto ===== */
.section-cta { background: radial-gradient(700px 400px at 100% 0%, rgba(0,204,255,.2), transparent 60%), var(--fx-navy); color: #fff; }
.section-cta p { color: rgba(255,255,255,.82); }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; font-weight: 500; }
.contact-list li { margin-bottom: .6rem; }
.contact-list i { color: var(--fx-lime); margin-right: .6rem; }
.contact-list a { text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.5); }
.contact-list a:hover { color: var(--fx-lime); }
.fx-form { background: #fff; color: var(--fx-text); border-radius: 20px; padding: 2rem; box-shadow: 10px 10px 0 var(--fx-pink); }
.fx-form .form-label { font-weight: 600; }
.fx-form .form-control, .fx-form .form-select { border: 2px solid #cfcfdc; border-radius: 10px; padding: .7rem .9rem; font-family: inherit; }
.fx-form .form-control:focus, .fx-form .form-select:focus { border-color: var(--fx-cyan); box-shadow: 0 0 0 .22rem rgba(0,204,255,.25); }

/* ===== Footer ===== */
.fx-footer { background: var(--fx-navy-deep); color: rgba(255,255,255,.7); padding: 2rem 0; }

/* ===== WhatsApp flotante ===== */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 1030; width: 58px; height: 58px; border-radius: 50%; background: var(--fx-lime); color: var(--fx-navy-deep); display: grid; place-items: center; font-size: 1.9rem; text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,.3); transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); color: var(--fx-navy-deep); }

/* ===== Reveal ===== */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 991.98px) {
  .hero { padding: 7.5rem 0 4rem; }
  .fx-nav .navbar-collapse { padding: 1rem 0; }
  .section { padding: 4.5rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-icon, .status-line .dot { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Footer en 3 columnas ===== */
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.footer-left { text-align: left; }
.footer-logo { justify-self: center; }
.footer-right { text-align: right; }
.footer-right a { color: var(--fx-lime); text-decoration: none; border-bottom: 1px dashed currentColor; }
.footer-right a:hover { color: #fff; }
@media (max-width: 767.98px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-left, .footer-right { text-align: center; }
  .footer-logo { order: -1; }
}

/* ===== Mensaje del formulario ===== */
#formMsg:empty { display: none; }
#formMsg { padding: .8rem 1rem; border-radius: 10px; font-weight: 500; }
#formMsg.ok { background: #e6f9ee; color: #146c43; border: 1px solid #a3e0bd; }
#formMsg.err { background: #fdeaf8; color: #9c0a78; border: 1px solid #f5a6e2; }

/* ===== Logo del navbar ===== */
.nav-logo { height: 136px; width: auto; transition: height .25s; }
.fx-nav.scrolled .nav-logo, .fx-nav:has(.navbar-collapse.show) .nav-logo { height: 100px; }
.hero { padding-top: 14rem; }
@media (max-width: 991.98px) {
  .nav-logo { height: 104px; }
  .fx-nav.scrolled .nav-logo, .fx-nav:has(.navbar-collapse.show) .nav-logo { height: 84px; }
  .hero { padding-top: 12.5rem; }
}


/* ===== Hero: enlace secundario ===== */
.hero-link { color: #fff; font-weight: 600; font-size: 1.1rem; text-decoration: none; border-bottom: 2px solid rgba(255,255,255,.4); padding-bottom: 2px; transition: color .15s, border-color .15s; }
.hero-link:hover { color: var(--fx-lime); border-color: var(--fx-lime); }
.hero-link i { margin-left: .25rem; }
.hero-points li { max-width: 100%; }

/* ===== Síntomas ===== */
.c-cyan { --c: var(--fx-cyan); } .c-pink { --c: var(--fx-pink); } .c-teal { --c: var(--fx-teal); } .c-lime { --c: var(--fx-lime); }
.sx { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; align-items: start; }
.sx-list { display: flex; flex-direction: column; gap: .7rem; }
.sx-item { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; font: 600 1.1rem/1.25 var(--font-main); color: var(--fx-navy-deep); background: #fff; border: 2px solid var(--fx-navy); border-radius: 14px; padding: 1rem 1.2rem; cursor: pointer; transition: background .15s, transform .2s cubic-bezier(.16,1,.3,1); }
.sx-item i { font-size: 1.45rem; flex: none; }
.sx-item:hover { transform: translateX(4px); }
.sx-item[aria-selected="true"] { background: var(--fx-lime); }
.sx-panel { background: #fff; border: 2px solid var(--fx-navy); border-radius: 20px; padding: 2.2rem; box-shadow: 10px 10px 0 var(--c); position: sticky; top: 9rem; transition: box-shadow .3s; }
.sx-panel.swap > * { animation: sxIn .45s cubic-bezier(.16,1,.3,1) both; }
.sx-panel.swap > *:nth-child(2) { animation-delay: .04s; } .sx-panel.swap > *:nth-child(3) { animation-delay: .08s; } .sx-panel.swap > *:nth-child(4) { animation-delay: .12s; } .sx-panel.swap > *:nth-child(5) { animation-delay: .16s; }
@keyframes sxIn { from { opacity: 0; transform: translateY(10px); } }
.sx-panel .ico { width: 64px; height: 64px; border-radius: 16px; background: var(--c); color: var(--fx-navy-deep); display: grid; place-items: center; font-size: 1.9rem; margin-bottom: 1.2rem; }
.sx-panel.c-pink .ico { color: #fff; }
.sx-panel h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; }
.sx-panel p { color: var(--fx-muted); max-width: 34rem; }
.sx-note { display: flex; gap: .55rem; align-items: baseline; font-weight: 500; color: var(--fx-navy-deep) !important; }
.sx-note i { color: var(--fx-navy); }
.sx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.6rem; }
.sx-form-link { color: var(--fx-navy); font-weight: 600; text-underline-offset: 3px; }
.sx-form-link:hover { color: var(--fx-navy-deep); text-decoration-thickness: 2px; }
.sx-item:focus-visible, .sx-panel:focus-visible { outline-offset: 3px; }

/* ===== Proceso: barras que se completan ===== */
.step-bar { display: block; height: 6px; border-radius: 6px; background: rgba(255,255,255,.14); margin-bottom: 1.2rem; overflow: hidden; }
.step-bar i { display: block; height: 100%; width: 100%; background: var(--fx-lime); border-radius: 6px; transform-origin: left; }
.js .reveal .step-bar i { transform: scaleX(0); }
.js .reveal.in .step-bar i { transform: scaleX(1); transition: transform 1.1s cubic-bezier(.16,1,.3,1) calc(var(--d, 0ms) + .25s); }

/* ===== Progreso del diagnóstico ===== */
.hud { --s: var(--fx-cyan); position: fixed; left: 18px; bottom: 18px; z-index: 1020; display: flex; align-items: center; gap: .6rem; background: var(--fx-navy-deep); color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: .55rem 1rem; font: 500 .8rem/1 var(--font-mono); box-shadow: 0 8px 24px rgba(0,0,0,.3); pointer-events: none; }
.hud[data-stage="scan"] { --s: var(--fx-cyan); } .hud[data-stage="detect"] { --s: var(--fx-pink); } .hud[data-stage="repair"] { --s: var(--fx-lime); } .hud[data-stage="ok"] { --s: var(--fx-teal); }
.hud .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s); animation: pulse 1.4s infinite; transition: background .3s; }
.hud[data-stage="ok"] .dot { animation: none; }
.hud-state { color: var(--s); min-width: 7.2em; transition: color .3s; }
.hud-bar { width: 70px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.hud-bar i { display: block; height: 100%; width: 100%; background: var(--s); transform-origin: left; transform: scaleX(0); transition: background .3s; }
.hud-pct { min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 991.98px) {
  .sx { grid-template-columns: 1fr; gap: 0; }
  .sx-list { gap: .6rem; }
  .sx-panel { position: static; margin: .2rem 0 .6rem; padding: 1.6rem; box-shadow: 6px 6px 0 var(--c); }
}
@media (max-width: 575.98px) {
  .hud { padding: .5rem .8rem; gap: .5rem; font-size: .75rem; }
  .hud-bar { width: 44px; }
  .hud-state { min-width: 6.6em; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-panel.swap > * { animation: none; }
  .js .reveal .step-bar i, .js .reveal.in .step-bar i { transform: none; transition: none; }
  .hud .dot { animation: none; }
}

/* Selección de texto y scroll con la paleta de marca */
::selection { background: var(--fx-lime); color: var(--fx-navy-deep); }
html { scrollbar-color: var(--fx-navy) var(--fx-bg); }

/* Los anclas no quedan tapados por la barra fija */
section[id] { scroll-margin-top: 110px; }

/* Margen lateral cómodo en pantallas chicas (antes 12px) */
@media (max-width: 767.98px) {
  .container { --bs-gutter-x: 2.5rem; }
  /* El indicador y el botón de WhatsApp flotan abajo: dejar aire para que no tapen el pie */
  .fx-footer { padding-bottom: 5rem; }
}
