/* =========================================================
   GUIA — Capa editorial (inspirada en el lenguaje "darkroom")
   Se carga DESPUÉS de styles.css. Para volver al diseño anterior,
   basta con quitar el <link> a este archivo en index.html.

   Principios: lienzo oscuro único, tipografía en mayúsculas peso 500,
   texto de descripción en minúsculas peso 400, líneas punteadas como
   divisores, cero sombras, botones píldora y UN solo acento (cian).
   ========================================================= */

:root {
  --ed-bg: #050f22;
  --ed-surface: #0a1a35;
  --ed-cream: #eaf3fb;
  --ed-muted: rgba(234, 243, 251, 0.68);
  --ed-faint: rgba(234, 243, 251, 0.42);
  --ed-hair: rgba(234, 243, 251, 0.2);
  --ed-hair-soft: rgba(234, 243, 251, 0.1);
  --ed-accent: #38bdf8;

  /* Reasigna los tokens de superficie de la hoja base al lienzo oscuro */
  --paper: var(--ed-bg);
  --paper-2: var(--ed-bg);
  --muted: var(--ed-muted);
  --ink-3: var(--ed-cream);
  --line: var(--ed-hair-soft);
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --glow-shadow: none;
}

/* ---------- Base ---------- */

body {
  color: var(--ed-cream);
  background: var(--ed-bg);
}

p {
  color: var(--ed-muted);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
}

h1,
h2 {
  color: var(--ed-cream);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.9rem);
  line-height: 0.98;
}

h2 {
  max-width: 900px;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: 1.08;
}

h1,
.hero-copy h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.9rem);
}

.text-gradient {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--ed-accent);
}

.lead {
  color: var(--ed-muted);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.55;
}

/* Etiquetas (kicker): texto sobrio, sin píldora */
.kicker,
.kicker-light {
  padding: 0;
  color: var(--ed-accent);
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

/* ---------- Secciones: un lienzo, separadas por línea punteada ---------- */

section {
  padding-top: clamp(5.5rem, 11vw, 9rem);
  padding-bottom: clamp(5.5rem, 11vw, 9rem);
}

.hero {
  padding-bottom: 0;
  background: var(--ed-bg);
}

.transform-section,
.flow-section,
.product-section,
.app-section,
.security-section,
.roles-section,
.faq-section,
.final-cta {
  background: var(--ed-bg);
  border-top: 1px dashed var(--ed-hair);
}

.transform-section::before,
.flow-section::before,
.product-section::before,
.security-section::before,
.roles-section::before {
  display: none;
}

.hero-glow.glow-b,
.hero-grid {
  display: none;
}

.hero-glow.glow-a {
  opacity: 0.45;
}

.final-cta-glow {
  opacity: 0.4;
}

/* Encabezados de sección alineados a la izquierda */
.section-head {
  max-width: 1200px;
  margin: 0 auto 4.2rem;
  text-align: left;
}

.section-head h2,
.section-head p {
  margin-left: 0;
  margin-right: 0;
}

.section-head p {
  max-width: 560px;
}

/* ---------- Botones: píldora, sin sombras ---------- */

.cta-button {
  color: var(--ed-bg);
  background: var(--ed-cream);
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cta-button:hover {
  transform: none;
  filter: none;
  color: var(--ed-bg);
  background: var(--ed-accent);
  box-shadow: none;
}

.cta-large {
  min-height: 54px;
  font-size: 0.82rem;
}

.ghost-button,
.ghost-light {
  color: var(--ed-cream);
  background: transparent;
  border: 1px solid var(--ed-cream);
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ghost-button:hover,
.ghost-light:hover {
  transform: none;
  color: var(--ed-cream);
  background: rgba(234, 243, 251, 0.08);
  border-color: var(--ed-cream);
}

/* ---------- Encabezado y navegación ---------- */

.header-inner {
  background: rgba(5, 15, 34, 0.6);
  border: 1px dashed var(--ed-hair);
  box-shadow: none;
}

.main-nav a,
.ghost-link {
  color: var(--ed-cream);
  background: none;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav a:hover,
.ghost-link:hover {
  color: var(--ed-accent);
  background: none;
}

.main-nav a.nav-active {
  color: var(--ed-cream);
  background: none;
  box-shadow: inset 0 -1px 0 0 transparent;
  border-bottom: 1px dashed var(--ed-accent);
}

.mobile-nav {
  background: rgba(5, 15, 34, 0.94);
  border: 1px dashed var(--ed-hair);
  border-radius: 18px;
  box-shadow: none;
}

.mobile-nav a {
  color: var(--ed-cream);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-nav a.cta-button {
  color: var(--ed-bg);
}

.whatsapp-float {
  box-shadow: none;
}

.whatsapp-float:hover {
  transform: none;
  box-shadow: none;
}

.back-to-top {
  border: 1px dashed var(--ed-hair);
  box-shadow: none;
}

/* ---------- Móvil / táctil ---------- */

.bento-grid,
.bento-tile,
.bento-copy {
  min-width: 0;
}

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .bento-tile strong,
  .bento-tile p {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 640px) {
  .hero-login {
    min-height: 44px;
    align-items: center;
  }
  .action-row .cta-button,
  .action-row .ghost-button,
  .hero .cta-button,
  .hero .ghost-button {
    width: 100%;
    min-height: 52px;
  }
  .menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
  }
}

@media (hover: none) {
  /* feedback al tocar, ya que no hay hover */
  .cta-button:active,
  .ghost-button:active,
  .app-login:active,
  .cta-small:active,
  .whatsapp-float:active {
    transform: scale(0.96);
    transition: transform 0.12s ease;
  }
  .bento-tile:active,
  .role-card:active,
  .faq-item:active,
  .flow-step:active {
    border-color: var(--cyan, #38bdf8);
    background: rgba(56, 189, 248, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  html {
    -webkit-tap-highlight-color: rgba(56, 189, 248, 0.18);
  }
}

/* ---------- Hero ---------- */

.hero-inner {
  text-align: left;
}

.hero-copy {
  align-items: flex-start;
}

.action-row {
  justify-content: flex-start;
}

.product-frame {
  background: var(--ed-surface);
  border: 1px solid var(--ed-hair);
  box-shadow: none;
}

.device-glow {
  opacity: 0.35;
}

.glass-badge {
  background: rgba(10, 26, 53, 0.82);
  border: 1px dashed var(--ed-hair);
  border-radius: 12px;
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-badge span {
  color: var(--ed-cream);
  background: transparent;
  border: 1px solid var(--ed-hair);
  border-radius: 10px;
  font-weight: 500;
}

.glass-badge strong {
  color: var(--ed-cream);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.glass-badge small {
  color: var(--ed-faint);
}

.stats-strip {
  border-top: 1px dashed var(--ed-hair);
}

.stats-strip article {
  border-right: 1px dashed var(--ed-hair);
  text-align: left;
}

.stats-strip strong {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--ed-cream);
  font-weight: 500;
}

.stats-strip p {
  color: var(--ed-muted);
  font-size: 0.84rem;
}

/* ---------- Tarjetas: superficie tenue, borde punteado, sin sombra ---------- */

.chaos-panel,
.clarity-panel,
.flow-step,
.bento-tile,
.security-feature-list article,
.role-card,
.mid-cta,
.lead-card,
.store-badge,
.store-badge-live,
.ordered-dashboard {
  background: rgba(234, 243, 251, 0.03);
  border: 1px dashed var(--ed-hair);
  border-radius: 12px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chaos-panel,
.clarity-panel {
  background: rgba(234, 243, 251, 0.03);
}

.chaos-panel::before,
.clarity-panel::before,
.role-card::before,
.security-feature-list article::before {
  display: none;
}

.flow-step:hover,
.bento-tile:hover,
.security-feature-list article:hover,
.role-card:hover,
.store-badge-live:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--ed-accent);
}

.bento-tile.bento-large,
.bento-tile.bento-large:hover {
  background: var(--ed-surface);
  border: 1px solid var(--ed-hair);
  box-shadow: none;
}

.security-hero-card {
  background: var(--ed-surface);
  border: 1px solid var(--ed-hair);
  border-radius: 12px;
  box-shadow: none;
}

.security-hero-card::after {
  opacity: 0.45;
}

.flow-device {
  background: var(--ed-surface);
  border: 1px solid var(--ed-hair);
  box-shadow: none;
}

.app-phone {
  box-shadow: none;
  border-color: var(--ed-surface);
}

/* Iconos: contorno, sin relleno degradado */
.step-icon,
.bento-icon,
.feature-icon,
.role-icon {
  color: var(--ed-cream);
  background: transparent;
  border: 1px solid var(--ed-hair);
  border-radius: 12px;
  box-shadow: none;
}

.flow-step:hover .step-icon,
.bento-tile:hover .bento-icon,
.security-feature-list article:hover .feature-icon,
.role-card:hover .role-icon {
  transform: none;
  border-color: var(--ed-accent);
  color: var(--ed-accent);
}

.step-index {
  color: rgba(234, 243, 251, 0.09);
  font-weight: 500;
}

/* Títulos de tarjeta: mayúsculas 500; descripciones normales */
.flow-step strong,
.bento-tile strong,
.security-feature-list strong,
.role-tag,
.store-badge strong,
.engine-card strong {
  color: var(--ed-cream);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.bento-copy strong {
  font-size: 1.25rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.security-hero-card strong {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0;
}

.flow-step p,
.bento-tile p,
.security-feature-list p,
.role-card p {
  color: var(--ed-muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

/* Transformación */
.panel-label {
  padding: 0;
  background: none !important;
  border-radius: 0;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.panel-watermark {
  opacity: 0.05;
}

.messy-files i {
  color: var(--ed-cream);
  background: transparent;
  border: 1px dashed var(--ed-hair);
  border-radius: 8px;
  box-shadow: none;
  font-weight: 500;
  transform: none;
}

.messy-files i:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--ed-accent);
}

.engine-line {
  background: repeating-linear-gradient(90deg, var(--ed-accent) 0 8px, transparent 8px 16px);
}

.engine-card {
  background: var(--ed-surface);
  border: 1px solid var(--ed-accent);
  border-radius: 12px;
  box-shadow: none;
  animation: none;
}

.engine-card span {
  color: var(--ed-accent);
  font-weight: 500;
}

.ordered-top span,
.ordered-kpis span {
  color: var(--ed-faint);
}

.ordered-top strong,
.ordered-kpis strong {
  color: var(--ed-cream);
  font-weight: 500;
}

.ordered-kpis article,
.ordered-table p {
  background: transparent;
  border: 1px dashed var(--ed-hair-soft);
  border-radius: 8px;
}

.ordered-table span {
  color: var(--ed-cream);
  font-weight: 500;
}

/* Última tarjeta del bento: fila completa en cuadrícula limpia */
.bento-tile:last-child {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 1.2rem;
  row-gap: 0.25rem;
}

.bento-tile:last-child .bento-icon {
  grid-row: 1 / span 2;
}

.bento-tile:last-child strong {
  align-self: end;
  margin: 0;
}

.bento-tile:last-child p {
  align-self: start;
}

/* Barras animadas: planas, sin degradado brillante */
.live-bars span::after,
.live-bars i::after,
.live-bars em::after {
  background: var(--ed-accent);
  opacity: 0.8;
}

.live-bars span,
.live-bars i,
.live-bars em {
  background: rgba(234, 243, 251, 0.08);
}

/* Cierre del producto */
.mid-cta p {
  color: var(--ed-cream);
}

/* FAQ: lista con líneas punteadas */
.faq-item {
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--ed-hair);
  border-radius: 0;
  box-shadow: none;
}

.faq-item:hover {
  border-color: var(--ed-accent);
}

.faq-item summary {
  padding: 1.5rem 0.2rem;
  color: var(--ed-cream);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.faq-chevron {
  color: var(--ed-cream);
}

.faq-item p {
  margin: 0 0.2rem 1.6rem;
  color: var(--ed-muted);
  font-size: 1rem;
}

.faq-item p a {
  color: var(--ed-accent);
}

.faq-list {
  margin: 0;
  max-width: 900px;
}

/* ---------- Formulario: solo línea inferior ---------- */

.lead-card {
  padding: 2rem;
}

.premium-logo-orb {
  background: rgba(234, 243, 251, 0.92);
  border-radius: 12px;
  box-shadow: none;
}

.lead-card-head span,
.field label {
  color: var(--ed-faint);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-card-head strong {
  color: var(--ed-cream);
  font-weight: 500;
}

.field label small {
  color: var(--ed-faint);
  font-weight: 400;
}

.field input,
.field textarea {
  padding: 0.55rem 0.1rem;
  color: var(--ed-cream);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ed-hair);
  border-radius: 0;
}

.field input:focus,
.field textarea:focus {
  background: transparent;
  border-bottom-color: var(--ed-accent);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ed-faint);
}

.lead-direct {
  border-top: 1px dashed var(--ed-hair);
}

.lead-direct a {
  color: var(--ed-accent);
  font-weight: 500;
}

.cta-checklist li {
  color: var(--ed-cream);
  font-weight: 500;
}

/* ---------- Pie ---------- */

.site-footer {
  background: var(--ed-bg);
  border-top: 1px dashed var(--ed-hair);
}

.footer-links a {
  color: var(--ed-cream);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: var(--ed-accent);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-inner,
  .hero-copy {
    text-align: left;
  }

  .hero-copy {
    align-items: flex-start;
  }

  .stats-strip article {
    border-bottom: 1px dashed var(--ed-hair);
  }
}

@media (max-width: 640px) {
  h2 {
    font-size: clamp(1.8rem, 8.2vw, 2.4rem);
  }

  .section-head {
    margin-bottom: 3rem;
  }
}

/* =========================================================
   Acceso directo a la app
   ========================================================= */

.header-actions {
  justify-self: end;
}

.app-login {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0 1rem;
  color: var(--ed-cream);
  border: 1px solid var(--ed-cream);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.app-login .icn {
  width: 16px;
  height: 16px;
}

.app-login {
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}

.app-login:hover {
  color: var(--ed-bg);
  background: var(--ed-cream);
}

@media (max-width: 520px) {
  .app-login-long {
    display: none;
  }

  .app-login {
    padding: 0 0.85rem;
  }
}

.hero-login {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--ed-hair);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-login span {
  color: var(--ed-faint);
  font-weight: 500;
}

.hero-login strong {
  color: var(--ed-cream);
  font-weight: 500;
  border-bottom: 1px dashed var(--ed-hair);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.hero-login i {
  display: inline-block;
  font-style: normal;
  transition: transform 0.3s var(--ease);
}

.hero-login:hover strong {
  color: var(--ed-accent);
  border-color: var(--ed-accent);
}

.hero-login:hover i {
  transform: translateX(4px);
}

/* =========================================================
   Movimiento (se desactiva con prefers-reduced-motion)
   ========================================================= */

@property --ring {
  syntax: "<angle>";
  inherits: false;
  initial-value: 252deg;
}

/* Titulares: cada palabra sube desde una máscara */
.split-ready .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-top: 0.2em;
  margin-top: -0.2em;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.split-ready .wi {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.95s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
  will-change: transform;
}

.split-ready.split-in .wi {
  transform: none;
}

/* Resplandor que sigue al cursor dentro de las tarjetas */
.spot {
  position: relative;
}

.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    300px circle at var(--mx, 50%) var(--my, 50%),
    rgba(56, 189, 248, 0.17),
    transparent 65%
  );
  transition: opacity 0.35s ease;
}

.spot:hover::after {
  opacity: 1;
}

/* Tablero del hero: se dibuja al cargar */
.score-orb {
  background: conic-gradient(
    from -90deg,
    var(--ed-accent) 0deg var(--ring),
    rgba(234, 243, 251, 0.12) var(--ring) 360deg
  );
  box-shadow: none;
  animation: ring-fill 1.8s var(--ease) 0.5s both;
}

@keyframes ring-fill {
  from { --ring: 0deg; }
  to { --ring: 252deg; }
}

.dash-bar::after {
  animation: bar-grow 1.3s var(--ease) both;
  animation-delay: calc(0.7s + var(--k, 0) * 0.15s);
}

.dash-row:nth-child(2) { --k: 1; }
.dash-row:nth-child(3) { --k: 2; }

@keyframes bar-grow {
  from { width: 0; }
}

.dash-trend svg path:first-of-type {
  animation: area-in 1.4s ease 1.4s both;
}

@keyframes area-in {
  from { opacity: 0; }
}

.spark-line {
  stroke-dasharray: var(--len, 600);
  stroke-dashoffset: var(--len, 600);
  animation: spark-draw 2.2s var(--ease) 0.9s forwards;
}

@keyframes spark-draw {
  to { stroke-dashoffset: 0; }
}

/* Latido suave en el punto "en vivo" y en la etiqueta de la tarjeta de transformación */
.engine-card {
  animation: engine-breathe 3.2s ease-in-out infinite;
}

@keyframes engine-breathe {
  0%, 100% { border-color: rgba(56, 189, 248, 0.35); }
  50% { border-color: rgba(56, 189, 248, 1); }
}

/* Línea punteada de la transformación: viaja de izquierda a derecha */
.engine-line {
  background-size: 16px 2px;
  animation: dash-flow 1.1s linear infinite;
}

@keyframes dash-flow {
  to { background-position: 16px 0; }
}

/* Entrada de las tarjetas con un ligero desenfoque */
.reveal {
  filter: blur(6px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.in-view {
  filter: none;
}

/* El tablero oscilante del hero respira */
.hero-visual .product-frame {
  animation: frame-float 7s ease-in-out infinite;
}

@keyframes frame-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@media (prefers-reduced-motion: reduce) {
  .split-ready .wi {
    transform: none;
    transition: none;
  }

  .score-orb,
  .dash-bar::after,
  .dash-trend svg path:first-of-type,
  .engine-card,
  .engine-line,
  .hero-visual .product-frame {
    animation: none;
  }

  .spark-line {
    stroke-dashoffset: 0;
    animation: none;
  }

  .reveal {
    filter: none;
  }
}

/* Logo a color sobre fondo oscuro (sin silueta plana) */
.brand img {
  filter: none;
  opacity: 1;
  height: 34px;
  width: auto;
}
@media (max-width: 520px) {
  .brand img { height: 28px; }
}

/* Encabezado escritorio: el logo nunca se comprime */
.brand {
  flex: none;
  min-width: max-content;
}
.brand img {
  flex: none;
  min-width: 88px;
  aspect-ratio: 1021 / 395;
  object-fit: contain;
}
.header-inner {
  gap: 1rem;
}
.cta-small,
.app-login {
  white-space: nowrap;
}
@media (max-width: 520px) {
  .brand img { min-width: 72px; }
}
