/* =========================================================
   MacTracsGPS — Estilos v1
   Colores principales: cambia aquí y se aplica a toda la web
   ========================================================= */
:root {
  --navy-900: #0b1a2e;
  --navy-800: #10233d;
  --navy-700: #16304f;
  --accent: #22e3a5;       /* verde GPS */
  --accent-dark: #14b884;
  --blue: #3a8dff;
  --text: #1b2433;
  --muted: #5d6b80;
  --bg: #ffffff;
  --bg-alt: #f3f6fa;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(11, 26, 46, .08);
  --shadow-lg: 0 25px 60px rgba(11, 26, 46, .25);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(780px, 100% - 32px); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px; font-weight: 700; font-size: .95rem;
  border: 2px solid transparent; cursor: pointer; transition: .2s ease; font-family: inherit;
}
.btn--primary { background: var(--accent); color: var(--navy-900); }
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn--outline { border-color: currentColor; }
.btn--outline:hover { background: rgba(34, 227, 165, .12); border-color: var(--accent); }
.btn--ghost { border-color: rgba(255,255,255,.25); padding: .6em 1.1em; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--block { width: 100%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: .8em;
}
.accent { color: var(--accent); }

.dot-live {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(34,227,165,.7); animation: live 1.8s infinite;
  display: inline-block;
}
@keyframes live {
  70% { box-shadow: 0 0 0 10px rgba(34,227,165,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,227,165,0); }
}

/* ---------- Encabezado ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: rgba(11, 26, 46, .85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06); color: #fff;
  transition: box-shadow .2s;
}
.header.is-scrolled { box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: .55em; font-weight: 700; font-size: 1.2rem; }
.logo strong { color: var(--accent); font-weight: 800; }

.nav { display: flex; align-items: center; gap: 1.8rem; font-weight: 500; font-size: .95rem; }
.nav a:not(.btn) { opacity: .85; transition: .2s; }
.nav a:not(.btn):hover { opacity: 1; color: var(--accent); }

.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .25s; border-radius: 2px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 85% 20%, rgba(58,141,255,.25), transparent 60%),
    radial-gradient(700px 400px at 10% 90%, rgba(34,227,165,.15), transparent 60%),
    var(--navy-900);
  color: #fff; padding: 140px 0 90px; overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero .eyebrow { color: var(--accent); background: rgba(34,227,165,.1); padding: .45em 1em; border-radius: 999px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 800; }
.lead { font-size: 1.15rem; color: #b9c6d8; max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 2.5rem; }
.hero__stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 2.5rem; }
.hero__stats strong { display: block; font-size: 1.6rem; color: #fff; }
.hero__stats span { font-size: .85rem; color: #8ea0b8; }

.hero__visual { position: relative; display: flex; justify-content: center; }
.phone {
  width: 290px; padding: 12px; border-radius: 40px; background: #050d18;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #22364f; transform: rotate(3deg);
}
.phone__screen { border-radius: 30px; overflow: hidden; background: #0f2239; position: relative; }
.phone__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; font-size: .8rem; font-weight: 600; background: #0b1a2e;
}
.phone__bar .status { display: flex; align-items: center; gap: .4em; color: var(--accent); }
.map { width: 100%; height: 380px; }
.route { animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -16; } }
.pulse { animation: pulse 2s ease-out infinite; transform-origin: center; }
@keyframes pulse { 0% { r: 8; opacity: .5; } 100% { r: 22; opacity: 0; } }
.phone__card {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  background: rgba(11,26,46,.92); border: 1px solid #1f3a5a; border-radius: 16px; padding: 10px;
  text-align: center;
}
.phone__card small { display: block; font-size: .65rem; color: #8ea0b8; }
.phone__card strong { font-size: .85rem; }
.phone__card .ok { color: var(--accent); }

.float-card {
  position: absolute; display: flex; align-items: center; gap: .7em;
  background: #fff; color: var(--text); padding: .7em 1em; border-radius: 14px;
  box-shadow: var(--shadow-lg); font-size: .85rem; animation: float 5s ease-in-out infinite;
}
.float-card strong { display: block; font-size: .85rem; }
.float-card small { color: var(--muted); }
.float-card--alert { top: 12%; left: -4%; }
.float-card--lock { bottom: 14%; right: -2%; animation-delay: -2.5s; }
.icon-badge {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: #fff4e0; font-size: 1rem;
}
.float-card--lock .icon-badge { background: #e3fbf2; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Secciones ---------- */
.section { padding: 90px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section__head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; }
.section__head p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }

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

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; transition: .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); margin-bottom: 1.2rem;
}
.card__icon svg { width: 26px; height: 26px; fill: var(--accent); }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); margin: 0; }

.segment {
  background: #fff; border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center;
  box-shadow: var(--shadow);
}
.segment__emoji { font-size: 2.6rem; display: block; margin-bottom: .6rem; }
.segment h3 { font-size: 1.15rem; }
.segment p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: s; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 32px; left: 16%; right: 16%;
  border-top: 2px dashed var(--border); z-index: 0;
}
.step { text-align: center; position: relative; z-index: 1; }
.step__num {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.2rem;
  background: var(--navy-900); color: var(--accent); font-size: 1.5rem; font-weight: 800;
  box-shadow: 0 0 0 8px #fff;
}
.step h3 { font-size: 1.2rem; }
.step p { color: var(--muted); max-width: 22em; margin-inline: auto; }

/* Planes */
.plans { align-items: stretch; }
.plan {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 2.2rem; display: flex; flex-direction: column;
}
.plan h3 { font-size: 1.4rem; }
.plan__desc { color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 2rem; flex: 1; }
.plan li { padding: .5em 0 .5em 1.8em; position: relative; border-bottom: 1px solid var(--border); font-size: .95rem; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: .85em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b1a2e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.plan--featured { background: var(--navy-900); color: #fff; border-color: var(--navy-900); transform: scale(1.04); box-shadow: var(--shadow-lg); }
.plan--featured .plan__desc { color: #9fb0c6; }
.plan--featured li { border-color: rgba(255,255,255,.1); }
.plan__tag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--navy-900); font-size: .75rem; font-weight: 800;
  padding: .35em 1em; border-radius: 999px; text-transform: uppercase; letter-spacing: .08em;
}

/* FAQ */
.faq details {
  border: 1px solid var(--border); border-radius: 14px; margin-bottom: 1rem; background: #fff;
  transition: .2s;
}
.faq details[open] { box-shadow: var(--shadow); border-color: transparent; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.2rem 1.5rem; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--accent-dark); transition: .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.5rem 1.3rem; margin: 0; color: var(--muted); }

/* Contacto */
.section--cta { background: var(--navy-900); color: #fff; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.contact__info .eyebrow { color: var(--accent); }
.contact__info h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.contact__info > p { color: #b9c6d8; font-size: 1.1rem; }
.contact__list { list-style: none; padding: 0; margin: 2rem 0 0; }
.contact__list li { display: flex; gap: .8em; align-items: center; padding: .6em 0; color: #d6dfeb; }
.contact__list a:hover { color: var(--accent); }

.form { background: #fff; color: var(--text); border-radius: 22px; padding: 2.2rem; box-shadow: var(--shadow-lg); }
.form h3 { font-size: 1.4rem; margin-bottom: 1.2rem; }
.form__row { margin-bottom: 1rem; }
.form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35em; }
.form input, .form select, .form textarea {
  width: 100%; padding: .8em 1em; border: 1.5px solid var(--border); border-radius: 12px;
  font: inherit; font-size: .95rem; background: var(--bg-alt); transition: .2s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(34,227,165,.15);
}
.form .is-invalid { border-color: #e5484d; }
.form__error { color: #e5484d; font-size: .85rem; min-height: 1.2em; margin: 0 0 .5rem; }
.form__note { display: block; text-align: center; color: var(--muted); margin-top: .8rem; }

/* Pie */
.footer { background: #07111f; color: #8ea0b8; padding: 50px 0 30px; font-size: .9rem; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 3rem; align-items: start; }
.logo--footer { color: #fff; margin-bottom: .6rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer__links a:hover { color: var(--accent); }
.footer__copy { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem; margin: 0; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; background: #25d366;
  display: grid; place-items: center; box-shadow: 0 10px 25px rgba(37,211,102,.45);
  transition: .2s;
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.wa-float:hover { transform: scale(1.08); }

/* Animación al hacer scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .float-card--alert { left: 0; }
  .float-card--lock { right: 0; }
}

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-900); padding: 1rem 16px 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    transform: translateY(-120%); transition: transform .3s ease; z-index: -1;
  }
  .nav.is-open { transform: none; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav__login { margin-top: 1rem; }

  .hero { padding: 110px 0 70px; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .hero__cta, .hero__stats { justify-content: center; }
  .hero__visual { margin-top: 1rem; }

  .grid--3, .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .plan--featured { transform: none; }
  .contact { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer__inner { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
}

@media (max-width: 520px) {
  .grid--4 { grid-template-columns: 1fr; }
  .hero__stats { gap: 1.5rem; }
  .hero__cta .btn { width: 100%; }
  .phone { width: 250px; }
  .map { height: 330px; }
  .float-card { font-size: .75rem; padding: .55em .8em; }
  .float-card--alert { top: 6%; left: -2%; }
  .float-card--lock { right: -2%; }
  .form { padding: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
