/* ============================================================
   FIDELIA — Lifecycle Marketing Agency
   Design System v5
   ============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.65;
}
a { text-decoration: none; color: inherit; }
img, svg { display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ===== DESIGN TOKENS ===== */
:root {
  --purple-deep:    #2a1a49;
  --purple-mid:     #3d2868;
  --purple-accent:  #7c4fc4;
  --lavender:       #9b7fe8;
  --lavender-soft:  #c4afff;
  --amber:          #e8a84a;
  --amber-light:    #f3c97e;
  --off-white:      #f4f3f6;
  --surface:        #ffffff;
  --border:         rgba(42,26,73,.10);
  --text-dark:      #1a0d30;
  --text-muted:     rgba(42,26,73,.52);
  --section-pad:    100px;
  --section-pad-sm: 64px;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 40px;
}
@media (max-width: 768px) { .container { padding-inline: 22px; } }
@media (max-width: 480px) { .container { padding-inline: 18px; } }

/* ===== TYPOGRAPHY ===== */
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--lavender); margin-bottom: 16px;
}
.eyebrow--light { color: var(--lavender-soft); }

h2 { font-size: clamp(30px, 4.5vw, 48px); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; color: var(--purple-deep); }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-subtitle { font-size: 17px; color: var(--text-muted); margin-top: 18px; max-width: 580px; margin-inline: auto; line-height: 1.6; }

.gradient-text {
  background: linear-gradient(125deg, var(--lavender) 0%, var(--amber) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-lavender { color: var(--lavender); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
  padding: 14px 28px; border-radius: 12px;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.btn-primary   { background: var(--amber); color: var(--text-dark); }
.btn-primary:hover { background: var(--amber-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,168,74,.35); }
.btn-ghost     { background: rgba(244,243,246,.08); color: var(--off-white); border: 1px solid rgba(244,243,246,.18); }
.btn-ghost:hover { background: rgba(244,243,246,.14); transform: translateY(-2px); }
.btn-nav-cta   { background: var(--amber); color: var(--text-dark); padding: 10px 20px; font-size: 13.5px; border-radius: 10px; }
.btn-nav-cta:hover { background: var(--amber-light); }
.btn-lg        { font-size: 15.5px; padding: 16px 34px; border-radius: 14px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1.05s cubic-bezier(0.16, 1, 0.3, 1), transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Animaciones suaves y progresivas para la sección de servicios */
.services .reveal {
  transition: opacity 1.15s cubic-bezier(0.16, 1, 0.3, 1), transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.services .entry-point-bar.reveal {
  transition-delay: 0.15s;
}
.services-grid .service-card.reveal {
  transition: opacity 1.25s cubic-bezier(0.16, 1, 0.3, 1), transform 1.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.services-grid .service-card:nth-child(1) { transition-delay: 0.18s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.36s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.54s; }

/* Animación suave para la sección de stack tecnológico */
.stack-section .stack-header.reveal {
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.stack-section .marquee-wrapper.reveal {
  transition: opacity 1.25s cubic-bezier(0.16, 1, 0.3, 1), transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.22s;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 16px 0; transition: background .3s, box-shadow .3s;
}
.navbar.scrolled { background: rgba(42,26,73,.96); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(155,127,232,.12); }
.nav-inner { display: flex; align-items: center; gap: 32px; }
.logo { font-size: 22px; font-weight: 900; color: var(--off-white); letter-spacing: -.025em; margin-right: auto; transition: opacity .2s; }
.logo:hover { opacity: .82; }
.logo-dot { color: var(--amber); }
.logo-img { height: 58px; width: auto; object-fit: contain; display: block; }
.footer-logo-img { height: 48px; width: auto; object-fit: contain; display: block; }

.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 13.5px; font-weight: 500; color: rgba(244,243,246,.68); transition: color .2s; }
.nav-links a:hover { color: var(--off-white); }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 32px; height: 32px; }
.nav-toggle span { display: block; height: 2px; background: var(--off-white); border-radius: 2px; transition: all .3s; }

.nav-mobile { display: none; flex-direction: column; background: var(--purple-deep); padding: 12px 24px 20px; border-top: 1px solid rgba(244,243,246,.07); }
.nav-mobile.open { display: flex; }
.nav-mobile a { color: rgba(244,243,246,.75); font-size: 15px; font-weight: 500; padding: 12px 0; border-bottom: 1px solid rgba(244,243,246,.07); transition: color .2s; }
.nav-mobile a:last-child { border-bottom: none; }
.btn-mobile-cta {
  margin-top: 12px;
  color: var(--text-dark) !important;
  background: var(--amber);
  border-bottom: none !important;
  padding: 13px 26px;
  border-radius: 12px;
  text-align: center;
  justify-content: center;
  font-weight: 700;
}
.btn-mobile-cta:hover { background: var(--amber-light); }

/* ===== HERO ===== */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--purple-deep); position: relative; overflow: hidden; padding: 120px 0 80px;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(72px); animation: orbPulse 8s ease-in-out infinite alternate; }
.orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(155,127,232,.28), transparent 65%); top: -140px; left: -120px; animation-delay: 0s; }
.orb-2 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(124,79,196,.22), transparent 65%); bottom: -100px; right: -80px; animation-delay: -3s; }
.orb-3 { width: 280px; height: 280px; background: radial-gradient(circle, rgba(232,168,74,.12), transparent 65%); top: 30%; right: 10%; animation-delay: -6s; }
@keyframes orbPulse { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 1; transform: scale(1.1); } }
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(155,127,232,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(155,127,232,.06) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* Lab metric tags */
.hero-lab-tags { position: absolute; inset: 0; pointer-events: none; }
.lab-tag {
  position: absolute; font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--lavender-soft); opacity: 0.28;
  background: rgba(155,127,232,.07); border: 1px solid rgba(155,127,232,.14);
  padding: 5px 11px; border-radius: 6px;
  animation: tagFloat var(--dur, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.lab-tag-1 { top: 22%; left: 6%;  --dur: 7s;  --delay: 0s; }
.lab-tag-2 { top: 38%; left: 3%;  --dur: 8.5s;--delay:-2s; }
.lab-tag-3 { top: 22%; right: 5%; --dur: 7.5s;--delay:-1s; }
.lab-tag-4 { top: 40%; right: 3%; --dur: 9s;  --delay:-3s; }
@keyframes tagFloat {
  0%,100% { transform: translateY(0); opacity: .28; }
  50%      { transform: translateY(-10px); opacity: .38; }
}

/* Hero content */
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 800px; margin-inline: auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--lavender-soft); background: rgba(155,127,232,.1);
  border: 1px solid rgba(155,127,232,.2); border-radius: 100px;
  padding: 7px 16px; margin-bottom: 28px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lavender); animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.75); } }

.hero-title {
  font-size: clamp(40px, 7vw, 76px); font-weight: 900; letter-spacing: -.04em; line-height: 1.06;
  color: var(--off-white); margin-bottom: 24px;
}
.hero-subtitle {
  font-size: clamp(16px, 2vw, 19px); color: rgba(244,243,246,.6);
  margin-bottom: 40px; line-height: 1.6; font-weight: 400;
}
.br-desktop { display: block; }

/* Hero actions: primary CTA + meta below, ghost aside */
.hero-actions {
  display: flex; gap: 20px;
  justify-content: center; align-items: flex-start; flex-wrap: wrap;
}
.hero-primary-cta {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-meta {
  display: flex; gap: 10px; align-items: center;
  color: rgba(244,243,246,.36); font-size: 12.5px;
  font-weight: 500;
}
.hero-meta .dot-sep { color: rgba(244,243,246,.2); }

.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
}
.scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, rgba(244,243,246,.4), transparent);
  margin: 0 auto; animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100% { opacity: .5; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.1); } }

/* ===== PROBLEMA ===== */
.problem-section {
  padding: var(--section-pad) 0;
  position: relative; overflow: hidden;
}
.problem-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.problem-left h2 { font-size: clamp(26px, 3.5vw, 40px); }
.problem-text { font-size: 16.5px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.7; }
.problem-text--highlight { font-weight: 600; color: var(--purple-deep); }

.molecule-deco { position: absolute; right: -30px; top: 50%; transform: translateY(-50%); width: 220px; opacity: .55; pointer-events: none; }
.molecule-deco--right { right: 0; }

/* ===== STATS ===== */
.stats-section {
  background: var(--purple-deep);
  padding: 80px 0; position: relative; overflow: hidden;
}
.stats-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stats-grid-pattern {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(155,127,232,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(155,127,232,.07) 1px, transparent 1px);
  background-size: 48px 48px;
}
.stats-inner {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0; align-items: center; position: relative; z-index: 1;
}
.stat-item { text-align: center; padding: 32px 20px; }
.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(44px, 6vw, 68px); font-weight: 700;
  line-height: 1; letter-spacing: -.03em;
  background: linear-gradient(125deg, var(--lavender-soft), var(--amber-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 14px;
}
.stat-number--static { font-size: clamp(36px, 5vw, 58px); }
.stat-label { font-size: 14px; color: rgba(244,243,246,.58); line-height: 1.5; max-width: 220px; margin-inline: auto; }
.stat-divider { width: 1px; height: 80px; background: rgba(244,243,246,.1); }
.stats-source { text-align: center; font-size: 12px; color: rgba(244,243,246,.3); margin-top: 24px; font-family: 'JetBrains Mono', monospace; }

/* ===== NOSOTROS / MANIFESTO ===== */
.manifesto {
  padding: var(--section-pad) 0;
  background: var(--surface);
  position: relative; overflow: hidden;
}

/* Lab animated background */
.lab-bg-anim { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lab-bg-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.lab-float-el { position: absolute; border-radius: 50%; }
.lfe-1 { width: 200px; height: 200px; background: radial-gradient(circle, rgba(155,127,232,.055), transparent 70%); top: 10%; right: 5%; animation: labElFloat 16s ease-in-out infinite; }
.lfe-2 { width: 140px; height: 140px; background: radial-gradient(circle, rgba(232,168,74,.04), transparent 70%); bottom: 20%; left: 6%; animation: labElFloat 12s ease-in-out infinite; animation-delay: -5s; }
.lfe-3 { width: 100px; height: 100px; background: radial-gradient(circle, rgba(155,127,232,.04), transparent 70%); top: 55%; right: 18%; animation: labElFloat 20s ease-in-out infinite; animation-delay: -8s; }
.lfe-4 { width: 70px; height: 70px; background: radial-gradient(circle, rgba(155,127,232,.06), transparent 70%); top: 28%; left: 22%; animation: labElFloat 10s ease-in-out infinite; animation-delay: -2s; }
@keyframes labElFloat { 0%,100% { transform: translate(0,0); } 25% { transform: translate(14px,-18px); } 50% { transform: translate(-10px,14px); } 75% { transform: translate(8px,6px); } }

.lab-dots-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(155,127,232,.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

.manifesto-grid {
  display: grid; grid-template-columns: 220px 1fr; gap: 72px; align-items: start;
  position: relative; z-index: 1;
}
.manifesto-left { padding-top: 4px; }
.mini-molecule { width: 150px; margin-top: 16px; animation: miniMolSpin 20s linear infinite; }
@keyframes miniMolSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.manifesto-title { font-size: clamp(28px, 3.8vw, 44px); margin-bottom: 28px; }
.manifesto-title em { color: var(--lavender); font-style: italic; }
.manifesto-text { font-size: 16.5px; color: var(--text-muted); line-height: 1.75; margin-bottom: 20px; }
.manifesto-divider { height: 1px; background: var(--border); margin: 28px 0; }
.manifesto-for { font-size: 15.5px; color: var(--text-muted); line-height: 1.7; }
.manifesto-for strong { color: var(--purple-deep); font-weight: 700; }

/* ===== DIAGNÓSTICO / FOR-WHOM ===== */
.for-whom {
  padding: var(--section-pad) 0;
  background: var(--off-white);
}
.symptoms-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-bottom: 56px;
}
.symptom-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 24px 22px;
  position: relative; overflow: hidden;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.symptom-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--lavender), var(--amber));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.symptom-card:hover::before { transform: scaleX(1); }
.symptom-card:hover { border-color: rgba(155,127,232,.25); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(42,26,73,.09); }

.symptom-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(155,127,232,.12), rgba(232,168,74,.06));
  display: flex; align-items: center; justify-content: center;
  color: var(--lavender); margin-bottom: 12px;
}
.symptom-icon-wrap svg { width: 28px; height: 28px; }
.symptom-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: rgba(155,127,232,.45); margin-bottom: 10px;
}
.symptom-card p {
  font-size: 16px; font-weight: 500; color: var(--purple-deep);
  line-height: 1.5;
}

/* Frase de cierre sin botón */
.for-whom-statement {
  text-align: center; padding: 12px 20px 0;
  max-width: 700px; margin: 0 auto;
}
.for-whom-statement p {
  font-size: clamp(19px, 2.8vw, 24px);
  color: var(--purple-deep); line-height: 1.45;
  font-weight: 500;
}
.statement-highlight {
  font-weight: 800;
  background: linear-gradient(125deg, var(--lavender) 0%, var(--amber) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ===== SERVICIOS ===== */
.services { padding: var(--section-pad) 0; background: var(--surface); }

/* Entry bar: solo informativo, sin CTA */
.entry-point-bar {
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--purple-mid) 100%);
  border-radius: 20px; padding: 36px 44px;
  display: flex; align-items: center; gap: 40px;
  margin-bottom: 40px;
}
.entry-left { flex: 1; }
.entry-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--amber);
  margin-bottom: 10px;
}
.entry-left h3 { font-size: 20px; color: var(--off-white); margin-bottom: 8px; line-height: 1.3; }
.entry-left p { font-size: 14.5px; color: rgba(244,243,246,.6); line-height: 1.6; }
.entry-meta { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.entry-meta-item { font-size: 13px; font-weight: 600; color: rgba(244,243,246,.7); white-space: nowrap; }

.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 32px 28px; position: relative; overflow: hidden;
  transition: border-color .3s ease, transform 1.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .3s ease, opacity 1.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-card:hover {
  border-color: rgba(155,127,232,.3); transform: translateY(-6px); box-shadow: 0 20px 48px rgba(42,26,73,.1);
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.service-card--featured {
  background: var(--purple-deep); border-color: transparent;
}
.service-card--featured h3, .service-card--featured p { color: var(--off-white); }
.service-card--featured .service-desc { color: rgba(244,243,246,.65); }
.service-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.service-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--lavender); background: rgba(155,127,232,.1); border-radius: 6px; padding: 4px 10px;
}
.service-badge--gold { color: var(--amber); background: rgba(232,168,74,.1); }
.service-num { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: rgba(155,127,232,.4); }
.service-icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(155,127,232,.1); display: flex; align-items: center; justify-content: center; color: var(--lavender); margin-bottom: 16px; }
.service-icon--light { background: rgba(244,243,246,.1); color: var(--lavender-soft); }
.service-title { font-size: 21px; margin-bottom: 12px; line-height: 1.25; color: var(--purple-deep); }
.service-card--featured .service-title { color: var(--off-white); }
.service-desc { font-size: 14.5px; color: var(--text-muted); line-height: 1.65; }

/* ===== PROCESO ===== */
.process {
  padding: var(--section-pad) 0;
  background: linear-gradient(165deg, #f0eef8 0%, var(--off-white) 50%, #f8f6ff 100%);
}
.process-intro {
  text-align: center; font-style: italic;
  font-size: 16.5px; color: var(--text-muted);
  max-width: 580px; margin: 0 auto 48px; line-height: 1.65;
}
.process-tablist {
  display: flex; gap: 6px; background: rgba(42,26,73,.06);
  padding: 6px; border-radius: 18px;
  margin-bottom: 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.process-tab {
  flex: 1; min-width: 120px; display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
  color: var(--text-muted); transition: all .25s;
  white-space: nowrap;
}
.process-tab:hover { background: rgba(155,127,232,.08); color: var(--purple-accent); }
.process-tab.active { background: var(--surface); color: var(--purple-deep); box-shadow: 0 2px 12px rgba(42,26,73,.1); }
.tab-num { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: .04em; opacity: .6; }
.process-tab.active .tab-num { opacity: 1; color: var(--lavender); }

.process-progress { height: 3px; background: rgba(155,127,232,.12); border-radius: 2px; margin: 10px 0; overflow: hidden; }
.process-progress-bar { height: 100%; background: linear-gradient(90deg, var(--lavender), var(--amber)); border-radius: 2px; transition: width .1s linear; }

.process-panels { min-height: 200px; }
.process-panel { display: none; }
.process-panel.active { display: block; }
.panel-inner {
  background: var(--surface); border-radius: 22px; padding: 48px 52px;
  border: 1px solid var(--border); box-shadow: 0 4px 24px rgba(42,26,73,.05);
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: start;
}
.panel-header {}
.panel-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(155,127,232,.5); display: block; margin-bottom: 8px; }
.panel-inner h3 { font-size: 28px; white-space: nowrap; }
.panel-inner p { font-size: 16px; color: var(--text-muted); line-height: 1.75; align-self: center; }

/* ===== TECH STACK ===== */
.stack-section {
  background: var(--off-white);
  padding: 72px 0 40px;
  overflow: hidden;
}
.stack-header { text-align: center; margin-bottom: 52px; }
.section-title-light { color: var(--purple-deep); font-size: clamp(26px, 3.5vw, 40px); margin-bottom: 14px; }
.section-subtitle-light { font-size: 16px; color: var(--text-muted); }

.marquee-wrapper { overflow: hidden; mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%); }
.marquee-track {
  display: flex; align-items: center;
  gap: 0; width: max-content;
  animation: marqueeScroll 48s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marqueeScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.marquee-item {
  display: flex; align-items: center; gap: 12px;
  padding: 0 88px;
  color: var(--purple-deep);
  white-space: nowrap;
}
.marquee-logo {
  height: 38px; width: auto; object-fit: contain;
  display: block;
}

/* ===== CTA FINAL ===== */
.cta-section { padding: 40px 0 var(--section-pad); background: var(--off-white); }
.cta-card {
  background: var(--purple-deep); border-radius: 28px;
  padding: 56px 56px 48px; text-align: center;
  position: relative; overflow: hidden;
  max-width: 1000px; margin-left: auto; margin-right: auto;
}
.cta-card-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(155,127,232,.22), transparent 70%);
}
.cta-molecule { position: absolute; width: 200px; right: 0; top: 0; opacity: .35; pointer-events: none; }
.cta-card h2 { color: var(--off-white); font-size: clamp(24px, 3.5vw, 38px); margin-bottom: 18px; position: relative; z-index: 1; }
.cta-card > p { font-size: 17px; color: rgba(244,243,246,.6); max-width: 480px; margin: 0 auto 44px; line-height: 1.7; position: relative; z-index: 1; }
.cta-btn-main { box-shadow: 0 8px 32px rgba(232,168,74,.3); position: relative; z-index: 1; }
.cta-intro { font-size: 17px; color: rgba(244,243,246,.6); max-width: 520px; margin: 0 auto 36px; line-height: 1.7; position: relative; z-index: 1; }

/* Calendario dentro del card CTA */
.cal-embed-dark {
  position: relative; z-index: 1;
  margin-top: 4px;
  background: rgba(244,243,246,.04);
  border: 1px dashed rgba(244,243,246,.14);
  border-radius: 20px;
  padding: 48px 36px;
  text-align: center;
}
.cal-icon-wrap {
  width: 64px; height: 64px; border-radius: 18px;
  background: rgba(155,127,232,.15);
  border: 1px solid rgba(155,127,232,.22);
  display: flex; align-items: center; justify-content: center;
  color: var(--lavender-soft); margin: 0 auto 20px;
}
.cal-embed-dark h3 { color: var(--off-white); font-size: 20px; margin-bottom: 10px; }
.cal-embed-dark p { color: rgba(244,243,246,.55); font-size: 15px; line-height: 1.65; margin-bottom: 24px; }
.cal-embed-dark strong { color: rgba(244,243,246,.82); }
.cal-embed-dark code {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  background: rgba(155,127,232,.25); color: var(--lavender-soft);
  padding: 2px 7px; border-radius: 5px;
}
/* Widget de Calendly dentro del card */
.cta-card .calendly-inline-widget {
  min-width: 0; width: 100%; height: 700px;
  margin-top: 32px; border-radius: 16px; overflow: hidden;
  position: relative; z-index: 1;
}
@media (max-width: 768px) {
  .cta-card .calendly-inline-widget { height: 900px; }
  .cal-embed-dark { padding: 36px 20px; }
}

/* ===== CALENDARIO ===== */
.calendar-section {
  padding: var(--section-pad) 0;
  background: var(--surface);
}
.calendar-placeholder {
  max-width: 680px; margin: 0 auto;
  background: var(--off-white);
  border: 2px dashed rgba(155,127,232,.2);
  border-radius: 24px; text-align: center;
  padding: 72px 40px;
}
.cal-placeholder-inner { max-width: 460px; margin: 0 auto; }
.cal-placeholder-icon {
  width: 72px; height: 72px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(155,127,232,.12), rgba(232,168,74,.08));
  display: flex; align-items: center; justify-content: center;
  color: var(--lavender); margin: 0 auto 24px;
}
.calendar-placeholder h3 { font-size: 22px; color: var(--purple-deep); margin-bottom: 12px; }
.calendar-placeholder p { font-size: 15px; color: var(--text-muted); line-height: 1.65; margin-bottom: 28px; }
.calendar-placeholder code {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  background: rgba(155,127,232,.1); color: var(--lavender);
  padding: 2px 6px; border-radius: 4px;
}
.calendly-wrapper {
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(42,26,73,.08);
  border: 1px solid var(--border);
  max-width: 900px; margin: 0 auto;
}
.calendly-inline-widget { min-width: 320px; height: 700px; }
.calendar-alt { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }
.calendar-alt a { color: var(--purple-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ===== NEWSLETTER ===== */
.newsletter-section {
  padding: 68px 0;
  background: var(--purple-mid);
  position: relative; overflow: hidden;
}
.newsletter-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.orb-newsletter-1 { width: 440px; height: 440px; background: radial-gradient(circle, rgba(155,127,232,.38), transparent 65%); top: -140px; left: -110px; filter: blur(68px); animation: orbPulse 10s ease-in-out infinite alternate; }
.orb-newsletter-2 { width: 340px; height: 340px; background: radial-gradient(circle, rgba(124,79,196,.32), transparent 65%); bottom: -100px; right: -80px; filter: blur(58px); animation: orbPulse 12s ease-in-out infinite alternate; animation-delay: -4s; }
.orb-newsletter-3 { width: 220px; height: 220px; background: radial-gradient(circle, rgba(232,168,74,.18), transparent 65%); top: 35%; right: 12%; filter: blur(48px); animation: orbPulse 9s ease-in-out infinite alternate; animation-delay: -2s; }

/* Moving data stream lines */
.newsletter-streams { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stream {
  position: absolute; left: -100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(155,127,232,.38), transparent);
  animation: streamFlow var(--dur, 8s) linear infinite;
  animation-delay: var(--delay, 0s);
  border-radius: 2px;
}
.stream-1 { top: 22%; width: 55%; --dur: 9s;  --delay: 0s; }
.stream-2 { top: 50%; width: 40%; --dur: 13s; --delay: -4s; }
.stream-3 { top: 75%; width: 65%; --dur: 8s;  --delay: -2s; height: 1px; background: linear-gradient(90deg, transparent, rgba(232,168,74,.22), transparent); }
.stream-4 { top: 38%; width: 30%; --dur: 10s; --delay: -6s; height: 1px; background: linear-gradient(90deg, transparent, rgba(196,175,255,.25), transparent); }
@keyframes streamFlow { 0% { left: -65%; } 100% { left: 115%; } }

/* Animated dot grid */
.newsletter-section::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(155,127,232,.13) 1.5px, transparent 1.5px);
  background-size: 36px 36px;
  animation: gridDrift 16s linear infinite;
}
@keyframes gridDrift { 0% { background-position: 0 0; } 100% { background-position: 36px 36px; } }

.newsletter-inner {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  position: relative; z-index: 2; text-align: center;
}
.flask-icon {
  width: 80px; height: 80px; border-radius: 22px;
  background: rgba(244,243,246,.07); border: 1px solid rgba(244,243,246,.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--lavender-soft);
  animation: flaskFloat 5s ease-in-out infinite;
}
@keyframes flaskFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.newsletter-content { max-width: 540px; }
.newsletter-content h2 { color: var(--off-white); margin-bottom: 14px; }
.newsletter-content p { color: rgba(244,243,246,.6); font-size: 16px; margin-bottom: 28px; }
.newsletter-form { width: 100%; }
.newsletter-input-group { display: flex; gap: 10px; }
.newsletter-input-group input {
  flex: 1; padding: 14px 18px; border-radius: 12px;
  border: 1px solid rgba(244,243,246,.16);
  background: rgba(244,243,246,.07); color: var(--off-white);
  font: inherit; font-size: 15px; transition: border-color .2s;
}
.newsletter-input-group input::placeholder { color: rgba(244,243,246,.35); }
.newsletter-input-group input:focus { outline: none; border-color: rgba(155,127,232,.45); }
.newsletter-success, .newsletter-error { display: none; margin-top: 12px; font-size: 14px; }
.newsletter-success.show, .newsletter-error.show { display: block; }
.newsletter-success { color: #7ee8a2; }
.newsletter-error   { color: #f88; }

/* ===== FOOTER ===== */
.footer { background: var(--purple-deep); padding: 52px 0 0; }
.footer-inner { display: flex; align-items: center; gap: 48px; padding-bottom: 40px; border-bottom: 1px solid rgba(244,243,246,.07); }
.footer-logo-block { margin-right: auto; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; color: rgba(244,243,246,.5); transition: color .2s; }
.footer-links a:hover { color: var(--off-white); }
.footer-social { display: flex; gap: 12px; }
.social-icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(244,243,246,.07); border: 1px solid rgba(244,243,246,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(244,243,246,.55); transition: all .2s;
}
.social-icon-btn:hover { background: rgba(244,243,246,.12); color: var(--off-white); }
.footer-bottom { padding: 20px 0; }
.footer-bottom-inner { display: flex; justify-content: center; }
.footer-bottom span { font-size: 12.5px; color: rgba(244,243,246,.28); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  :root { --section-pad: 80px; }
  .problem-inner { grid-template-columns: 1fr; gap: 40px; }
  .molecule-deco { display: none; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .stats-inner { grid-template-columns: 1fr; gap: 0; }
  .stat-divider { display: none; }
  .stat-item { border-bottom: 1px solid rgba(244,243,246,.06); }
  .stat-item:last-child { border-bottom: none; }
  .manifesto-grid { grid-template-columns: 1fr; gap: 40px; }
  .manifesto-left { display: flex; align-items: center; gap: 20px; }
}

@media (max-width: 768px) {
  :root { --section-pad: var(--section-pad-sm); }
  .nav-links, .btn-nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .br-desktop { display: none; }
  .hero-lab-tags { display: none; }
  .logo-img { height: 44px; }
  .hero-actions { flex-direction: column; align-items: center; gap: 14px; }
  .hero-primary-cta { align-items: center; }
  .hero-meta { justify-content: center; }
  .symptoms-grid { grid-template-columns: 1fr 1fr; }
  .entry-point-bar { flex-direction: column; gap: 16px; align-items: flex-start; }
  .entry-meta { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .services-grid { grid-template-columns: 1fr; }
  /* Balance headings on mobile to avoid orphan words */
  h2, .section-subtitle, .process-intro { text-wrap: balance; }
  .process-tab .tab-label { display: none; }
  .process-tab { min-width: 60px; justify-content: center; }
  .panel-inner { grid-template-columns: 1fr; gap: 20px; padding: 32px 28px; }
  .panel-inner h3 { white-space: normal; }
  .footer-inner { flex-wrap: wrap; gap: 28px; }
  .footer-links { gap: 18px; }
  .cta-card { padding: 48px 28px; }
  .cta-molecule { display: none; }
  /* Calendly widget: reduce height on mobile to avoid empty space */
  .cta-card .calendly-inline-widget { height: 580px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(34px, 10vw, 52px); }
  .hero-badge { font-size: 10px; text-align: center; }
  .btn-lg { font-size: 14px; padding: 14px 22px; }
  .symptoms-grid { grid-template-columns: 1fr; }
  .stats-inner { display: flex; flex-direction: column; }
  .newsletter-input-group { flex-direction: column; }
  .calendly-inline-widget { height: 900px; }
}

/* ============================================================
   READING PROGRESS BAR & BLOG STYLES
   ============================================================ */

/* Barra de progreso de lectura (solo morado a dorado oficial) */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(42, 26, 73, 0.15);
  z-index: 1000;
  pointer-events: none;
}
.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9b7fe8, #e8a84a);
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(155, 127, 232, 0.5);
}

/* Blog List Page */
.blog-hero {
  padding: 140px 0 60px;
  background: linear-gradient(180deg, var(--purple-deep) 0%, #1f1238 100%);
  color: var(--off-white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero-title {
  font-size: clamp(22px, 3.8vw, 54px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--off-white);
  margin-bottom: 20px;
}
@media (max-width: 992px) {
  .blog-hero-title {
    white-space: normal;
    font-size: clamp(24px, 5.5vw, 40px);
  }
}
.blog-hero p {
  font-size: 17px;
  color: rgba(244, 243, 246, 0.7);
  max-width: 620px;
  margin: 0 auto;
}

/* Controls de búsqueda y filtro en el Blog */
.blog-controls {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.blog-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 460px;
}
.blog-search-input {
  width: 100%;
  padding: 14px 20px 14px 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(155, 127, 232, 0.25);
  color: var(--off-white);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
}
.blog-search-input:focus {
  border-color: var(--amber);
  background: rgba(255, 255, 255, 0.12);
}
.blog-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(244, 243, 246, 0.5);
  pointer-events: none;
}
.blog-filter-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.blog-filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(155, 127, 232, 0.2);
  color: rgba(244, 243, 246, 0.7);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.blog-filter-btn:hover, .blog-filter-btn.active {
  background: var(--amber);
  color: var(--purple-deep);
  border-color: var(--amber);
}

.blog-section {
  padding: 80px 0;
  background: var(--off-white);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}
.blog-card {
  background: #ffffff;
  border: 1px solid rgba(42, 26, 73, 0.08);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
}
@media (hover: hover) and (pointer: fine) {
  .blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(42, 26, 73, 0.08);
    border-color: rgba(155, 127, 232, 0.3);
  }
  .blog-card:hover .blog-card-img {
    transform: scale(1.04);
  }
}
.blog-card-img-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--purple-deep);
  position: relative;
}
.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-deep);
  background: rgba(155, 127, 232, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.blog-card-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--purple-deep);
  line-height: 1.35;
  margin-bottom: 10px;
}
.blog-card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: rgba(42, 26, 73, 0.5);
  font-weight: 500;
  border-top: 1px solid rgba(42, 26, 73, 0.06);
  padding-top: 14px;
}

/* Article Detail Page */
.article-header-section {
  padding: 130px 0 40px;
  background: linear-gradient(180deg, var(--purple-deep) 0%, #1f1238 100%);
  color: var(--off-white);
}
.article-header-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(244, 243, 246, 0.7);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s;
}
@media (hover: hover) and (pointer: fine) {
  .back-link:hover {
    color: var(--amber);
  }
}
.article-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.article-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(232, 168, 74, 0.12);
  padding: 5px 12px;
  border-radius: 6px;
}
.article-main-title {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.article-lead {
  font-size: clamp(16px, 2.2vw, 20px);
  color: rgba(244, 243, 246, 0.8);
  line-height: 1.6;
  max-width: 860px;
  margin-bottom: 28px;
}
.article-author-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
  color: rgba(244, 243, 246, 0.6);
  border-top: 1px solid rgba(244, 243, 246, 0.1);
  padding-top: 20px;
}
.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--purple-deep);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.article-body-section {
  padding: 60px 0 90px;
  background: var(--off-white);
}
.article-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}
.article-hero-cover {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 40px;
  box-shadow: 0 16px 40px rgba(42, 26, 73, 0.1);
  border: 1px solid rgba(42, 26, 73, 0.08);
}
.key-takeaways {
  background: #ffffff;
  border: 1px solid rgba(155, 127, 232, 0.25);
  border-left: 5px solid var(--purple-deep);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(42, 26, 73, 0.04);
}
.key-takeaways-title {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple-deep);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.key-takeaways ul {
  margin: 0;
  padding-left: 20px;
}
.key-takeaways li {
  font-size: 15px;
  color: var(--purple-deep);
  margin-bottom: 8px;
  line-height: 1.55;
}
.key-takeaways li:last-child {
  margin-bottom: 0;
}

.article-content {
  font-size: 17.5px;
  line-height: 1.8;
  color: #2b233a;
}
.article-content p {
  margin-bottom: 24px;
}
.article-content h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--purple-deep);
  margin: 48px 0 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.article-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--purple-deep);
  margin: 32px 0 14px;
}
.article-content ul, .article-content ol {
  margin: 0 0 24px 24px;
}
.article-content li {
  margin-bottom: 10px;
  line-height: 1.7;
}
.lab-callout {
  background: linear-gradient(135deg, rgba(155,127,232,0.08) 0%, rgba(232,168,74,0.08) 100%);
  border: 1px solid rgba(155,127,232,0.2);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 36px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--purple-deep);
}
.article-content blockquote {
  border-left: 4px solid var(--amber);
  padding-left: 20px;
  margin: 32px 0;
  font-style: italic;
  font-size: 19px;
  color: var(--purple-deep);
}

@media (max-width: 768px) {
  .blog-hero { padding: 110px 0 40px; }
  .article-header-section { padding: 110px 0 32px; }
  .article-header-container, .article-container { padding: 0 20px; }
  .key-takeaways { padding: 22px 18px; border-radius: 14px; }
  .article-content { font-size: 16.5px; line-height: 1.7; }
  .article-hero-cover { max-height: 260px; border-radius: 14px; }

  /* Touch optimization for mobile 1-tap navigation */
  .blog-card, .blog-card *, .back-link, .back-link * {
    -webkit-tap-highlight-color: rgba(155, 127, 232, 0.2);
    touch-action: manipulation;
  }
}

/* Performance optimization: content-visibility for offscreen sections */
.problem-section, .stats-section, .manifesto, .services, .process, .stack-section, .cta-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 700px;
}
