/* =====================================================
   Piofly — Base: Design Tokens + Reset + Typography
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* ── Design Tokens ──────────────────────────────────── */
:root {
  /* Brand colors — Piofly orange es el primary actual.
     El azul se mantiene como color secundario/accent complementario. */
  --brand:          #FF8A00;
  --brand-mid:      #E67A00;
  --brand-light:    #FFA333;

  --primary:        #008FC8;
  --primary-mid:    #007AAD;
  --primary-light:  #1AAAD9;
  --primary-dark:   #005E8A;

  /* Slate / Dark surfaces — coinciden con auth + dashboard */
  --slate-bg:       #0F172A;
  --slate-surface:  #1A2233;
  --slate-elev:     #1F2937;
  --slate-line:     rgba(255,255,255,0.08);

  /* Gold = brand orange (alias por compatibilidad histórica) */
  --gold:           #FF8A00;
  --gold-dark:      #E67A00;
  --gold-light:     #FFA333;
  --gold-xlight:    #FFF4E0;
  --gold-bright:    #FF8A00;
  --gold-deep:      #C7A020;

  /* Neutrals */
  --white:          #ffffff;
  --off-white:      #F4F9FF;
  --light:          #E8F4FF;
  --light-gray:     #F1F5F9;
  --border:         #E2E8F0;

  /* Semantic */
  --green:          #28A745;
  --green-bg:       #F0FFF4;
  --yellow:         #FFC107;
  --red:            #DC3545;

  /* Text */
  --text:           #0F172A;
  --text-mid:       #334155;
  --text-muted:     #64748B;
  --text-light:     #94A3B8;

  /* Layout */
  --max-width:      1200px;

  /* Radii */
  --r-sm:    8px;
  --r-md:    12px;
  --r-lg:    16px;
  --r-xl:    24px;
  --r-2xl:   32px;
  --r-full:  9999px;

  /* Shadows */
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 24px rgba(0,0,0,0.12);
  --shadow-gold: 0 4px 16px rgba(255, 138, 0,0.35);
  --shadow-blue: 0 4px 16px rgba(0,143,200,0.3);

  /* Transition */
  --transition: 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════════════
   MODO OSCURO — Edgar 2026-08-05
   ═══════════════════════════════════════════════════════════════════
   El landing no tenía modo oscuro: cero `data-theme` en sus seis CSS.
   El producto sí, y app y dashboard comparten los mismos neutros al
   byte. Entrabas a piofly.com en blanco, iniciabas sesión y caías en
   #0F0F11 — un salto que hacía sentir dos productos distintos.

   Estos son los MISMOS valores de app/src/ui/estilos/tokens.css y de
   dashboard/css/global.css. No se inventa ninguno: si algún día se
   ajustan allá, se ajustan aquí igual.

   OJO — ESTO SOLO NO BASTA. landing.css tiene 384 colores en hex y 433
   en rgba escritos a mano (más de la mitad del color del archivo). Este
   bloque voltea únicamente lo que ya usa var(). Lo que quede claro al
   encenderlo es exactamente lo que falta tokenizar — es el termómetro
   de esa limpieza, no su sustituto.
   ═══════════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  /* Superficies — idénticas a la app */
  --slate-bg:      #0F0F11;
  --slate-surface: #16161A;
  --slate-elev:    #26262C;
  --slate-line:    rgba(255,255,255,0.10);

  /* Los alias claros del landing apuntan ahora a superficies oscuras.
     Así, cada regla que ya decía var(--white) o var(--off-white) cambia
     sola, sin tocarla. */
  --white:      #16161A;   /* era el papel; ahora es el panel */
  --off-white:  #0F0F11;   /* era el gris de fondo; ahora el lienzo */
  --light:      #26262C;
  --light-gray: #26262C;
  --border:     rgba(255,255,255,0.10);

  /* Texto — los tres escalones de la app. La separación entre principal
     y suave es lo que da jerarquía; sin ella todo "grita" por igual y
     se lee como amateur (ver la nota larga en global.css). */
  --text:       #F4F4F6;   /* 17.43:1 */
  --text-mid:   #A0A0AC;   /*  7.40:1 */
  --text-muted: #80808A;   /*  4.90:1 — el último que pasa AA en texto normal */
  --text-light: #6E6E78;   /*  3.80:1 — NO pasa AA normal. Solo decorativo o
                                texto grande (18px+ o 14px en negrita). Si algo
                                que hay que leer sale con este token, está mal. */

  /* El naranja NO cambia: es la marca y sobre negro funciona mejor. */

  /* El azul deja de pintar superficies y queda solo para enlaces.
     Se aclara por comodidad, no por accesibilidad: medido, #008FC8
     sobre #0F0F11 da 5.25:1 y SÍ pasa AA. #35B4E8 da 8.06:1, que es
     el mismo rango que el naranja de marca (8.10:1) — así los dos
     colores vivos de la página pesan igual y ninguno se hunde. */
  --primary:      #35B4E8;
  --primary-mid:  #1AAAD9;
  --primary-light:#5FC7EF;
  --primary-dark: #008FC8;

  /* Sombras: sobre negro una sombra negra no se ve. Se sustituye por
     un borde de luz, que es como separan planos la app y el dashboard. */
  --shadow-sm:   0 0 0 1px rgba(255,255,255,0.05);
  --shadow-md:   0 2px 12px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.05);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* El atributo hidden gana SIEMPRE — Edgar 2026-08-05.
   La regla del navegador es [hidden]{display:none}, de especificidad de
   elemento: cualquier `.mi-clase { display: flex }` nuestra le gana y el
   elemento sigue visible con el atributo puesto. Por eso landing.css
   acabó escribiendo .genc-chips[hidden] y .genc-gps[hidden] a mano.
   Se arregla una vez aquí; el gemelo está en dashboard/css/global.css. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}
body {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Edgar 2026-06-30: overscroll-behavior solo en mobile, NO en desktop —
   en desktop con ruedita del mouse causaba que el scroll no respondiera
   correctamente. Mobile lo necesita para bloquear rubber-band iOS. */
@media (max-width: 760px) {
  html, body {
    overscroll-behavior: none;
  }
}

/* Títulos grandes — Nunito ExtraBold */
h1, h2, h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h4, h5, h6 {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Dinero / números importantes */
.font-money {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
}

/* Elementos gamificados — Nunito Bold */
.font-game {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
}
a { text-decoration: none; color: inherit; }
/* Edgar 2026-06-30: bloquear drag de imágenes — cuando el cursor
   está sobre una <img>, los browsers permiten drag&drop. Eso
   intercepta el wheel event en Chrome/Edge y bloquea el scroll
   vertical de la página. Hacemos las imágenes NO arrastrables. */
img {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ── Container ──────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Typography ─────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.2; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p  { color: var(--text-muted); line-height: 1.75; }

.text-gold    { color: var(--gold); }
.text-primary { color: var(--primary); }
.text-white   { color: var(--white); }

.section-label {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 12px;
}
.section-label::before,
.section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 700;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition); cursor: pointer;
}
.btn-gold {
  /* Edgar 2026-08-05: era var(--white) y daba 2.36:1 sobre el naranja —
     AA pide 4.5 para texto normal. Este es el botón que cobra ("Crear mi
     cuenta gratis") y estaba por debajo del mínimo legible: sobre un
     naranja claro, el blanco se lava.
     #1A1206 da 7.84:1 y ya se usa en las burbujas del chat de Pío, así
     que no introduce un color nuevo. Una línea, arregla los cuatro
     botones dorados de la página de golpe. */
  background: var(--brand); color: #1A1206;
  box-shadow: 0 6px 18px rgba(255, 138, 0, 0.32);
}
.btn-gold:hover { background: var(--brand-mid); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255, 138, 0, 0.45); }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-mid); transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: white; }

.btn-outline-dark {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-outline-dark:hover { border-color: var(--primary); background: rgba(0,143,200,0.05); }

.btn-lg { padding: 16px 40px; font-size: 17px; border-radius: var(--r-lg); font-weight: 800; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--r-sm); }

/* ── Badges / Tags ───────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 700;
}
.badge-gold    { background: rgba(255, 138, 0,0.14); color: var(--gold); border: 1px solid rgba(255, 138, 0,0.3); }
.badge-green   { background: rgba(40,167,69,0.12); color: var(--green); }
.badge-yellow  { background: rgba(255,193,7,0.14); color: #B45309; }
.badge-red     { background: rgba(220,53,69,0.12); color: var(--red); }
.badge-blue    { background: rgba(0,143,200,0.12); color: var(--primary); }
.badge-gray    { background: var(--light-gray); color: var(--text-muted); }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--r-xl);
  padding: 24px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── Progress Bar ────────────────────────────────────── */
.progress-bar {
  height: 6px; background: var(--light-gray);
  border-radius: var(--r-full); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: var(--r-full);
  transition: width 0.5s ease;
}

/* ── Section base ────────────────────────────────────── */
.section       { padding: 80px 0; }
.section-dark  { background: var(--primary); }
.section-light { background: var(--light); }
.section-white { background: var(--white); }
.section-header        { margin-bottom: 48px; }
.section-header h2     { margin-bottom: 12px; }

/* ── Grid helpers ────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── FZ Points ───────────────────────────────────────── */
.fz-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 138, 0,0.13); border: 1px solid rgba(255, 138, 0,0.4);
  border-radius: var(--r-full); padding: 4px 12px;
  font-size: 12px; font-weight: 800; color: var(--gold);
}
.coins-balance {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, rgba(255, 138, 0,0.12), rgba(255, 138, 0,0.06));
  border: 1px solid rgba(255, 138, 0,0.3);
  border-radius: var(--r-md); padding: 10px 16px;
  font-size: 15px; font-weight: 800; color: var(--gold);
}
.coins-earn-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.coins-earn-table th { text-align: left; padding: 8px 12px; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; border-bottom: 1px solid var(--border); }
.coins-earn-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-mid); }
.coins-earn-table td:last-child { text-align: right; font-weight: 800; color: var(--gold); }
.coins-earn-table tr:last-child td { border-bottom: none; }

/* ── Level / Title badge ─────────────────────────────── */
.level-title-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-full);
  background: rgba(255, 138, 0,0.15); color: var(--gold);
  font-size: 11px; font-weight: 800; border: 1px solid rgba(255, 138, 0,0.3);
}

/* ── Toast / Notification ────────────────────────────── */
.mf-toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: #1A2340; color: white; border-radius: var(--r-lg);
  padding: 12px 20px; font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-lg); z-index: 900;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}
.mf-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ── Responsive base ─────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 28px; }
  .section   { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  h1 { font-size: clamp(1.6rem, 7vw, 2rem); }
  h2 { font-size: clamp(1.25rem, 5vw, 1.5rem); }
  .btn-lg { padding: 14px 28px; font-size: 15px; }
}
