/* ==========================================================================
   Nexalv Martínez — styles.css
   Índice:
   1.  Variables (:root)
   2.  Reset y base
   3.  Utilidades y layout
   4.  Botones, pills, chips y tags
   5.  Header y navegación
   6.  Hero (+ maqueta ilustrativa)
   7.  Sectores
   8.  Problemas
   9.  Soluciones (bento + maquetas de producto)
   10. Servicios
   11. Beneficios
   12. Método (timeline)
   13. FAQ
   14. Contacto (CTA)
   15. Footer
   16. Animaciones
   17. Breakpoints (Mobile-First)
   ========================================================================== */

/* 1. VARIABLES ------------------------------------------------------------ */
:root {
  --bg-base: #07111F;
  --bg-surface: #0F1C35;
  --bg-deep: #050912;
  --bg-raised: #14254A;

  --accent: #10B981;
  --accent-strong: #34D399;
  --gold: #D4AF37;
  --teal: #2DD4BF;
  --danger: #F87171;
  --warn: #FBBF24;

  --text: #EAF0F9;
  --text-muted: #A3B3CB;

  --border: rgba(163, 179, 203, 0.16);
  --border-strong: rgba(163, 179, 203, 0.3);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);

  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-y: clamp(4rem, 9vw, 8rem);
  --max-width: 1440px;
  --header-h: 68px;
}

/* 2. RESET Y BASE --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-base);
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.75rem; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--text-muted); }
ul, ol { margin: 0; padding: 0; list-style: none; }
a  { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { display: block; }

.ico { width: 1.25em; height: 1.25em; flex: none; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* 3. UTILIDADES Y LAYOUT -------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 700;
  border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.section { padding: var(--section-y) 0; }
.section-alt {
  background: linear-gradient(180deg, var(--bg-surface), #0B1730);
  border-block: 1px solid var(--border);
}

.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head-center { margin-inline: auto; text-align: center; }

.eyebrow {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* 4. BOTONES, PILLS, CHIPS Y TAGS ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.5rem;
  font: inherit;
  font-weight: 700;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(16, 185, 129, 0.42); }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; }
.btn-small { padding: 0.5rem 1.1rem; font-size: 0.95rem; box-shadow: none; }
.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); box-shadow: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
}
.pill-dot { width: 8px; height: 8px; background: var(--accent-strong); border-radius: 50%; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2); }

.chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}
.chip-ok   { color: var(--accent-strong); background: rgba(16, 185, 129, 0.15); }
.chip-wait { color: var(--warn);          background: rgba(251, 191, 36, 0.15); }
.chip-late { color: var(--danger);        background: rgba(248, 113, 113, 0.15); }

.tag {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.2rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.1);
  border-radius: 999px;
}
.tag-gold { color: var(--gold); background: rgba(212, 175, 55, 0.12); }

/* 5. HEADER Y NAVEGACIÓN -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 17, 31, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--text); font-weight: 800; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-strong), var(--teal));
  border-radius: 11px;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name span { color: var(--accent-strong); }

.nav-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, top 0.2s, background 0.2s;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after  { top: 6px; }
.nav-toggle[aria-expanded='true'] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded='true'] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle-bar::after  { top: 0; transform: rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 1rem var(--gutter) 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.site-nav.is-open { display: block; }
.site-nav ul { display: flex; flex-direction: column; gap: 0.15rem; }
.site-nav a:not(.btn) { display: block; padding: 0.75rem 0; color: var(--text); font-weight: 600; }
.site-nav .btn { display: flex; margin-top: 0.75rem; }

/* 6. HERO ----------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding: 3.5rem 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 420px at 85% 10%, rgba(16, 185, 129, 0.22), transparent 70%),
    radial-gradient(520px 380px at 0% 90%, rgba(45, 212, 191, 0.12), transparent 70%),
    linear-gradient(rgba(163, 179, 203, 0.06) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(163, 179, 203, 0.06) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}

.hero-grid { position: relative; display: grid; gap: 3rem; align-items: center; }

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent-strong), var(--teal) 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.h1-brand { display: block; margin-top: 0.8rem; font-size: 0.34em; font-weight: 600; letter-spacing: 0.02em; color: var(--text-muted); }

.lead { max-width: 56ch; font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.75rem 0 2rem; }

.hero-points { display: grid; gap: 0.6rem; }
.hero-points li { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-size: 0.97rem; }
.hero-points .ico { color: var(--accent-strong); }

/* Maqueta ilustrativa del hero */
.hero-visual { position: relative; padding: 0 0 4.5rem; }

.mock {
  background: linear-gradient(180deg, var(--bg-raised), var(--bg-surface));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.window { overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.75rem 1rem; background: rgba(0, 0, 0, 0.25); border-bottom: 1px solid var(--border); }
.window-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.window-bar span:nth-child(1) { background: #F87171; }
.window-bar span:nth-child(2) { background: #FBBF24; }
.window-bar span:nth-child(3) { background: #34D399; }
.window-bar b { margin-left: 0.6rem; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.agenda li { display: grid; grid-template-columns: 3.2rem 1fr auto; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); }
.agenda li:last-child { border-bottom: 0; }
.agenda time { font-size: 0.85rem; font-weight: 700; color: var(--teal); }
.agenda strong { display: block; font-size: 0.95rem; color: var(--text); }
.agenda small { color: var(--text-muted); font-size: 0.8rem; }

.bubble {
  position: absolute;
  right: 0;
  bottom: 0.5rem;
  width: min(78%, 290px);
  padding: 0.9rem 1rem;
  background: #0B2A2A;
  border-color: rgba(16, 185, 129, 0.45);
}
.bubble-head { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; font-size: 0.75rem; font-weight: 700; color: var(--accent-strong); }
.bubble p { margin: 0 0 0.7rem; font-size: 0.88rem; color: var(--text); line-height: 1.45; }
.bubble-actions { display: flex; gap: 0.4rem; }
.bubble-actions span { flex: 1; padding: 0.35rem 0.4rem; font-size: 0.75rem; font-weight: 600; text-align: center; color: var(--accent-strong); background: rgba(16, 185, 129, 0.12); border-radius: 8px; }

.floater {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
}
.floater .ico { color: var(--gold); width: 1.5rem; height: 1.5rem; }
.floater strong { display: block; font-size: 0.85rem; color: var(--text); }
.floater small { font-size: 0.72rem; color: var(--text-muted); }

/* 7. SECTORES ------------------------------------------------------------- */
.sectors { padding: 1.75rem 0; background: var(--bg-deep); border-block: 1px solid var(--border); }
.sectors-title { margin-bottom: 1rem; text-align: center; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.sectors-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.sectors-list li {
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* 8. PROBLEMAS ------------------------------------------------------------ */
.split { display: grid; gap: 2.5rem; align-items: start; }
.split .section-head { margin-bottom: 0; }

.pains { display: grid; gap: 1rem; }
.pains li {
  display: flex;
  gap: 1rem;
  padding: 1.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
}
.pains h3 { margin-bottom: 0.3rem; }
.pains p { margin: 0; font-size: 0.95rem; }
.pain-ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; color: var(--danger); background: rgba(248, 113, 113, 0.1); border-radius: 12px; }

/* 9. SOLUCIONES (BENTO) --------------------------------------------------- */
.bento { display: grid; gap: 1.25rem; }

.product {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-raised), var(--bg-surface) 60%);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.product:hover { transform: translateY(-4px); border-color: rgba(16, 185, 129, 0.5); box-shadow: var(--shadow); }
.product-featured { border-color: rgba(16, 185, 129, 0.45); box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15), 0 20px 60px rgba(16, 185, 129, 0.08); }

.product-visual {
  display: grid;
  place-items: center;
  padding: 1.75rem 1.25rem;
  background:
    radial-gradient(260px 160px at 50% 0%, rgba(16, 185, 129, 0.15), transparent 70%),
    var(--bg-deep);
  border-bottom: 1px solid var(--border);
}
.product-body { padding: 1.6rem; }
.product-body h3 { font-size: 1.4rem; }
.product-body h3 small { display: inline-block; margin-left: 0.3rem; font-size: 0.75rem; font-weight: 700; color: var(--gold); letter-spacing: 0.05em; }

.ticks { display: grid; gap: 0.5rem; margin-top: 1rem; }
.ticks li { position: relative; padding-left: 1.7rem; font-size: 0.95rem; color: var(--text); }
.ticks li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.35em;
  width: 0.8rem;
  height: 0.45rem;
  border-left: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  transform: rotate(-45deg);
}
.ticks-row { grid-template-columns: 1fr 1fr; }

/* Mini maquetas */
.mini {
  width: 100%;
  max-width: 330px;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  font-size: 0.85rem;
}
.mini b { color: var(--text); }
.mini small { color: var(--text-muted); }

.slots-head, .ledger-head, .stock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.slots-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.slot { padding: 0.45rem 0; text-align: center; font-size: 0.78rem; font-weight: 600; color: var(--text); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); border-radius: 8px; }
.slot.taken { color: var(--text-muted); opacity: 0.45; text-decoration: line-through; }
.slot.sel { color: var(--bg-deep); background: var(--accent-strong); border-color: var(--accent-strong); }
.slots-foot, .stock-foot { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--border); color: var(--accent-strong); font-size: 0.8rem; font-weight: 600; }

.ledger-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.7rem; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.av { display: grid; place-items: center; width: 32px; height: 32px; font-size: 0.7rem; font-weight: 800; color: var(--bg-deep); background: linear-gradient(135deg, var(--teal), var(--accent)); border-radius: 50%; }
.ledger-row strong { display: block; margin-bottom: 0.3rem; font-size: 0.85rem; color: var(--text); }

.bar { display: block; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; }
.bar u { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--teal)); border-radius: 99px; text-decoration: none; }

.stock-row { display: grid; grid-template-columns: 5.5rem 1fr 2rem; align-items: center; gap: 0.7rem; padding: 0.5rem 0; color: var(--text-muted); }
.stock-row b { text-align: right; }
.stock-row.low .bar u { background: var(--danger); }
.stock-row.low b { color: var(--danger); }

.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; max-width: 420px; background: transparent; border: 0; padding: 0; }
.modules span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
}
.modules .ico { width: 1.6rem; height: 1.6rem; color: var(--teal); }

/* 10. SERVICIOS ----------------------------------------------------------- */
.services { display: grid; gap: 1.25rem; }
.service {
  padding: 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s;
}
.service:hover { transform: translateY(-4px); border-color: rgba(16, 185, 129, 0.5); }
.service p { margin: 0; font-size: 0.95rem; }
.service-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.1rem;
  color: var(--accent-strong);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
}
.service-ico .ico { width: 1.6rem; height: 1.6rem; }

/* 11. BENEFICIOS ---------------------------------------------------------- */
.benefits { padding: 3.5rem 0; background: linear-gradient(135deg, #0A3D33, #0F1C35 55%, #07111F); border-block: 1px solid var(--border); }
.benefits-grid { display: grid; gap: 1.75rem; }
.benefits-grid li { padding-left: 1.1rem; border-left: 3px solid var(--gold); }
.benefits-grid strong { display: block; margin-bottom: 0.3rem; font-size: 1.35rem; color: var(--text); letter-spacing: -0.01em; }
.benefits-grid span { color: var(--text-muted); }

/* 12. MÉTODO (TIMELINE) --------------------------------------------------- */
.timeline { position: relative; display: grid; gap: 1.5rem; }
.timeline::before { content: ''; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--gold)); opacity: 0.5; }
.timeline li { position: relative; padding-left: 4rem; }
.timeline p { margin: 0; font-size: 0.97rem; }
.step-n {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-weight: 800;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--gold), #F3D77A);
  border-radius: 50%;
  box-shadow: 0 0 0 6px var(--bg-base);
}

/* 13. FAQ ----------------------------------------------------------------- */
.faq-layout { display: grid; gap: 2rem; }
.faq { display: grid; gap: 0.75rem; }
.faq details {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}
.faq details[open] { border-color: rgba(16, 185, 129, 0.5); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 1.2rem;
  color: var(--accent-strong);
  background: rgba(16, 185, 129, 0.12);
  border-radius: 50%;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 1.25rem 1.2rem; }

/* 14. CONTACTO (CTA) ------------------------------------------------------ */
.cta {
  display: grid;
  gap: 2.5rem;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(16, 185, 129, 0.22), transparent 70%),
    linear-gradient(145deg, var(--bg-raised), var(--bg-surface));
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.cta-copy .btn { margin-top: 0.5rem; }

.cta-card { padding: 1.5rem; background: rgba(5, 9, 18, 0.55); border: 1px solid var(--border); border-radius: var(--radius); }
.cta-card ul { display: grid; gap: 1.25rem; }
.cta-card li { display: flex; align-items: center; gap: 1rem; }
.cta-ico { display: grid; place-items: center; flex: none; width: 46px; height: 46px; color: var(--accent-strong); background: rgba(16, 185, 129, 0.12); border-radius: 12px; }
.label { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.cta-card a { font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }

/* 15. FOOTER -------------------------------------------------------------- */
.site-footer { padding: 3.5rem 0 1.5rem; background: var(--bg-deep); border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
.footer-brand p { max-width: 36ch; margin-top: 1rem; font-size: 0.93rem; }
.footer-title { margin-bottom: 0.9rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer li a { color: var(--text-muted); font-size: 0.95rem; overflow-wrap: anywhere; }
.site-footer li a:hover { color: var(--accent-strong); }
.footer-bottom { display: flex; flex-direction: column; gap: 0.3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.footer-bottom p { margin: 0; font-size: 0.85rem; }

/* 16. ANIMACIONES --------------------------------------------------------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
.bubble  { animation: float 6s ease-in-out infinite; }
.floater { animation: float 7s ease-in-out 1s infinite; }
.hero-copy > * { animation: rise 0.7s ease both; }
.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.32s; }

/* Aparición al hacer scroll (solo navegadores compatibles, sin JS) */
@supports (animation-timeline: view()) {
  .product, .service, .pains li, .timeline li, .benefits-grid li, .cta {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
}

/* 17. BREAKPOINTS (Mobile-First) ----------------------------------------- */
@media (min-width: 640px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .cta { padding: 2.75rem; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; padding: 0; background: none; border: 0; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 1.9rem; }
  .site-nav a:not(.btn) { padding: 0.25rem 0; font-weight: 500; font-size: 0.95rem; color: var(--text-muted); }
  .site-nav a:not(.btn):hover { color: var(--text); text-decoration: none; }
  .site-nav .btn { margin-top: 0; }

  .hero { padding: 4rem 0 5rem; }
  .hero-grid { width: 100%; grid-template-columns: 1.05fr 0.95fr; gap: clamp(3rem, 6vw, 7rem); }
  .hero-visual { max-width: 620px; justify-self: end; width: 100%; }

  .split { grid-template-columns: 1fr 1.05fr; gap: 4rem; }

  /* Bento 2x2 */
  .bento { grid-template-columns: repeat(2, 1fr); }
  .product-featured { grid-row: span 1; }
  .product-wide { grid-column: 1 / -1; flex-direction: row; }
  .product-wide .product-visual { flex: 0 0 46%; border-bottom: 0; border-right: 1px solid var(--border); }
  .product-wide .product-body { align-self: center; padding: 2rem; }

  .services { grid-template-columns: repeat(4, 1fr); }

  .timeline { grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
  .timeline::before { left: 22px; right: 22px; top: 21px; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, var(--accent), var(--gold)); }
  .timeline li { padding: 4rem 0 0; }

  .faq-layout { grid-template-columns: 0.8fr 1.2fr; gap: 4rem; }

  .cta { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 3.5rem; padding: 3.5rem; }

  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
  .footer-grid > div:last-child { grid-column: auto; }
}

/* 18. PANTALLAS GRANDES Y AJUSTES FINOS ---------------------------------- */
@media (min-width: 1280px) {
  html { font-size: 106.25%; }
}
@media (min-width: 1700px) {
  :root { --max-width: 1600px; }
  html { font-size: 118%; }
}
@media (min-width: 2200px) {
  :root { --max-width: 1900px; }
  html { font-size: 135%; }
}
@media (max-width: 380px) {
  .btn-lg { width: 100%; }
  .ticks-row { grid-template-columns: 1fr; }
  .agenda li { grid-template-columns: 2.8rem 1fr; }
  .agenda .chip { grid-column: 2; justify-self: start; }
}
@media (max-height: 560px) and (min-width: 900px) {
  .hero { min-height: auto; }
}

/* 19. EFECTOS ESTILO "STUDIO" -------------------------------------------- */

/* Barra de progreso de scroll (solo navegadores compatibles) */
.progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--teal), var(--gold));
  transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}
@keyframes grow { to { transform: scaleX(1); } }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
}

/* Titular del hero: sube línea por línea desde una máscara */
.hero-copy > h1 { animation: none; }
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hero h1 .ln > span {
  display: inline-block;
  transform: translateY(115%);
  animation: lineUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--i) * 0.12s + 0.15s);
}
@keyframes lineUp { to { transform: none; } }

/* Paralaje con el mouse (usa la propiedad `translate`, independiente de las animaciones) */
.hero-visual .window  { translate: calc(var(--px, 0) * -14px) calc(var(--py, 0) * -10px); transition: translate 0.25s ease-out; }
.hero-visual .bubble  { translate: calc(var(--px, 0) * 28px)  calc(var(--py, 0) * 22px);  transition: translate 0.25s ease-out; }
.hero-visual .floater { translate: calc(var(--px, 0) * -34px) calc(var(--py, 0) * 26px);  transition: translate 0.25s ease-out; }

/* Marquesina gigante */
.marquee { overflow: hidden; padding: 1.5rem 0; background: var(--bg-deep); border-block: 1px solid var(--border); }
.marquee-track { display: flex; align-items: center; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  padding-right: 2.5rem;
  font-size: clamp(3rem, 10vw, 8.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(163, 179, 203, 0.4);
  transition: color 0.3s;
}
.marquee-track span:hover { color: var(--accent-strong); -webkit-text-stroke-color: transparent; }
.marquee-track span:nth-child(even) { color: var(--accent); -webkit-text-stroke: 0; font-size: 0.6em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Brillo que sigue al cursor */
.product, .service, .cta-card { position: relative; }
.product::after, .service::after, .cta-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(52, 211, 153, 0.16), transparent 60%);
}
.product:hover::after, .service:hover::after, .cta-card:hover::after { opacity: 1; }

/* Aparición al hacer scroll (la clase la añade el JS; sin JS todo es visible) */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* Sustituye la animación por view() anterior: el JS se encarga ahora */
@supports (animation-timeline: view()) {
  .product, .service, .pains li, .timeline li, .benefits-grid li, .cta {
    animation: none; animation-timeline: auto; animation-range: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 .ln > span { transform: none; }
  .reveal { opacity: 1; transform: none; }
}

/* 20. LOGO ---------------------------------------------------------------- */
.brand-mark { width: 42px; height: 42px; background: none; box-shadow: none; border-radius: 12px; }
.brand-mark svg { width: 100%; height: 100%; border-radius: 12px; box-shadow: 0 6px 20px rgba(34, 184, 168, 0.35); }
.brand-name { letter-spacing: -0.02em; color: #fff; }
.brand-name span { color: #22B8CF; }

/* 21. SISTEMAS DESARROLLADOS --------------------------------------------- */
.built-grid { display: grid; gap: 1rem; }
.built {
  position: relative;
  padding: 1.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s;
}
.built:hover { transform: translateY(-4px); border-color: rgba(16, 185, 129, 0.5); }
.built h3 { margin-bottom: 0.4rem; }
.built p { margin: 0; font-size: 0.95rem; }
.built-ico {
  display: grid; place-items: center;
  width: 54px; height: 54px; margin-bottom: 1.1rem;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 14px;
}
.built-ico .ico { width: 1.7rem; height: 1.7rem; }
.built-cta {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.18), var(--bg-surface));
  border-color: rgba(16, 185, 129, 0.45);
}
.built-cta .btn { margin-top: 1rem; }
@media (min-width: 640px) { .built-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .built-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }

/* 22. FUNDADOR ------------------------------------------------------------ */
.about { display: grid; gap: 2.5rem; align-items: center; }
.about-photo { position: relative; margin: 0; max-width: 440px; width: 100%; justify-self: center; }
.about-photo::before {
  content: '';
  position: absolute; inset: 14px -14px -14px 14px;
  border: 2px solid rgba(16, 185, 129, 0.5);
  border-radius: 28px;
  z-index: 0;
}
.about-photo img {
  position: relative; z-index: 1;
  width: 100%; height: auto;
  aspect-ratio: 3 / 4; object-fit: cover; object-position: center 20%;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.about-photo figcaption {
  position: absolute; z-index: 2; left: 1rem; right: 1rem; bottom: 1rem;
  display: flex; flex-direction: column;
  padding: 0.8rem 1rem;
  background: rgba(7, 17, 31, 0.8);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
}
.about-photo figcaption strong { font-size: 0.98rem; color: var(--text); }
.about-photo figcaption span { font-size: 0.8rem; color: var(--accent-strong); }
.about-copy p { max-width: 58ch; }
.about-points { display: grid; gap: 0.6rem; margin: 1.5rem 0 2rem; }
.about-points li { display: flex; align-items: center; gap: 0.6rem; color: var(--text); }
.about-points .ico { color: var(--accent-strong); }
@media (min-width: 900px) {
  .about { grid-template-columns: 0.8fr 1.2fr; gap: clamp(3rem, 7vw, 7rem); }
  .about-photo { justify-self: start; }
}

/* 23. TOQUE FINAL ---------------------------------------------------------- */
:root { --intro: 0.8s; }
.no-splash { --intro: 0s; }
::selection { background: var(--accent); color: var(--bg-deep); }
html { scrollbar-color: #1d3563 var(--bg-deep); }

/* Intro con el logo */
.splash {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-content: center; justify-items: center; gap: 1.4rem;
  background: var(--bg-deep);
  animation: splashOut 0.55s ease 0.8s forwards;
  pointer-events: none;
}
.splash svg { width: 84px; height: 84px; border-radius: 22px; animation: splashPop 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; box-shadow: 0 0 60px rgba(34, 184, 168, 0.45); }
.splash i { display: block; width: 120px; height: 3px; background: linear-gradient(90deg, var(--accent), var(--teal), var(--gold)); border-radius: 3px; transform-origin: 0 50%; animation: splashBar 0.8s ease both; }
.no-splash .splash { display: none; }
@keyframes splashPop { from { opacity: 0; transform: scale(0.5) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes splashBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }

/* El hero espera a que termine la intro */
.hero h1 .ln > span { animation-delay: calc(var(--i) * 0.12s + 0.15s + var(--intro)); }
.hero-copy > *:nth-child(2) { animation-delay: calc(var(--intro) + 0.08s); }
.hero-copy > *:nth-child(3) { animation-delay: calc(var(--intro) + 0.16s); }
.hero-copy > *:nth-child(4) { animation-delay: calc(var(--intro) + 0.24s); }
.hero-copy > *:nth-child(5) { animation-delay: calc(var(--intro) + 0.32s); }
.hero-copy > *:nth-child(6) { animation-delay: calc(var(--intro) + 0.4s); }
.hero-copy > .pill { animation-delay: var(--intro); }

/* Palabras rotativas */
.rotator { margin: 0 0 1.4rem; font-size: 1.05rem; font-weight: 600; color: var(--text); }
.rot-words { position: relative; display: inline-block; min-width: 9ch; height: 1.45em; vertical-align: bottom; overflow: hidden; }
.rot-words span {
  position: absolute; left: 0; top: 0;
  color: var(--teal); font-weight: 800;
  opacity: 0; transform: translateY(100%);
  animation: rot 12s infinite;
  animation-delay: calc(var(--k) * 2s + var(--intro));
}
@keyframes rot {
  0% { opacity: 0; transform: translateY(100%); }
  3%, 14% { opacity: 1; transform: none; }
  17%, 100% { opacity: 0; transform: translateY(-100%); }
}

/* Orbes de luz en el hero */
.hero-bg::before, .hero-bg::after { content: ''; position: absolute; border-radius: 50%; filter: blur(50px); pointer-events: none; }
.hero-bg::before { width: 460px; height: 460px; right: 4%; top: 2%; background: radial-gradient(circle, rgba(16, 185, 129, 0.38), transparent 65%); animation: drift 14s ease-in-out infinite alternate; }
.hero-bg::after  { width: 380px; height: 380px; left: -4%; bottom: 0; background: radial-gradient(circle, rgba(75, 123, 236, 0.3), transparent 65%); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-60px, 50px) scale(1.15); } }

/* Brillo que cruza los botones */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-130%); pointer-events: none;
}
.btn:hover::after { transform: translateX(130%); transition: transform 0.8s ease; }

/* Borde animado en el producto destacado */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.product-featured {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, var(--bg-raised), var(--bg-surface) 60%) padding-box,
    conic-gradient(from var(--ang), var(--accent), var(--teal), var(--gold), var(--accent)) border-box;
  animation: spin 7s linear infinite;
}
@keyframes spin { to { --ang: 360deg; } }

/* Microanimaciones en las maquetas */
.slot.sel { animation: ping 2.2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } }
.chip-wait { animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.55; } }

/* Botón flotante de WhatsApp */
.fab {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 70;
  display: flex; align-items: center; gap: 0;
  height: 58px; padding: 0 1rem;
  color: #04130d; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.45);
  transition: transform 0.25s, gap 0.25s;
}
.fab:hover { text-decoration: none; transform: translateY(-3px); gap: 0.55rem; }
.fab .ico { width: 1.7rem; height: 1.7rem; }
.fab span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width 0.3s; }
.fab:hover span, .fab:focus-visible span { max-width: 8rem; }
.fab::before { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--accent-strong); animation: ring 2.4s ease-out infinite; pointer-events: none; }
@keyframes ring { from { transform: scale(1); opacity: 0.7; } to { transform: scale(1.5); opacity: 0; } }
@keyframes fabIn { from { opacity: 0; transform: translateY(20px) scale(0.9); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: scroll()) {
  .fab { animation: fabIn linear both; animation-timeline: scroll(root); animation-range: 0 500px; }
}

@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
  .rot-words span:first-child { opacity: 1; transform: none; }
  .fab { animation: none; }
}

/* Enlace activo del menú */
.site-nav a[aria-current='page']:not(.btn) { color: var(--accent-strong); }
@media (min-width: 900px) {
  .site-nav a[aria-current='page']:not(.btn) { position: relative; color: var(--text); }
  .site-nav a[aria-current='page']:not(.btn)::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--teal)); border-radius: 2px;
  }
}


/* 18. Aviso de cookies ----------------------------------------------------- */
.consent {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 100;
  max-width: 34rem; margin-inline: auto;
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1rem 1.1rem; border-radius: 14px;
  background: var(--bg-raised); border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: var(--text); font-size: 0.9rem; line-height: 1.5;
}
.consent[hidden] { display: none; }
.consent p { margin: 0; color: var(--text-muted); }
.consent-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.consent-btn {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 0.55rem 1.1rem; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text);
}
.consent-btn:hover { border-color: var(--accent); }
.consent-yes { background: var(--accent); border-color: var(--accent); color: #04130d; }
.consent-yes:hover { background: var(--accent-strong); }
.consent-btn:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
@media (min-width: 720px) {
  .consent { left: auto; right: 1.5rem; bottom: 1.5rem; margin: 0; }
}
