/* =====================================================
   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;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
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 {
  background: var(--brand); color: var(--white);
  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; }
}
