/* =========================================================
   Nortia Systems — estilos (mobile-first)
   ========================================================= */

@font-face {
  font-family: "Sora";
  src: url("../assets/fonts/sora-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../assets/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #0A1320;
  --bg-2: #0E1A2B;
  --card: #13223A;
  --card-2: #1A2D4A;
  --line: rgba(201, 207, 216, 0.13);
  --line-strong: rgba(201, 207, 216, 0.26);
  --text: #F2EEE6;
  --muted: #AEB8C6;
  --orange: #E08A2E;
  --orange-2: #F29F4B;
  --orange-soft: rgba(224, 138, 46, 0.14);
  --on-orange: #0A1320;
  --wa: #25D366;

  --font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1160px;
  --gutter: 20px;
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--orange-2); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.ico { width: 1.15em; height: 1.15em; flex: none; }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--orange); color: var(--on-orange); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Tipografía base ---------- */
.eyebrow {
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange-2);
  margin-bottom: 14px;
}
.h2 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3rem); max-width: 22ch; }
.lead { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); color: var(--muted); max-width: 40ch; }
.micro { font-size: 0.85rem; color: var(--muted); }
mark { background: none; color: var(--orange-2); }
.placeholder {
  display: inline-block; padding: 2px 8px; border: 1px dashed var(--orange-2); border-radius: 6px;
  color: var(--orange-2); font-family: var(--mono); font-size: 0.85em;
}

/* ---------- Botones ---------- */
.btn {
  --b: var(--orange);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  background: var(--b); color: var(--on-orange);
  border: 0; border-radius: 999px;
  font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(224, 138, 46, 0.7);
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --b: var(--orange-2); transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(242, 159, 75, 0.75); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn--sm { min-height: 42px; padding: 0 16px; font-size: 0.92rem; }
.btn--lg { min-height: 58px; padding: 0 28px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--ghost { --b: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--ghost:hover { --b: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1.5px var(--muted); }
.link { background: none; border: 0; padding: 8px 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--text); }

/* ---------- Cabecera ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 19, 32, 0.82);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__mark { width: 34px; height: 34px; }
.brand__name { font-weight: 700; letter-spacing: 0.04em; font-size: 1.05rem; line-height: 1; }
.brand__name b { color: var(--orange); font-weight: 700; }
.brand__name small { display: block; font: 500 0.58rem/1 var(--mono); letter-spacing: 0.32em; color: var(--muted); margin-top: 4px; }
.nav { display: none; }

/* ---------- Secciones ---------- */
.section { padding: 72px 0; position: relative; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- 1. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 36px 0 64px;
}
/* Retícula tipo carta náutica: guiño a la brújula de Nortia */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 10%, transparent 75%);
  opacity: 0.6;
}
.hero__grid { position: relative; display: grid; gap: 44px; }
.hero h1 { font-size: clamp(2.2rem, 1.3rem + 4.6vw, 4.4rem); margin-bottom: 18px; letter-spacing: -0.035em; }
.hero .lead { margin-bottom: 28px; }
.hero__cta { display: grid; gap: 12px; justify-items: start; }
.hero__cta .btn { width: 100%; }

/* Flujo que se enciende paso a paso */
.flow {
  margin: 0; padding: 22px 20px;
  background: linear-gradient(180deg, rgba(19, 34, 58, 0.9), rgba(14, 26, 43, 0.9));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.flow__cap { display: flex; align-items: center; gap: 10px; font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.18); }
.flow__list { position: relative; display: grid; gap: 14px; }
.flow__list::before {             /* raíl */
  content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--line);
}
.flow__list::after {              /* raíl encendido */
  content: ""; position: absolute; left: 21px; top: 22px; width: 2px; height: calc((100% - 44px) * var(--p, 1));
  background: var(--orange); box-shadow: 0 0 12px var(--orange);
  transition: height .6s var(--ease);
}
.flow__step { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.flow__step b { display: block; font-size: 0.95rem; font-weight: 600; }
.flow__step small { display: block; font-size: 0.82rem; color: var(--muted); }
.flow__ico {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border-radius: 12px; background: var(--card-2); border: 1px solid var(--line-strong); color: var(--muted);
  transition: background-color .4s, color .4s, border-color .4s, box-shadow .4s, transform .4s var(--ease);
}
.flow__ico svg { width: 20px; height: 20px; }
.flow__step.is-on .flow__ico {
  background: var(--orange); border-color: var(--orange); color: var(--on-orange);
  box-shadow: 0 0 0 5px var(--orange-soft), 0 0 22px rgba(224, 138, 46, 0.45);
  transform: scale(1.04);
}
.js .flow__step:not(.is-on) > span:last-child { opacity: 0.5; }
.flow__step > span:last-child { transition: opacity .4s; }

/* ---------- 2. Problema ---------- */
.pains { display: grid; gap: 14px; margin-top: 32px; }
.pain { padding: 22px; transition: transform .25s var(--ease), border-color .25s, background-color .25s; }
.pain:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--card-2); }
.pain__ico { width: 26px; height: 26px; color: var(--orange-2); margin-bottom: 14px; }
.pain h3 { font-size: 1.15rem; margin-bottom: 8px; }
.pain p { color: var(--muted); }

/* ---------- 3. Selector por sector ---------- */
.tabs {
  position: relative; display: flex; gap: 8px; margin: 28px calc(var(--gutter) * -1) 18px; padding: 4px var(--gutter);
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; scroll-snap-align: start;
  min-height: 46px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1.5px solid var(--line-strong); color: var(--text); font-weight: 600;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.tab:hover { border-color: var(--muted); }
.tab:active { transform: scale(0.96); }
.tab[aria-selected="true"] { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }

.sector { padding: 24px 20px; display: grid; gap: 22px; }
.sector__tag { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange-2); margin-bottom: 10px; }
.sector__title { font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2rem); }
.sector__list { display: grid; gap: 12px; }
.sector__list li { display: flex; gap: 12px; align-items: flex-start; }
.sector__list .ico, .checks .ico { color: var(--orange-2); margin-top: 0.25em; }
.sector__gain { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--orange-soft); border: 1px solid rgba(224, 138, 46, 0.35); }
.sector__gain-label { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange-2); margin-bottom: 8px; }
.sector .btn { justify-self: stretch; }
.sector.is-changing [data-s] { animation: swap .35s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.note { display: flex; gap: 10px; align-items: center; margin-top: 18px; color: var(--muted); font-size: 0.95rem; }
.note .ico { color: var(--orange-2); }

/* ---------- 4. Calculadora ---------- */
.calc { display: grid; gap: 28px; }
.calc .lead { margin-top: 14px; }
.calc__box { padding: 22px 20px; display: grid; gap: 22px; }
.field__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.field label { font-size: 0.95rem; color: var(--text); }
.field output { font: 500 1.05rem/1 var(--mono); color: var(--orange-2); white-space: nowrap; }

input[type="range"] {
  --fill: 50%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 32px; background: transparent; cursor: pointer; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 99px;
  background: linear-gradient(90deg, var(--orange) var(--fill), var(--card-2) var(--fill));
}
input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--card-2); }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--orange); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%;
  background: var(--text); border: 4px solid var(--orange); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: transform .15s;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: 4px solid var(--orange);
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--orange-soft), 0 0 0 6px var(--orange-2); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--orange-soft), 0 0 0 6px var(--orange-2); }

.result { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result__item { padding: 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.result__num { display: block; font-size: clamp(1.8rem, 1.4rem + 2vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.result__num--accent { color: var(--orange-2); }
.result__label { display: block; margin-top: 4px; font-size: 0.85rem; color: var(--muted); }
.assumptions { font-size: 0.85rem; color: var(--muted); padding-top: 16px; border-top: 1px solid var(--line); }
.assumptions b { color: var(--text); font-weight: 600; }

/* ---------- 5. Demo de chat ---------- */
.demo { display: grid; gap: 36px; align-items: center; }
.checks { display: grid; gap: 12px; margin-top: 22px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }

.phone {
  position: relative; width: 100%; max-width: 380px; margin: 0 auto;
  border-radius: 34px; padding: 10px; background: #050A12;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 6px rgba(255, 255, 255, 0.02);
}
.phone__bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #1F2C34; border-radius: 26px 26px 0 0; }
.phone__bar b { display: block; font-size: 0.95rem; font-weight: 600; }
.phone__bar small { display: block; font-size: 0.75rem; color: #8FA3AE; min-height: 1.2em; }
.phone__avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: var(--on-orange); font-weight: 700; font-size: 0.8rem; }
.phone__chat {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  height: 460px; padding: 16px 12px 60px; overflow: hidden;
  background: #0B141A;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 18px 18px;
  border-radius: 0 0 26px 26px;
}
.bubble {
  position: relative; max-width: 84%; padding: 8px 12px 20px; border-radius: 12px;
  font-size: 0.9rem; line-height: 1.4;
}
.bubble time { position: absolute; right: 10px; bottom: 4px; font-size: 0.68rem; color: rgba(233, 237, 239, 0.6); }
.bubble--in { align-self: flex-start; background: #202C33; border-top-left-radius: 4px; }
.bubble--out { align-self: flex-end; background: #005C4B; border-top-right-radius: 4px; }
.chip {
  align-self: center; display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  background: var(--orange-soft); color: var(--orange-2); border: 1px solid rgba(224, 138, 46, 0.4);
}
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: #202C33; border-radius: 12px; border-top-left-radius: 4px; }
.typing--out { align-self: flex-end; background: #005C4B; border-radius: 12px; border-top-right-radius: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(233, 237, 239, 0.7); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.js .phone__chat > .bubble, .js .phone__chat > .chip { display: none; }
.js .phone__chat > .is-shown { display: block; animation: pop .35s var(--ease); }
.js .phone__chat > .chip.is-shown { display: inline-flex; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.phone__replay {
  position: absolute; right: 18px; bottom: 18px;
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(10, 19, 32, 0.85); color: var(--text);
  font-size: 0.8rem; cursor: pointer; transition: background-color .2s, transform .15s;
}
.phone__replay:hover { background: var(--card-2); }
.phone__replay:active { transform: scale(0.95); }
.phone__replay[hidden] { display: none; }

/* ---------- 6. Cómo trabajamos ---------- */
.steps { position: relative; display: grid; gap: 14px; margin-top: 32px; padding-left: 28px; }
.steps::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.steps::after {
  content: ""; position: absolute; left: 7px; top: 8px; width: 2px; height: calc((100% - 16px) * var(--p, 0));
  background: var(--orange); box-shadow: 0 0 10px var(--orange);
}
.step { position: relative; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .3s, transform .25s var(--ease); }
.step::before {
  content: ""; position: absolute; left: -27px; top: 26px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong); transition: background-color .3s, border-color .3s;
}
.step.is-passed { border-color: rgba(224, 138, 46, 0.4); }
.step.is-passed::before { background: var(--orange); border-color: var(--orange); }
.step:hover { transform: translateX(4px); }
.step__num { font: 500 0.8rem/1 var(--mono); color: var(--orange-2); letter-spacing: 0.1em; }
.step h3 { font-size: 1.2rem; margin: 10px 0 6px; }
.step p { color: var(--muted); }

/* ---------- 7. Diagnóstico ---------- */
.quiz-wrap { display: grid; gap: 28px; }
.quiz { padding: 22px 20px; }
.quiz__progress { height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.quiz__progress span { display: block; height: 100%; width: 25%; background: var(--orange); border-radius: 99px; transition: width .4s var(--ease); }
.quiz__count { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.quiz__step { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz__step legend { padding: 0; font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 18px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opts--1 { grid-template-columns: 1fr; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span {
  display: flex; align-items: center; min-height: 54px; height: 100%; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--bg);
  font-weight: 500; line-height: 1.3;
  transition: border-color .2s, background-color .2s, transform .15s;
}
.opt:hover span { border-color: var(--muted); }
.opt:active span { transform: scale(0.98); }
.opt input:checked + span { border-color: var(--orange); background: var(--orange-soft); box-shadow: inset 0 0 0 1px var(--orange); }
.opt input:focus-visible + span { outline: 3px solid var(--orange-2); outline-offset: 2px; }
.quiz__error { margin-top: 12px; color: #FFB4A3; font-size: 0.9rem; }
.quiz__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.quiz__nav #quiz-next { margin-left: auto; }
.quiz__result { display: grid; gap: 14px; }
.quiz__result:focus { outline: none; }
.quiz__result h3 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
.quiz__result > p:not(.eyebrow):not(.micro) { color: var(--muted); }
.quiz__result .checks { margin-top: 0; }
.quiz__result .link { justify-self: start; }
.quiz.is-done .quiz__progress, .quiz.is-done .quiz__count { display: none; }

/* ---------- 8. FAQ ---------- */
.faq-wrap { display: grid; gap: 28px; }
.faq { display: grid; gap: 10px; }
.faq__item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s; }
.faq__item[open] { border-color: var(--line-strong); }
.faq__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 600;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange-soft) no-repeat center / 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F29F4B' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  transition: transform .3s var(--ease);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--orange-2); }
.faq__item p { padding: 0 18px 18px; color: var(--muted); }

/* ---------- 9. CTA final + footer ---------- */
.final { position: relative; overflow: hidden; padding: 88px 0 96px; text-align: center; }
.final::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 720px; height: 720px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(224, 138, 46, 0.16), transparent 60%); pointer-events: none;
}
.final__in { position: relative; display: grid; justify-items: center; gap: 18px; }
.final__mark { width: 64px; height: 64px; color: var(--text); margin-bottom: 6px; }
.final .h2 { max-width: 16ch; }
.final .lead { max-width: 34ch; }
.final .btn { margin-top: 8px; }

.footer { border-top: 1px solid var(--line); padding: 36px 0 110px; color: var(--muted); font-size: 0.9rem; }
.footer__in { display: grid; gap: 22px; }
.footer__brand p { margin-top: 10px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.footer__links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50;
  display: inline-flex; align-items: center; gap: 10px;
  height: 60px; min-width: 60px; padding: 0 18px; justify-content: center;
  border-radius: 999px; background: var(--wa); color: #06210F; text-decoration: none; font-weight: 700;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.wa-float svg { width: 26px; height: 26px; }
.wa-float span { display: none; }
.wa-float:hover { transform: translateY(-3px) scale(1.03); }
.wa-float:active { transform: scale(0.95); }
.wa-float::after {                 /* pulso suave para llamar la atención */
  content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--wa);
  animation: ring 2.8s var(--ease) infinite;
}
@keyframes ring { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.35); } }

/* ---------- Aparición al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Páginas legales ---------- */
.legal { padding: 48px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); margin: 8px 0 8px; }
.legal h2 { font-size: 1.25rem; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--muted); margin-bottom: 10px; }
.legal ul { list-style: disc; padding-left: 20px; }
.legal a { color: var(--orange-2); }
.legal strong { color: var(--text); }
.legal .updated { font-family: var(--mono); font-size: 0.8rem; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.back .ico { transform: rotate(180deg); }

/* =========================================================
   Pantallas más grandes
   ========================================================= */
@media (min-width: 560px) {
  .pains { grid-template-columns: 1fr 1fr; }
  .hero__cta .btn { width: auto; }
  .opts--1 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  :root { --gutter: 32px; --header-h: 72px; }
  .nav { display: flex; gap: 28px; }
  .nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color .2s; }
  .nav a:hover { color: var(--text); }
  .section { padding: 112px 0; }
  .hero { padding: 72px 0 104px; }
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 56px; }
  .flow { padding: 28px; }
  .pains { grid-template-columns: repeat(4, 1fr); margin-top: 44px; }
  .sector { grid-template-columns: 1.1fr 0.9fr; grid-template-areas: "head gain" "list gain" "cta gain"; padding: 36px; column-gap: 40px; }
  .sector__head { grid-area: head; }
  .sector__list { grid-area: list; }
  .sector__gain { grid-area: gain; align-self: start; padding: 24px; }
  .sector__gain p:last-child { font-size: 1.15rem; color: var(--text); }
  .sector .btn { grid-area: cta; justify-self: start; }
  .calc { grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
  .calc__intro { position: sticky; top: 120px; }
  .calc__box { padding: 32px; }
  .demo { grid-template-columns: 1fr 1fr; gap: 64px; }
  .steps { grid-template-columns: repeat(4, 1fr); padding-left: 0; padding-top: 30px; gap: 20px; margin-top: 44px; }
  .steps::before { left: 8px; right: 8px; top: 7px; bottom: auto; width: auto; height: 2px; }
  .steps::after { left: 8px; top: 7px; height: 2px; width: calc((100% - 16px) * var(--p, 0)); }
  .step::before { left: 20px; top: -30px; }
  .step:hover { transform: translateY(-4px); }
  .quiz-wrap { grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
  .quiz { padding: 32px; }
  .opts { grid-template-columns: 1fr 1fr; }
  .faq-wrap { grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
  .footer { padding-bottom: 40px; }
  .footer__in { grid-template-columns: 1fr auto; align-items: center; }
  .footer__copy { grid-column: 1 / -1; }
  .wa-float { right: 24px; bottom: 24px; }
  .wa-float span { display: inline; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .wa-float::after { display: none; }
}
