/* ══════════════════════════════════════════
   CIBERPERITAJE — Marblex 2026 Aesthetic
   DM Sans · Ambient Gradients · Glassmorphism
   ══════════════════════════════════════════ */

:root {
  /* Brand */
  --deep:   #110B32;
  --violet: #350B9C;
  --sky:    #4CC8EF;

  /* Extended palette */
  --bg:       #0C0A1E;
  --bg-alt:   #100D28;
  --glass:    rgba(255,255,255,0.04);
  --glass-b:  rgba(255,255,255,0.08);
  --border:   rgba(76,200,239,0.12);
  --border-h: rgba(76,200,239,0.28);

  /* Ambient glow colors */
  --gv:  rgba(53,11,156,0.5);
  --gs:  rgba(76,200,239,0.18);

  /* Gradient text */
  --grad: linear-gradient(135deg, #4CC8EF 0%, #9B6DFF 50%, #4CC8EF 100%);

  /* Status */
  --green: #29F5A0;
  --orange:#FF7B45;

  /* Text */
  --t1: #F0F4FF;
  --t2: #8890BC;
  --t3: #4A4E78;

  /* Fonts */
  --ff: 'DM Sans', sans-serif;
  --fm: 'DM Mono', monospace;

  /* Radius */
  --r:  8px;
  --rl: 16px;
  --rp: 999px;

  --tap: 44px;
  --link: #2F44FF;
}

/* ── RESET ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; }

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--t1);
  font-size: 0.9375rem;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* ── CUSTOM CURSOR ─────────────────────────── */
.cursor {
  width: 10px; height: 10px;
  background: var(--sky);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: screen;
}
.cursor-trail {
  width: 32px; height: 32px;
  border: 1px solid rgba(76,200,239,0.4);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: left 0.12s ease, top 0.12s ease;
}
body.cursor-hover .cursor { width: 18px; height: 18px; background: #9B6DFF; }
body.cursor-hover .cursor-trail { width: 48px; height: 48px; border-color: rgba(155,109,255,0.4); }

/* ── AMBIENT BLOBS ─────────────────────────── */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: drift 20s ease-in-out infinite;
}
.blob-1 {
  width: 600px; height: 600px;
  background: var(--gv);
  top: -200px; left: -100px;
  animation-delay: 0s;
}
.blob-2 {
  width: 400px; height: 400px;
  background: var(--gs);
  top: 30%; right: -150px;
  animation-delay: -7s;
}
.blob-3 {
  width: 500px; height: 300px;
  background: rgba(53,11,156,0.3);
  bottom: 10%; left: 30%;
  animation-delay: -14s;
}
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(40px,-30px) scale(1.05); }
  66%      { transform: translate(-20px,20px) scale(0.97); }
}

/* ── GLASS CARD ────────────────────────────── */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--rl);
}

/* ── NAV ───────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 800;
  transition: background 0.3s, border-color 0.3s;
}
.nav.stuck {
  background: rgba(12,10,30,0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; gap: 40px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--t1); flex-shrink: 0;
}
.logo-img { height: 28px; width: auto; display: block; }
.logo-word {
  font-size: 16px; font-weight: 700;
  letter-spacing: 2px; font-style: normal;
}
.logo-word em { color: var(--sky); font-style: normal; }

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  color: var(--t2); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--t1); }

.nav-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass-b); border: 1px solid var(--border-h);
  color: var(--sky); min-height: var(--tap); padding: 0 20px; border-radius: var(--rp);
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: all 0.2s; white-space: nowrap;
}
.nav-btn:hover {
  background: rgba(76,200,239,0.1);
  box-shadow: 0 0 20px rgba(76,200,239,0.2);
}
.burger {
  display: none;
  width: var(--tap);
  height: var(--tap);
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  margin-left: auto;
  padding: 0;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--sky); border-radius: 2px; }
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  background: rgba(12,10,30,0.97);
  border-top: 1px solid var(--border);
  padding: 20px 32px 28px;
  backdrop-filter: blur(20px);
  max-height: calc(100svh - 72px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav a {
  color: var(--t2); text-decoration: none;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  padding: 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px; transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--t1); }
.mobile-cta { color: var(--sky) !important; font-weight: 600; border-bottom: none !important; }
.mobile-nav.open { display: flex; }

/* ── BUTTONS ───────────────────────────────── */
.btn-pill-primary {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap);
  background: linear-gradient(135deg, var(--violet), #6C3FD4);
  color: #fff; padding: 0 28px; border-radius: var(--rp);
  font-family: var(--ff); font-weight: 600; font-size: 14px;
  text-decoration: none; border: none; cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(53,11,156,0.4);
  position: relative; overflow: hidden;
}
.btn-pill-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(76,200,239,0.25), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.btn-pill-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(53,11,156,0.55), 0 0 20px rgba(76,200,239,0.2);
}
.btn-pill-primary:hover::after { opacity: 1; }
.btn-pill-primary.sm { padding: 10px 20px; font-size: 13px; }
.btn-pill-primary.full { width: 100%; justify-content: center; }

.btn-pill-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap);
  color: var(--t2); font-weight: 500; font-size: 14px;
  text-decoration: none; transition: color 0.2s;
  padding: 0 4px;
}
.btn-pill-ghost:hover { color: var(--t1); }

/* ── HERO ──────────────────────────────────── */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 140px 32px 80px;
  max-width: 1200px; margin: 0 auto;
  gap: 60px;
}

.hero-inner { flex: 1; max-width: 580px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fm); font-size: 11px;
  color: var(--sky); letter-spacing: 1px;
  margin-bottom: 28px;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulseD 2s ease-in-out infinite;
}
@keyframes pulseD {
  0%,100%{box-shadow:0 0 6px var(--green)}
  50%{box-shadow:0 0 14px var(--green),0 0 28px rgba(41,245,160,.3)}
}

.hero-title {
  font-size: clamp(42px,5.5vw,72px);
  font-weight: 700; line-height: 1.05;
  letter-spacing: -2px; margin-bottom: 22px;
}
.title-gradient {
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer { 0%{background-position:0%} 100%{background-position:200%} }

.hero-desc {
  font-size: 17px; color: var(--t2);
  line-height: 1.7; margin-bottom: 36px;
  font-weight: 300;
}

.hero-actions {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 56px; flex-wrap: wrap;
}

.hero-metrics {
  display: flex; align-items: center; gap: 28px;
}
.metric { display: flex; flex-direction: column; }
.metric-n {
  font-size: 34px; font-weight: 700;
  color: var(--sky); line-height: 1;
}
.metric-u { font-size: 20px; font-weight: 700; color: var(--sky); }
.metric-l { font-size: 11px; color: var(--t3); margin-top: 4px; letter-spacing: 0.5px; }
.metric-sep { width: 1px; height: 36px; background: var(--border); }

/* TERMINAL */
.hero-terminal {
  flex: 0 0 380px;
  border-radius: var(--rl);
  overflow: hidden;
  border: 1px solid rgba(76,200,239,0.18);
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 80px rgba(53,11,156,0.25);
  background: rgba(10,8,24,0.9);
  backdrop-filter: blur(20px);
}
.term-chrome {
  background: rgba(17,11,50,0.8);
  padding: 12px 18px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid rgba(76,200,239,0.1);
}
.t-dots { display: flex; gap: 6px; }
.t-dots i { width: 10px; height: 10px; border-radius: 50%; font-style: normal; }
.t-dots .r { background: #FF5F57; }
.t-dots .y { background: #FFBD2E; }
.t-dots .g { background: #28C840; }
.t-name { font-family: var(--fm); font-size: 12px; color: var(--t3); margin-left: 8px; flex: 1; }
.t-status { font-family: var(--fm); font-size: 10px; color: var(--green); letter-spacing: 1px; }
.term-output {
  padding: 18px 20px;
  font-family: var(--fm); font-size: 12px;
  color: var(--sky); line-height: 1.9;
  min-height: 190px;
}
.term-output .td { color: var(--t3); }
.term-output .tc { color: var(--sky); }
.term-output .to { color: var(--orange); }
.term-output .tg { color: var(--green); }
.t-cursor {
  display: inline-block; width: 7px; height: 13px;
  background: var(--sky); margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* SCROLL HINT */
.scroll-hint {
  position: absolute; bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  font-family: var(--fm); font-size: 10px;
  color: var(--t3); letter-spacing: 2px;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--t3), transparent);
  animation: scrollAnim 2s ease-in-out infinite;
}
@keyframes scrollAnim { 0%,100%{transform:scaleY(1);opacity:.5} 50%{transform:scaleY(0.6);opacity:1} }

/* ── SECTIONS ──────────────────────────────── */
.section { position: relative; z-index: 1; padding: 100px 0; }
.alt-section { background: rgba(16,13,40,0.7); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

.s-label {
  font-family: var(--fm); font-size: 11px;
  color: var(--sky); letter-spacing: 2.5px;
  margin-bottom: 18px;
}
.s-h2 {
  font-size: clamp(28px,3.5vw,44px);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -1px; margin-bottom: 48px;
}
.s-head {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: end; gap: 24px; margin-bottom: 48px;
}
.s-head h2 { font-size: clamp(32px,4vw,52px); font-weight: 700; line-height: 1.1; letter-spacing: -1.5px; margin: 0; }
.s-head p  { color: var(--t2); font-size: 16px; line-height: 1.6; }
.grad-text {
  background: var(--grad); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ── SITUACIONES ───────────────────────────── */
.sit-tabs {
  display: grid; grid-template-columns: repeat(6,1fr);
  gap: 10px; margin-bottom: 24px;
}

.sit-tab {
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: var(--tap);
  gap: 8px; padding: 16px 14px;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--rl); cursor: pointer;
  text-align: left; color: var(--t1);
  font-family: var(--ff); font-size: 12px;
  transition: all 0.22s; position: relative;
}
.sit-tab:hover {
  border-color: var(--border-h);
  background: rgba(76,200,239,0.05);
  transform: translateY(-2px);
}
.sit-tab.active {
  border-color: var(--sky);
  background: rgba(76,200,239,0.08);
  box-shadow: 0 0 0 1px rgba(76,200,239,0.15), 0 8px 24px rgba(53,11,156,0.3);
}
.tab-icon { font-size: 22px; line-height: 1; }
.tab-txt { color: var(--t2); line-height: 1.45; }
.tab-txt strong { display: block; color: var(--t1); font-size: 13px; margin-top: 2px; }
.sit-tab.active .tab-txt,
.sit-tab.active .tab-txt strong { color: var(--t1); }

/* PANEL */
.sit-panel {
  padding: 0; overflow: hidden; min-height: 300px;
  position: relative;
}
.sit-panel::before {
  content: 'Selecciona una situación arriba →';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fm); font-size: 12px; color: var(--t3);
  letter-spacing: 1px; transition: opacity 0.2s;
}
.sit-panel.has-sel::before { opacity: 0; pointer-events: none; }

.sit-detail {
  display: none;
  grid-template-columns: 1fr 1fr;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sit-detail.active { display: grid; }
.sit-detail.show { opacity: 1; transform: translateY(0); }

.sd-info { padding: 40px; }
.sd-badge {
  display: inline-block;
  font-family: var(--fm); font-size: 10px;
  letter-spacing: 2px; color: var(--sky);
  background: rgba(76,200,239,0.08);
  border: 1px solid rgba(76,200,239,0.2);
  padding: 5px 14px; border-radius: var(--rp);
  margin-bottom: 18px;
}
.sd-info h3 {
  font-size: clamp(20px,2.2vw,26px);
  font-weight: 700; line-height: 1.2;
  letter-spacing: -0.5px; margin-bottom: 14px;
}
.sd-info > p { font-size: 14px; color: var(--t2); line-height: 1.7; margin-bottom: 22px; }

.sd-checks { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 28px; }
.sd-checks li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--t2);
}
.sd-checks li::before {
  content: '✓'; color: var(--sky); font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}

.sd-cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sd-urgency { font-size: 11px; color: var(--orange); font-family: var(--fm); }

.sd-aside {
  padding: 40px;
  background: rgba(17,11,50,0.4);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
}

.sd-steps { display: flex; flex-direction: column; margin-bottom: 28px; }
.sd-step {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px; color: var(--t3); opacity: 0.5;
}
.sd-step:last-child { border-bottom: none; }
.sd-step.on { color: var(--t2); opacity: 1; }
.sn {
  font-family: var(--fm); font-size: 11px; color: var(--sky);
  background: rgba(76,200,239,0.08);
  border: 1px solid rgba(76,200,239,0.18);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sd-step:not(.on) .sn { color: var(--t3); border-color: rgba(255,255,255,0.05); background: transparent; }

.sd-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sd-stat {
  padding: 14px;
  background: rgba(76,200,239,0.04);
  border: 1px solid rgba(76,200,239,0.1);
  border-radius: var(--r);
  display: flex; flex-direction: column; gap: 4px;
}
.sd-stat b { font-size: 22px; font-weight: 700; color: var(--sky); line-height: 1; }
.sd-stat span { font-size: 11px; color: var(--t3); line-height: 1.3; }

/* ── PROCESO ───────────────────────────────── */
.process-row {
  display: flex; align-items: flex-start;
  gap: 0; flex-wrap: nowrap;
}
.proc-card {
  flex: 1; padding: 28px 24px;
  transition: all 0.3s;
}
.proc-card:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(53,11,156,0.3);
}
.proc-n {
  font-family: var(--fm); font-size: 28px;
  color: rgba(76,200,239,0.25);
  display: block; margin-bottom: 16px; line-height: 1;
}
.proc-card h4 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.proc-card p  { font-size: 13px; color: var(--t2); line-height: 1.6; }
.proc-arrow {
  font-size: 20px; color: var(--t3);
  padding: 28px 10px; flex-shrink: 0;
  align-self: center;
}

/* ── CASOS ─────────────────────────────────── */
.cases-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.case-card {
  padding: 28px; transition: all 0.3s;
}
.case-card:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(53,11,156,0.3);
}
.case-card.featured-case {
  border-color: rgba(76,200,239,0.25);
  background: rgba(76,200,239,0.04);
}
.case-tag {
  font-family: var(--fm); font-size: 10px;
  color: var(--sky); letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.case-text { font-size: 14px; color: var(--t2); line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.case-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.case-result { font-size: 12px; font-weight: 600; }
.case-result.win  { color: var(--green); }
.case-result.warn { color: var(--orange); }
.case-time { font-family: var(--fm); font-size: 11px; color: var(--t3); }

/* ── NOSOTROS ──────────────────────────────── */
.us-split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.us-left h2 { font-size: clamp(26px,3vw,40px); font-weight: 700; line-height: 1.15; letter-spacing: -1px; margin-bottom: 18px; }
.us-left > p { font-size: 15px; color: var(--t2); line-height: 1.7; margin-bottom: 32px; }
.trust-items { display: flex; flex-direction: column; gap: 16px; }
.ti { display: flex; align-items: flex-start; gap: 14px; font-size: 14px; color: var(--t2); }
.ti-icon { font-size: 20px; flex-shrink: 0; }

.certs-flow {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.cert-pill {
  padding: 10px 20px;
  border: 1px solid var(--border-h);
  border-radius: var(--rp);
  font-family: var(--fm); font-size: 13px;
  color: var(--sky); background: rgba(76,200,239,0.06);
  transition: all 0.2s;
}
.cert-pill:hover {
  background: rgba(76,200,239,0.14);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(76,200,239,0.15);
}

/* ── CONTACTO ──────────────────────────────── */
.contact-split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: flex-start; }
.contact-left h2 { font-size: clamp(26px,3vw,40px); font-weight: 700; line-height: 1.15; letter-spacing: -1px; margin-bottom: 18px; }
.contact-left > p { font-size: 15px; color: var(--t2); line-height: 1.7; margin-bottom: 32px; }
.contact-data { display: flex; flex-direction: column; gap: 18px; }
.cd-item { display: flex; gap: 14px; align-items: center; }
.cd-icon { font-size: 20px; }
.cd-item strong { display: block; font-size: 13px; margin-bottom: 1px; }
.cd-item span   { font-size: 13px; color: var(--t2); }

.c-form { padding: 36px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.cf-group label { font-size: 12px; font-weight: 600; color: var(--t2); letter-spacing: 0.5px; text-transform: uppercase; }
.cf-group input,
.cf-group select,
.cf-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 11px 16px;
  color: var(--t1); font-family: var(--ff); font-size: 14px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
.cf-group input,
.cf-group select { min-height: var(--tap); }
.cf-group input,
.cf-group select { min-height: var(--tap); }
.cf-group input,
.cf-group select { min-height: var(--tap); }
.cf-group input::placeholder, .cf-group textarea::placeholder { color: var(--t3); }
.cf-group input:focus, .cf-group select:focus, .cf-group textarea:focus {
  border-color: rgba(76,200,239,0.5);
  box-shadow: 0 0 0 3px rgba(76,200,239,0.07);
}
.cf-group select option { background: #1C1248; }
.cf-group textarea { resize: vertical; min-height: 100px; }
.cf-note { text-align: center; font-size: 12px; color: var(--t3); margin-top: 12px; }
.cf-success {
  display: none; text-align: center; padding: 60px 32px;
}
.cfs-icon {
  width: 64px; height: 64px;
  border: 2px solid var(--sky); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--sky);
  margin: 0 auto 20px;
  box-shadow: 0 0 24px rgba(76,200,239,0.2);
}
.cf-success h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.cf-success p  { color: var(--t2); }

/* ── FOOTER ────────────────────────────────── */
.footer {
  background: rgba(16,13,40,0.9);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  position: relative; z-index: 1;
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.foot-brand .logo { margin-bottom: 14px; }
.foot-brand p { font-size: 13px; color: var(--t3); line-height: 1.6; max-width: 240px; }
.foot-col h5 { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--t2); margin-bottom: 16px; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.foot-col ul li, .foot-col ul a { font-size: 13px; color: var(--t3); text-decoration: none; transition: color 0.2s; cursor: default; }
.foot-col ul a { cursor: pointer; }
.foot-col ul a:hover { color: var(--sky); }
.foot-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 8px; font-family: var(--fm); font-size: 11px; color: var(--t3);
}

/* ── URGENCY FLOAT ─────────────────────────── */
.urgency-float {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  display: flex; align-items: center; gap: 10px;
  background: rgba(12,10,30,0.9);
  border: 1px solid rgba(255,75,75,0.4);
  padding: 12px 24px; border-radius: var(--rp);
  font-size: 13px; font-weight: 600; color: var(--t1);
  text-decoration: none; cursor: pointer;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(255,75,75,0.15);
  z-index: 700;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.4s;
  opacity: 0;
}
.urgency-float.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.urgency-float:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 28px rgba(255,75,75,0.25); }
.uf-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #FF4B4B; box-shadow: 0 0 8px #FF4B4B;
  animation: pulseD 1.5s ease-in-out infinite;
}

/* ── REVEAL ANIMATIONS ─────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

@media (min-width: 769px) {
  .nav {
    background: rgba(12,10,30,0.85);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(24px);
  }

  .nav-links { display: none; }

  .nav-btn {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: var(--tap);
    color: var(--link);
    text-decoration: underline;
  }
  .nav-btn svg { display: none; }

  .burger { display: flex; margin-left: 12px; }
  .nav-inner { gap: 16px; }

  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
  }
  .hero-inner { max-width: 880px; }

  .hero-actions { justify-content: center; gap: 34px; }

  .hero-actions .btn-pill-primary,
  .hero-actions .btn-pill-ghost {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: auto;
    width: auto;
    color: var(--link);
    text-decoration: underline;
  }
  .hero-actions .btn-pill-primary::after { display: none; }
  .hero-actions .btn-pill-primary:hover { transform: none; box-shadow: none; }
  .hero-actions .btn-pill-ghost:hover { color: var(--link); }
  .hero-actions .btn-pill-primary svg { display: none; }

  .hero-metrics { flex-direction: column; gap: 12px; }
  .metric-sep { display: none; }
  .metric { flex-direction: row; align-items: baseline; gap: 10px; }
  .metric-l { margin-top: 0; font-size: 1rem; color: var(--t1); letter-spacing: 0; }
  .metric-n { font-size: 1.5rem; color: var(--t1); }
  .metric-u { font-size: 1.1rem; color: var(--t1); }

  .hero-terminal { width: 100%; max-width: 760px; flex: none; }
  .t-dots { display: none; }
  .term-output { display: none; }
  .term-chrome { justify-content: center; }
  .t-name { flex: 0 0 auto; margin-left: 0; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE SYSTEM
   Breakpoints:
   • xl:  ≤ 1200px  (large tablets / small laptops)
   • lg:  ≤ 1024px  (tablets landscape)
   • md:  ≤ 768px   (tablets portrait / large phones)
   • sm:  ≤ 480px   (phones)
   • xs:  ≤ 360px   (small phones)
   ══════════════════════════════════════════════ */

/* ── XL: ≤ 1200px ─────────────────────────── */
@media (max-width: 1200px) {
  .container { padding: 0 24px; }
  .nav-inner  { padding: 18px 24px; }

  /* Hero: reduce terminal size */
  .hero { padding: 130px 24px 80px; gap: 40px; }
  .hero-terminal { flex: 0 0 340px; }
}

/* ── LG: ≤ 1024px ─────────────────────────── */
@media (max-width: 1024px) {

  /* NAV */
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 13px; }

  /* HERO: stack vertically */
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 120px 24px 80px;
    min-height: auto;
    gap: 40px;
  }
  .hero-inner { max-width: 100%; }
  .hero-eyebrow { justify-content: center; }
  .hero-title { letter-spacing: -1.5px; }
  .hero-desc { margin-left: auto; margin-right: auto; max-width: 560px; }
  .hero-actions { justify-content: center; }
  .hero-metrics { justify-content: center; }
  .hero-terminal {
    flex: none;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }
  .scroll-hint { display: none; }

  /* SECTIONS */
  .section { padding: 80px 0; }

  /* SERVICES HEAD */
  .s-head { grid-template-columns: 1fr; gap: 12px; }
  .s-head p { max-width: 540px; }

  /* SITUACIONES TABS: 3 columns */
  .sit-tabs { grid-template-columns: repeat(3, 1fr); }

  /* SERVICE DETAIL: stack */
  .sit-detail { grid-template-columns: 1fr; }
  .sd-aside {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  /* PROCESS: vertical */
  .process-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .proc-arrow {
    transform: rotate(90deg);
    display: block;
    text-align: center;
    padding: 4px 0;
    font-size: 18px;
    color: var(--t3);
  }
  .proc-card { border-radius: var(--rl); }

  /* CASES */
  .cases-grid { grid-template-columns: repeat(2, 1fr); }

  /* NOSOTROS */
  .us-split { grid-template-columns: 1fr; gap: 40px; }

  /* CONTACT */
  .contact-split { grid-template-columns: 1fr; gap: 48px; }

  /* FOOTER */
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ── MD: ≤ 768px ──────────────────────────── */
@media (max-width: 768px) {

  /* Reset cursor */
  body { cursor: auto; }
  .cursor, .cursor-trail { display: none; }

  /* NAV */
  .nav-links, .nav-btn { display: none; }
  .burger { display: flex; }
  .nav-inner { padding: 16px 20px; }

  /* HERO */
  .hero { padding: 100px 20px 60px; gap: 32px; }
  .hero-title {
    font-size: clamp(34px, 8vw, 52px);
    letter-spacing: -1px;
  }
  .hero-desc { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: center; gap: 12px; }
  .btn-pill-primary, .btn-pill-ghost { width: 100%; justify-content: center; }
  .hero-metrics { gap: 16px; }
  .metric-n { font-size: 28px; }
  .metric-sep { height: 28px; }

  /* TERMINAL */
  .hero-terminal { max-width: 100%; }
  .term-output { min-height: 150px; font-size: 11px; }

  /* SECTIONS */
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .s-h2 { font-size: clamp(24px, 6vw, 36px); letter-spacing: -0.5px; margin-bottom: 32px; }
  .s-head h2 { font-size: clamp(26px, 7vw, 38px); }

  /* SITUACIONES TABS: 2 columns */
  .sit-tabs { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .sit-tab { padding: 14px 12px; }
  .tab-icon { font-size: 20px; }
  .tab-txt { font-size: 11px; }
  .tab-txt strong { font-size: 12px; }

  /* SERVICE PANEL */
  .sit-panel { min-height: 200px; }
  .sd-info { padding: 24px 20px; }
  .sd-info h3 { font-size: 20px; }
  .sd-aside { padding: 24px 20px; }
  .sd-stats { grid-template-columns: 1fr 1fr; }
  .sd-stat b { font-size: 18px; }
  .sd-cta-row { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* PROCESS */
  .proc-card { padding: 20px; }
  .proc-n { font-size: 22px; margin-bottom: 10px; }

  /* CASES */
  .cases-grid { grid-template-columns: 1fr; gap: 14px; }
  .case-card { padding: 22px; }

  /* NOSOTROS */
  .certs-flow { gap: 8px; }
  .cert-pill { padding: 8px 14px; font-size: 12px; }
  .trust-items { gap: 12px; }

  /* CONTACT */
  .cf-row { grid-template-columns: 1fr; }
  .c-form { padding: 24px 20px; }
  .contact-left h2 { font-size: clamp(24px, 6vw, 34px); }

  /* FOOTER */
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .foot-bottom { flex-direction: column; text-align: center; gap: 6px; }

  /* URGENCY FLOAT */
  .urgency-float {
    font-size: 12px;
    padding: 10px 18px;
    width: calc(100% - 40px);
    max-width: 340px;
    text-align: center;
    justify-content: center;
  }
}

/* ── SM: ≤ 480px ──────────────────────────── */
@media (max-width: 480px) {

  /* HERO */
  .hero { padding: 90px 16px 48px; }
  .hero-title { font-size: clamp(30px, 9vw, 42px); }
  .hero-eyebrow { font-size: 10px; }
  .hero-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
  }
  .metric-sep { display: none; }
  .metric { align-items: center; }

  /* TABS: 2 cols but narrower */
  .sit-tabs { grid-template-columns: 1fr 1fr; gap: 6px; }
  .sit-tab { padding: 12px 10px; gap: 6px; }

  /* TERMINAL: shorter */
  .term-output { min-height: 130px; padding: 14px 16px; }

  /* SECTIONS */
  .section { padding: 52px 0; }
  .container { padding: 0 16px; }

  /* PROCESS */
  .process-row { gap: 0; }
  .proc-card { padding: 18px 16px; }

  /* CONTACT FORM */
  .c-form { padding: 20px 16px; }
  .cf-group input,
  .cf-group select,
  .cf-group textarea { font-size: 16px; } /* prevent iOS zoom */

  /* FOOTER */
  .foot-grid { gap: 24px; }

  /* BLOBS: reduce intensity on mobile */
  .blob-1 { width: 300px; height: 300px; opacity: 0.4; }
  .blob-2 { width: 200px; height: 200px; opacity: 0.3; }
  .blob-3 { width: 250px; height: 150px; opacity: 0.25; }
}

/* ── XS: ≤ 360px ──────────────────────────── */
@media (max-width: 360px) {
  .hero-title { font-size: clamp(26px, 9vw, 36px); letter-spacing: -0.5px; }
  .logo-word { font-size: 14px; letter-spacing: 1.5px; }
  .sit-tabs { grid-template-columns: 1fr 1fr; }
  .hero-metrics { grid-template-columns: 1fr 1fr; }
  .sd-stats { grid-template-columns: 1fr; }
  .nav-inner { gap: 12px; }
}

/* ── PRINT ────────────────────────────────── */
@media print {
  .nav, .urgency-float, .cursor, .cursor-trail, .ambient { display: none; }
  body { background: white; color: black; }
  .section { padding: 24px 0; }
}

/* ── TOUCH DEVICES: disable hover-heavy effects ── */
@media (hover: none) {
  .btn-pill-primary:hover { transform: none; }
  .sit-tab:hover { transform: none; }
  .proc-card:hover { transform: none; }
  .case-card:hover { transform: none; }
  .cert-pill:hover { transform: none; }

  .nav-links a,
  .foot-col ul a,
  .urgency-float {
    min-height: var(--tap);
    min-width: var(--tap);
    display: inline-flex;
    align-items: center;
  }
}

/* ── REDUCED MOTION ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── iOS / SAFARI FIXES ───────────────────── */

/* Fix 100vh on iOS (accounts for browser chrome) */
.hero {
  min-height: 100svh; /* svh = small viewport height, modern browsers */
}

/* Safe area padding for notch devices */
.nav-inner {
  padding-left: max(32px, env(safe-area-inset-left));
  padding-right: max(32px, env(safe-area-inset-right));
}
@media (max-width: 768px) {
  .nav-inner {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .container {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .footer {
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
}

/* Prevent text size adjustment on rotate */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Fix backdrop-filter on older Safari */
@supports not (backdrop-filter: blur(1px)) {
  .glass-card { background: rgba(17, 11, 50, 0.9); }
  .nav.stuck  { background: rgba(12, 10, 30, 0.97); }
  .hero-terminal { background: rgba(10, 8, 24, 0.97); }
  .urgency-float { background: rgba(12, 10, 30, 0.97); }
}
