/**
 * ==========================================================================
 * CONVERSIA BY DITESA — HERO SECTION REDESIGN (CLEAN TECH & HIGH PRESENCE)
 * Based on Emil Kowalski's Design Engineering standards (/design skill).
 * 
 * - Single cohesive accent color: #4F7DF3.
 * - Flat white vector logo without glow, shine, or drop-shadow.
 * - Subtle low-opacity dark navy radial background depth (no electric neon).
 * - Finer glass status pill with breathing status dot.
 * - Minimalist glass paragraph card with fine gradient accent line.
 * - Tech chips (JetBrains Mono, radius 7px, prefix ▸ in accent, snappy hover).
 * - Sober ~1.2s entrance sequence upon load; cursor remains the only living element.
 * ==========================================================================
 */

:root {
  --hero-accent: #4F7DF3;
  --hero-accent-dim: rgba(79, 125, 243, 0.15);
  --hero-accent-glow: rgba(79, 125, 243, 0.06);
  --hero-bg-deep: #0A0E17;
  --ease-emil-out: cubic-bezier(0.23, 1, 0.32, 1);
}


/* Sticky Hero Section Viewport for Scroll-Driven Animation */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 1.5rem 4rem;
  background-color: var(--hero-bg-deep);
  overflow: hidden;
}

.hero-section.is-scroll-hero {
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  min-height: 100vh !important;
  width: 100% !important;
  overflow: hidden !important;
  z-index: 10;
}

/* In scroll-driven mode, element appearance is driven by scroll progress */
.is-scroll-hero .hero-dark-box,
.is-scroll-hero .hero-cta-group,
.is-scroll-hero .conversia-hero-logo,
.is-scroll-hero .hero-badge {
  animation: none !important;
}


/* Ambient Subtle Radial Gradient (Low opacity dark navy depth — No electric shine) */
.hero-ambient-glow {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 520px;
  max-width: 95vw;
  background: radial-gradient(ellipse at center, rgba(16, 28, 58, 0.5) 0%, rgba(10, 16, 32, 0.2) 55%, transparent 75%);
  pointer-events: none;
  z-index: 1;
  filter: blur(50px);
}

/* Active Terminal Code Stream Background (High visibility live runtime background) */
.terminal-background-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.82;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.92) 70%, rgba(0, 0, 0, 0.4) 90%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.92) 70%, rgba(0, 0, 0, 0.4) 90%, transparent 100%);
}

.terminal-window {
  opacity: 0.95 !important;
}

.terminal-lines-stream {
  color: #e2e8f0 !important;
  font-size: 13.5px !important;
  line-height: 1.65 !important;
}

/* Foreground Brand Content */
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ==========================================================================
   4. PÍLDORA SUPERIOR (Fina, Limpia & Minimalista)
   ========================================================================== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 9999px !important;
  padding: 0.36rem 1.15rem !important;
  margin: 1.5rem auto 2.2rem !important;
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 450 !important;
  letter-spacing: 0.035em !important;
  color: #CBD5E1 !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-shadow: none !important;
  text-transform: none !important;
  user-select: none;
  animation: heroFadeInOnly 0.4s var(--ease-emil-out) 0.05s forwards;
}

.hero-badge .ping-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: var(--hero-accent) !important;
  box-shadow: none !important;
  animation: heroDotBreathing 2.8s infinite ease-in-out !important;
}

/* Only transform/opacity so it runs on the compositor (box-shadow is forced to none above) */
@keyframes heroDotBreathing {
  0%, 100% {
    opacity: 0.95;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.92);
  }
}

/* ==========================================================================
   1 & 3. LOGO HERO CONVERSIA BY DITESA (Vector Exacto & Jerarquía Protagonista)
   ========================================================================== */
.conversia-hero-logo {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100%;
  max-width: 740px;
  margin: 0 auto 2.6rem !important;
  user-select: none;
}

/* Prompt Symbol > _ (Exact vector chevron + slow breathing underscore) */
.conversia-prompt-symbol {
  align-self: flex-start !important;
  display: inline-flex !important;
  align-items: flex-end !important;
  gap: 0.55rem !important;
  margin-left: 4px !important;
  margin-bottom: 0.45rem !important;
}

.conversia-prompt-symbol .prompt-chevron {
  width: clamp(28px, 4vw, 38px);
  height: auto;
  display: block;
}

.conversia-prompt-symbol .prompt-cursor-bar {
  display: inline-block;
  width: clamp(22px, 3.5vw, 36px);
  height: clamp(5.5px, 0.8vw, 8px);
  background: #ffffff;
  margin-bottom: 4px;
  animation: promptSlowBlink 1.4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes promptSlowBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.12; }
}

/* Wordmark "conversia" (Exact Vector SVG from Master Asset, Pure Flat White) */
.hero-wordmark-wrap {
  width: 100%;
  max-width: 720px;
  display: flex;
  justify-content: center;
  animation: heroRevealItem 0.42s var(--ease-emil-out) 0.22s both;
}

.hero-wordmark-img {
  width: 100%;
  height: auto;
  display: block;
  filter: none !important;
  text-shadow: none !important;
}

/* Byline "by D!TESA." (Exact Vector SVG with ! and underline bar) */
.hero-byline-wrap {
  width: 100%;
  max-width: 350px;
  display: flex;
  justify-content: center;
  margin-top: 1.15rem;
  animation: heroRevealItem 0.38s var(--ease-emil-out) 0.52s both;
}

.hero-byline-img {
  width: 100%;
  height: auto;
  display: block;
  filter: none !important;
}

/* ==========================================================================
   5. TARJETA DEL PÁRRAFO (Glass Tech con Mayor Presencia y Definición)
   ========================================================================== */
.hero-dark-box {
  position: relative !important;
  max-width: 760px !important;
  width: 100% !important;
  margin: 0 auto 2.2rem !important;
  padding: 2.3rem 2.8rem 2.5rem !important;
  background: linear-gradient(180deg, rgba(14, 22, 38, 0.72) 0%, rgba(9, 15, 26, 0.82) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 18px !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow: 
    0 25px 70px -15px rgba(0, 0, 0, 0.85),
    0 0 45px -10px rgba(79, 125, 243, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  overflow: hidden !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

/* Accent Line on Top Border (Acento #4F7DF3 -> Transparente con sutil glow) */
.hero-dark-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, var(--hero-accent) 50%, transparent 100%);
  opacity: 0.95;
  box-shadow: 0 0 10px rgba(79, 125, 243, 0.6);
}

.darkbox-text {
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif !important;
  font-size: 0.96rem !important;
  font-weight: 400 !important;
  color: #E2E8F0 !important;
  line-height: 1.65 !important;
  letter-spacing: -0.01em !important;
  text-align: center !important;
  max-width: 720px !important;
  margin: 0 auto 1.5rem !important;
}

.darkbox-text strong {
  color: #ffffff !important;
  font-weight: 650 !important;
  text-shadow: none !important;
}

/* ==========================================================================
   6. ETIQUETAS (CHIPS TECH)
   ========================================================================== */
.darkbox-tags {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.65rem !important;
  margin: 0 auto !important;
  padding: 0 !important;
  width: 100% !important;
}

.darkbox-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #CBD5E1 !important;
  background: rgba(255, 255, 255, 0.045) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-radius: 8px !important;
  padding: 0.4rem 0.95rem !important;
  letter-spacing: 0.02em !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  transition: border-color 180ms ease-out, color 180ms ease-out, background-color 180ms ease-out, transform 160ms ease-out, box-shadow 180ms ease-out !important;
  cursor: default;
  user-select: none;
}

.darkbox-tag .tag-prefix {
  color: var(--hero-accent);
  font-size: 10.5px;
  line-height: 1;
  opacity: 0.95;
  transition: opacity 180ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .darkbox-tag:hover {
    color: #ffffff !important;
    border-color: var(--hero-accent) !important;
    background: var(--hero-accent-glow) !important;
  }
  
  .darkbox-tag:hover .tag-prefix {
    opacity: 1;
  }
}

.darkbox-tag:active {
  transform: scale(0.97) !important;
}

/* ==========================================================================
   PRIMARY ACTION BUTTONS (HERO CTAS)
   ========================================================================== */
.hero-cta-group {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1.25rem !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  margin: 0 auto !important;
  pointer-events: auto !important;
  visibility: visible !important;
  animation: heroRevealItem 0.4s var(--ease-emil-out) 1.05s both !important;
}

.hero-cta-group .btn-bubble-reflective:active,
.hero-cta-group .btn-secondary-ghost:active {
  transform: scale(0.97) !important;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS (GPU Accelerated transforms & opacity only)
   ========================================================================== */
@keyframes heroRevealItem {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeInOnly {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ==========================================================================
   ACCESSIBILITY: PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero-badge,
  .hero-wordmark-wrap,
  .hero-byline-wrap,
  .hero-dark-box,
  .hero-cta-group {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  
  .conversia-prompt-symbol .prompt-cursor-bar {
    animation: none !important;
    opacity: 1 !important;
  }
  
  .hero-badge .ping-dot {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ==========================================================================
   RESPONSIVE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 860px) {
  .nav-pill {
    display: none !important;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .site-header {
    padding: 0.75rem 1rem !important;
    max-width: 100vw !important;
  }

  .header-container {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .hero-section {
    padding: 5rem 1rem 3rem;
    overflow-x: hidden;
  }
  
  .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 0 0.25rem;
    box-sizing: border-box;
  }

  .hero-badge {
    margin: 0.5rem auto 1.8rem !important;
    font-size: 0.7rem !important;
    padding: 0.34rem 0.9rem !important;
    max-width: 94vw;
    line-height: 1.4;
  }

  .conversia-hero-logo {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0;
    margin-bottom: 2rem !important;
  }

  .conversia-prompt-symbol {
    margin-left: 2px !important;
    margin-bottom: 0.35rem !important;
  }

  .hero-wordmark-wrap {
    width: 100% !important;
    max-width: min(92vw, 560px) !important;
  }

  .hero-wordmark-img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .hero-byline-wrap {
    width: 100% !important;
    max-width: min(58vw, 280px) !important;
    margin-top: 0.85rem !important;
  }

  .hero-byline-img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .hero-dark-box {
    padding: 1.6rem 1.2rem 1.8rem !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  .darkbox-text {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
    margin-bottom: 1.25rem !important;
  }

  .darkbox-tags {
    gap: 0.45rem !important;
  }

  .darkbox-tag {
    font-size: 11px !important;
    padding: 0.28rem 0.6rem !important;
  }

  .hero-cta-group {
    gap: 0.75rem !important;
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn-bubble-reflective,
  .hero-cta-group .btn-secondary-ghost {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}
