/* ============================================================
   components.css
   Componentes específicos de la web: header, botones, hero,
   tarjetas con glassmorphism, footer, diagramas, etc.
   Las @media de "colapso de grid" (que afectan solo a un
   componente) viven junto al componente para preservar contexto.
   El layout móvil global más invasivo está en responsive.css.
============================================================ */

/* ─── Global canvas (atmósfera + escenas 3D) ─────────────── */
#global-bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-canvas);
  pointer-events: none;
  background: transparent;
}
#global-bg canvas {
  background: transparent !important;
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ─── Header sticky ───────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  transition: background var(--t-base) ease, border-color var(--t-base) ease, backdrop-filter var(--t-base) ease;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.logo svg { width: 22px; height: 22px; }
.logo-svg { color: var(--accent); }

/* ─── Nav ─────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  font-size: 14px;
}
.nav a {
  color: var(--fg-muted);
  transition: color var(--t-fast) ease;
}
.nav a:hover,
.nav a.active { color: var(--fg); }

/* Language selector — minimal pill, mono */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lang-switch button {
  padding: 5px 10px;
  border-radius: var(--r-pill);
  color: var(--fg-dim);
  transition: color var(--t-fast), background var(--t-fast);
}
.lang-switch button[aria-pressed="true"] {
  color: var(--fg);
  background: var(--line);
}
.lang-switch button:hover { color: var(--fg); }

/* Header WhatsApp pill */
.cta-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 7px 16px 7px 12px;
  border-radius: var(--r-pill);
  font-weight: 500;
  transition: background var(--t-base) ease, color var(--t-base) ease, box-shadow var(--t-base) ease;
}
.cta-wa:hover {
  background: var(--accent);
  color: #001216;
  box-shadow: 0 0 0 4px rgba(91, 233, 245, 0.12), 0 0 24px rgba(91, 233, 245, 0.35);
}
.cta-wa svg { width: 14px; height: 14px; }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast) ease;
  background: transparent;
  color: var(--fg);
}
.btn-primary {
  background: var(--accent);
  color: #001216;
  border-color: var(--accent);
}
.btn-primary:hover {
  box-shadow: 0 0 0 4px var(--accent-glow), 0 0 32px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 18px 28px; font-size: 15px; }
.btn .arrow { transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── Glass card (shared visual language) ─────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  transition: background var(--t-base) ease, border-color var(--t-base) ease, transform var(--t-base) ease;
}
.glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

/* ─── Hero (Home) ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: clamp(720px, 96vh, 980px);
  display: block;
  overflow: visible;
  border-top: none;
  padding: 0;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 95% 85% at 60% 45%, transparent 50%, rgba(10, 10, 10, 0.35) 90%, rgba(10, 10, 10, 0.6) 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}
.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  min-height: clamp(720px, 96vh, 980px);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  gap: clamp(24px, 4vw, 80px);
}
.hero-left  { position: relative; z-index: 3; padding-top: 64px; }
.hero-right { position: relative; height: 100%; min-height: 480px; }

.hero-words {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--fg);
  font-size: clamp(56px, 11vw, 144px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 0;
}
.hero-words .w {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  filter: blur(8px);
  animation: heroWord 900ms var(--ease-out) forwards;
  text-shadow: 0 2px 32px rgba(0, 0, 0, 0.55), 0 0 16px rgba(0, 0, 0, 0.4);
}
.hero-words .w:nth-child(1) { animation-delay: 300ms; }
.hero-words .w:nth-child(2) { animation-delay: 700ms; }
.hero-words .w:nth-child(3) { animation-delay: 1100ms; }
@keyframes heroWord {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.hero-cta-wrap {
  margin-top: clamp(36px, 5vh, 56px);
  opacity: 0;
  animation: heroWord 900ms var(--ease-out) 1500ms forwards;
}
.hero-cta-wrap .btn-primary {
  border-radius: var(--r-pill);
  padding: 16px 26px;
}

/* ─── Page hero (subpáginas) ─────────────────────────────── */
.page-hero {
  padding: clamp(120px, 18vh, 200px) 0 clamp(80px, 12vh, 120px);
  border-top: none;
  position: relative;
  min-height: clamp(560px, 80vh, 760px);
  display: flex;
  align-items: center;
}
.page-hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(24px, 4vw, 80px);
  align-items: center;
  width: 100%;
}
.page-hero .ph-left  { position: relative; z-index: 3; }
.page-hero .ph-right { position: relative; min-height: 360px; }
.page-hero .crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.page-hero .crumb::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.page-hero h1 { max-width: 14ch; }
.page-hero .lede { max-width: 44ch; margin-top: 28px; color: var(--fg-muted); }
.page-hero .hero-ctas { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ─── Two cards — "Dos formas de trabajar" ───────────────── */
.two-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.two-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 360px;
  transition: background var(--t-base) ease, border-color var(--t-base) ease;
  position: relative;
}
.two-card:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-hover); }
.two-card .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}
.two-card h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.two-card .strong-line { font-weight: 500; color: var(--fg); }
.two-card p { color: var(--fg-muted); margin: 0; }
.two-card .cta-row { margin-top: auto; padding-top: 16px; }
.two-card .cta-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.two-card .cta-row a:hover { color: var(--accent); border-color: var(--accent); }

/* ─── IDA triplet (Información / Decisión / Acción) ──────── */
.ida { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ida > div {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 32px clamp(20px, 3vw, 40px);
  transition: background var(--t-base) ease, border-color var(--t-base) ease;
}
.ida > div:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-hover); }
.ida .num  { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.08em; }
.ida .ttl  { font-size: 20px; margin-top: 8px; letter-spacing: -0.02em; font-weight: 500; }
.ida .desc { color: var(--fg-muted); margin-top: 8px; font-size: 14px; }

/* ─── Problem grid ───────────────────────────────────────── */
.problem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.problem-grid .p {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 24px;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background var(--t-base) ease, border-color var(--t-base) ease;
}
.problem-grid .p:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-hover); }
.problem-grid .p .idx { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); letter-spacing: 0.06em; }
.problem-grid .p .txt { color: var(--fg); margin-top: 24px; }

/* ─── Match — "¿Cuál es para ti?" ────────────────────────── */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.match > div {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: clamp(28px, 3.6vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background var(--t-base) ease, border-color var(--t-base) ease;
}
.match > div:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-hover); }
.match .head { display: flex; align-items: baseline; gap: 12px; }
.match h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.match ul { display: flex; flex-direction: column; gap: 12px; }
.match li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--fg); }
.match li::before {
  content: '';
  flex: none;
  width: 6px; height: 6px;
  margin-top: 9px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-glow);
}
.match .cta-row { margin-top: auto; padding-top: 12px; }
.match .cta-row a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.match .cta-row a:hover { color: var(--accent); border-color: var(--accent); }

/* ─── Manifiesto ─────────────────────────────────────────── */
.manifesto {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.manifesto-visual { aspect-ratio: 1 / 1; max-width: 480px; width: 100%; margin: 0 auto; }
.manifesto-text h2 { margin-bottom: 24px; }
.manifesto-text p  { color: var(--fg-muted); font-size: 17px; line-height: 1.55; max-width: 52ch; }
.manifesto-ida {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.manifesto-ida > div { padding: 20px 16px 20px 0; border-right: 1px solid var(--line); }
.manifesto-ida > div:last-child { border-right: none; }
.manifesto-ida .n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.08em; }
.manifesto-ida .t { font-size: 18px; font-weight: 500; margin-top: 6px; letter-spacing: -0.01em; }
.manifesto-close   { margin-top: 28px; color: var(--fg); font-size: 17px; max-width: 52ch; line-height: 1.5; }

/* ─── Two-col text list (sub-page sections) ──────────────── */
.tl {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.tl .left h2 { max-width: 14ch; }
.tl .left .label { margin-bottom: 16px; display: block; }
.tl .right ul { border-top: 1px solid var(--line); }
.tl .right li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  letter-spacing: -0.01em;
}
.tl .right li .idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
  padding-top: 4px;
}

/* ─── Steps "Cómo funciona" ──────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.steps .step {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  transition: background var(--t-base) ease, border-color var(--t-base) ease;
}
.steps .step:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-hover); }
.steps .step .n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.1em; }
.steps .step .t { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.steps .step .d { color: var(--fg-muted); font-size: 14px; line-height: 1.45; }

/* ─── Infra section ──────────────────────────────────────── */
.infra-head { margin-bottom: 56px; }
.infra-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.infra-three .block {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: clamp(28px, 3.4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
  transition: background var(--t-base) ease, border-color var(--t-base) ease;
}
.infra-three .block:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-hover); }
.infra-three .n { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--accent); }
.infra-three h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.infra-three p  { color: var(--fg-muted); margin: 0; font-size: 15px; line-height: 1.5; }

/* ─── Flow diagram ───────────────────────────────────────── */
.flow-wrap { margin-top: 56px; position: relative; min-height: 480px; }
.flow-head { margin-bottom: 28px; max-width: 56ch; }
.flow-head h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -0.02em; margin: 0 0 10px; }
.flow-head p  { color: var(--fg-muted); font-size: 15px; line-height: 1.5; margin: 0; }
.flow-canvas {
  width: 100%;
  height: 460px;
  position: relative;
  background: transparent;
}
.flow-canvas canvas { background: transparent !important; display: block; }

/* ─── Sales args (4 cards) ───────────────────────────────── */
.sales { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 32px; }
.sales .arg {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background var(--t-base) ease, border-color var(--t-base) ease;
}
.sales .arg:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-hover); }
.sales .arg .n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.08em; }
.sales .arg .t { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.sales .arg .d { color: var(--fg-muted); font-size: 14px; }

/* ─── Examples row (pills) ───────────────────────────────── */
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.examples .pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border: 1px solid var(--line-strong);
  padding: 8px 14px;
  border-radius: var(--r-pill);
}

/* ─── Final CTA bloc ─────────────────────────────────────── */
.final-cta { text-align: center; padding: clamp(120px, 18vh, 200px) 0; }
.final-cta .h-display { max-width: 16ch; margin: 0 auto 32px; }
.final-cta .mono { margin-bottom: 24px; display: block; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 36px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin: 0 0 16px;
  font-weight: 500;
}
.footer-grid ul { display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--fg-muted); transition: color var(--t-fast); }
.footer-grid a:hover { color: var(--fg); }
.footer-brand .logo { margin-bottom: 16px; font-size: 18px; }
.footer-brand p { color: var(--fg-muted); max-width: 28ch; margin: 0; }
.footer-bot {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--fg-dim);
  font-size: 13px;
}
.footer-bot a { color: var(--fg-dim); }
.footer-bot a:hover { color: var(--fg-muted); }

/* ─── Sticky WhatsApp (móvil) ───────────────────────────── */
.wa-sticky {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--z-sticky);
  background: var(--accent);
  color: #001216;
  padding: 13px 20px 13px 16px;
  border-radius: var(--r-pill);
  display: none;            /* shown on mobile by responsive.css */
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
  font-size: 14px;
  min-width: 56px;
  min-height: 56px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(91, 233, 245, 0.14);
}
.wa-sticky svg { width: 16px; height: 16px; }

/* ─── Mobile menu overlay ────────────────────────────────── */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  align-items: center;
  justify-content: center;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line-strong);
}
.menu-toggle svg { width: 18px; height: 18px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 96px var(--pad) 40px;
  display: none;
  flex-direction: column;
  gap: 24px;
}
.mobile-menu.open { display: flex; }
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-menu nav a {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
}
.mobile-menu .menu-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.mobile-menu .close-btn {
  position: absolute;
  top: 20px;
  right: var(--pad);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
}
