/* ==========================================================================
   MAVI — components.css
   Nav, footer, buttons, cards, FAQ, forms, stats, market grid, CTA band.
   ========================================================================== */

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding-block: 18px;
  transition: padding .35s var(--ease-out), background-color .35s var(--ease-out), border-color .35s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  padding-block: 12px;
  background: rgba(7,11,20,.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  height: 30px;
}
.site-header .brand-mark {
  height: 38px;
}
.site-header .brand-mark img {
  height: 38px;
}
.brand-mark img {
  height: 30px;
  width: auto;
  display: block;
}
.brand-word {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .01em;
  color: var(--fg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  position: relative;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.nav-link:hover { color: var(--fg); background: rgba(255,255,255,.04); }
.nav-link[aria-current="page"] { color: var(--fg); }
.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--accent-bright);
  border-radius: 2px;
}

.nav-services { position: relative; }
.nav-services-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  font-size: 14.5px; font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.nav-services-trigger:hover, .nav-services:focus-within .nav-services-trigger { color: var(--fg); background: rgba(255,255,255,.04); }
.nav-services-trigger svg { width: 14px; height: 14px; transition: transform .25s var(--ease-out); }
.nav-services:hover .nav-services-trigger svg,
.nav-services:focus-within .nav-services-trigger svg { transform: rotate(180deg); }

.nav-services-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, -6px);
  width: 460px;
  max-width: 86vw;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), 0 20px 50px -20px rgba(0,0,0,.7);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), visibility .2s;
  z-index: 50;
}
.nav-services:hover .nav-services-panel,
.nav-services:focus-within .nav-services-panel {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0);
}
.nav-services-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background-color .18s var(--ease-out);
}
.nav-services-item:hover { background: rgba(79,179,255,.08); }
.nav-services-item[aria-current="page"] { background: rgba(79,179,255,.1); }
.nav-services-item[aria-current="page"] .name { color: var(--accent-bright); }
.nav-services-item .num {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--accent-bright);
  padding-top: 2px;
}
.nav-services-item .name { display: block; font-size: 14px; font-weight: 600; color: var(--fg); }
.nav-services-item .desc { display: block; font-size: 12px; color: var(--muted-2); margin-top: 2px; line-height: 1.4; }

.nav-cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .nav-links, .nav-services-trigger + .nav-services-panel { display: none; }
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    inset: 64px 12px auto 12px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    box-shadow: var(--shadow-card);
    gap: 2px;
  }
  .nav-links.is-open .nav-services-panel {
    display: grid;
    grid-template-columns: 1fr;
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    width: auto;
    max-width: none;
    box-shadow: none;
    border-color: transparent;
    background: transparent;
    margin-top: 4px;
  }
  .nav-services-trigger { width: 100%; justify-content: space-between; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 380px) {
  .nav-cta .btn-primary { padding-inline: 14px; font-size: 13px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding-inline: 22px;
  border-radius: var(--radius-full);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .2s var(--ease-out), background-color .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), color .2s var(--ease-out);
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary {
  background: var(--accent);
  color: var(--fg);
  box-shadow: 0 8px 24px -10px rgba(47,111,237,.7);
}
.btn-primary:hover { background: var(--accent-bright); color: var(--bg); transform: translateY(-1px); box-shadow: 0 10px 28px -8px rgba(79,179,255,.6); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-bright);
}
.btn-secondary:hover { border-color: var(--accent-bright); background: rgba(79,179,255,.08); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  height: auto;
  padding: 0;
  border-radius: 0;
  font-weight: 500;
}
.btn-ghost .underline {
  position: relative;
}
.btn-ghost .underline::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(.4);
  transform-origin: left;
  opacity: .4;
  transition: transform .25s var(--ease-out), opacity .25s var(--ease-out);
}
.btn-ghost:hover { color: var(--accent-bright); }
.btn-ghost:hover .underline::after { transform: scaleX(1); opacity: 1; }

.btn-sm { height: 38px; padding-inline: 16px; font-size: 13.5px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: border-color .3s var(--ease-out), transform .3s var(--ease-out), background-color .3s var(--ease-out);
}
.card:hover { border-color: var(--border-bright); }

.services-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

.service-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}
.service-card .num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--accent-bright);
}
.service-card h3 { color: var(--fg); }
.service-card p { color: var(--muted); font-size: 14.5px; }
.service-card .icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(47,111,237,.22), rgba(79,179,255,.06));
  border: 1px solid var(--border-bright);
  color: var(--accent-bright);
}
.service-card .icon svg { width: 22px; height: 22px; }
.service-card .go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-bright);
}
.service-card .go svg { width: 14px; height: 14px; transition: transform .25s var(--ease-out); }
.service-card:hover .go svg { transform: translateX(4px); }

/* ---------- Stats / social proof ---------- */
.stat {
  padding: 26px 22px;
  text-align: left;
}
.stat .value {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 2vw + 1.2rem, 2.9rem);
  color: var(--fg);
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.stat .value .suffix { font-size: .55em; color: var(--accent-bright); }
.stat .label { margin-top: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Market grid ---------- */
.market-card {
  padding: 30px;
}
.market-card .eyebrow { margin-bottom: 14px; }
.market-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tag {
  font-size: 12.5px;
  color: var(--muted);
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.tag:hover { border-color: var(--accent-bright); color: var(--fg); }

/* ---------- Reading tip callout ---------- */
.reading-tip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-bright);
  border-radius: var(--radius-sm);
}
.reading-tip svg { width: 20px; height: 20px; color: var(--accent-bright); flex-shrink: 0; margin-top: 2px; }
.reading-tip p { color: var(--muted); font-size: 15px; font-style: italic; line-height: 1.55; }
.reading-tip strong { color: var(--fg); font-style: normal; }

/* ---------- Includes list ---------- */
.includes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}
.includes-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}
.includes-item svg {
  width: 18px; height: 18px;
  color: var(--accent-bright);
  flex-shrink: 0;
  margin-top: 2px;
}
.includes-item span { font-size: 14.5px; color: var(--fg); }
@media (max-width: 720px) {
  .includes-grid { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 22px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 16.5px;
  color: var(--fg);
}
.faq-q .plus {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-bright);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: border-color .25s var(--ease-out), background-color .25s var(--ease-out);
}
.faq-q .plus::before, .faq-q .plus::after {
  content: '';
  position: absolute;
  background: var(--accent-bright);
  transition: transform .3s var(--ease-out);
}
.faq-q .plus::before { width: 10px; height: 1.5px; }
.faq-q .plus::after { width: 1.5px; height: 10px; }
.faq-item.is-open .faq-q .plus { border-color: var(--accent-bright); background: rgba(79,179,255,.12); }
.faq-item.is-open .faq-q .plus::after { transform: rotate(90deg) scaleY(0); }
.faq-a-wrap { height: 0; overflow: hidden; }
.faq-a {
  padding: 0 22px 22px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 62ch;
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  background: radial-gradient(120% 160% at 20% 0%, rgba(47,111,237,.28), transparent 55%), var(--surface);
  border: 1px solid var(--border-bright);
  overflow: hidden;
  isolation: isolate;
}
.cta-band::after {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(120% 120% at 80% 20%, #000, transparent 70%);
  z-index: -1;
}
.cta-band-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-contact-list { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.cta-contact-list a {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14.5px; color: var(--muted);
  transition: color .2s var(--ease-out);
}
.cta-contact-list a:hover { color: var(--accent-bright); }
.cta-contact-list svg { width: 16px; height: 16px; color: var(--accent-bright); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 56px 32px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--muted); transition: color .2s var(--ease-out); }
.footer-col a:hover { color: var(--accent-bright); }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 32ch; margin-top: 12px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-full);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); transition: color .2s var(--ease-out), border-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.footer-social a svg { width: 18px; height: 18px; }
.footer-social a:hover { color: var(--accent-bright); border-color: var(--accent); transform: translateY(-2px); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted-2);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Breadcrumb / page hero shared ---------- */
.page-hero {
  padding-block: clamp(140px, 16vw, 200px) clamp(56px, 7vw, 96px);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 60vw; height: 60vw;
  max-width: 720px; max-height: 720px;
  background: radial-gradient(circle, rgba(47,111,237,.22), transparent 65%);
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted-2);
  margin-bottom: 22px;
}
.breadcrumb a { color: var(--muted-2); transition: color .2s var(--ease-out); }
.breadcrumb a:hover { color: var(--accent-bright); }
.breadcrumb svg { width: 12px; height: 12px; }

.step-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-full);
  font-size: 12.5px; color: var(--muted);
  margin-bottom: 20px;
}
.step-pill .n {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--fg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 11px;
}

/* ---------- Marquee (target market ticker) ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding-block: 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.6vw, 1.6rem);
  color: var(--muted-2);
  padding-inline: 28px;
  white-space: nowrap;
  transition: color .35s var(--ease-out);
}
.marquee-item.is-accent { color: var(--accent-bright); }
.marquee-item .dot { color: var(--border-bright); margin-left: 28px; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Utility reveal targets ---------- */
[data-reveal] { opacity: 1; }
.js .no-js-hide { }

/* ---------- Interactive hero glow (pointer-tracked) ---------- */
[data-cursor-glow] { position: relative; overflow: hidden; }
.hero-glow {
  position: absolute;
  top: 0; left: 0;
  width: 520px; height: 520px;
  margin-left: -260px; margin-top: -260px;
  background: radial-gradient(circle, rgba(79,179,255,.16), transparent 68%);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* ---------- Tilt cards ---------- */
[data-tilt] { transform-style: preserve-3d; will-change: transform; }

/* ---------- Magnetic buttons ---------- */
[data-magnetic] { will-change: transform; }

/* ---------- WhatsApp floating action button ---------- */
.whatsapp-fab {
  position: fixed;
  right: clamp(16px, 4vw, 28px);
  bottom: clamp(16px, 4vw, 28px);
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--fg);
  box-shadow: 0 10px 28px -8px rgba(47, 111, 237, .6), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.whatsapp-fab svg { width: 28px; height: 28px; }
.whatsapp-fab:hover {
  background: var(--accent-bright);
  color: var(--bg);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 32px -8px rgba(79, 179, 255, .65), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}
@media (max-width: 480px) {
  .whatsapp-fab { width: 50px; height: 50px; }
  .whatsapp-fab svg { width: 25px; height: 25px; }
}

/* ---------- Contact form (contacto.html) ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 4vw, 36px);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
}
.form-field em { color: var(--muted-2); font-weight: 400; font-style: normal; }
.form-field input,
.form-field textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 400;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(79,179,255,.15);
}
.form-field textarea { resize: vertical; min-height: 140px; font-family: var(--font-body); }
.contact-form .btn { align-self: flex-start; }
.form-note { font-size: 13px; color: var(--muted-2); margin: 0; transition: color .2s var(--ease-out); }
.form-note.is-success { color: var(--accent-bright); }
.form-note.is-error { color: #ff6b6b; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contact-form .btn[disabled] { opacity: .6; pointer-events: none; }

.contact-info-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-info-list .label { display: block; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.contact-info-list a { color: var(--fg); font-weight: 600; }
.contact-info-list a:hover { color: var(--accent-bright); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}
