/* ===== PEKE CLUB · Sistema de diseño ===== */
:root {
  --bg: #fffaf3;
  --bg-2: #fff3e4;
  --surface: #ffffff;
  --ink: #1f2544;
  --muted: #5f6480;
  --line: #f0e4d2;
  --coral: #ff6b4a;
  --coral-d: #e8512f;
  --sun: #ffc43d;
  --teal: #10a5a0;
  --grape: #7c5cff;
  --sky: #3aa0ff;
  --leaf: #2fb35a;
  --pink: #ff5c9a;
  --on-color: #ffffff;
  --shadow: 0 10px 30px -12px rgba(31, 37, 68, .22);
  --shadow-s: 0 3px 10px -4px rgba(31, 37, 68, .18);
  --r: 22px;
  --r-s: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15172a; --bg-2: #1c1f37; --surface: #222644; --ink: #f3f2ff; --muted: #b3b5cf; --line: #33375a;
    --coral: #ff7d5e; --coral-d: #ff6b4a; --sun: #ffd166; --teal: #2cc9c3; --grape: #9c85ff; --sky: #63b6ff; --leaf: #4fd27a; --pink: #ff7bb0;
    --shadow: 0 10px 30px -12px rgba(0,0,0,.6); --shadow-s: 0 3px 10px -4px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg: #15172a; --bg-2: #1c1f37; --surface: #222644; --ink: #f3f2ff; --muted: #b3b5cf; --line: #33375a;
  --coral: #ff7d5e; --coral-d: #ff6b4a; --sun: #ffd166; --teal: #2cc9c3; --grape: #9c85ff; --sky: #63b6ff; --leaf: #4fd27a; --pink: #ff7bb0;
  --shadow: 0 10px 30px -12px rgba(0,0,0,.6); --shadow-s: 0 3px 10px -4px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: "Baloo 2", "Nunito", system-ui, sans-serif; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
a { color: var(--coral-d); }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== Navegación ===== */
.nav {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 12px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-logo {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(135deg, var(--sun), var(--coral)); box-shadow: var(--shadow-s);
}
.brand b { font-family: "Baloo 2", sans-serif; font-size: 24px; font-weight: 800; }
.brand b span { color: var(--coral); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  text-decoration: none; color: var(--ink); font-weight: 800; padding: 9px 13px; border-radius: 12px; font-size: 15px;
}
.nav-links a:hover { background: var(--bg-2); }
.nav-links a.activo { background: var(--bg-2); color: var(--coral-d); }
.nav-links a.cta { background: var(--coral); color: var(--on-color); }
.nav-links a.cta:hover { background: var(--coral-d); }
.icon-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 40px; height: 40px;
  border-radius: 12px; cursor: pointer; font-size: 18px; display: grid; place-items: center;
}
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  #peke-tema { margin-left: auto; }
  .hero-art { max-width: 300px; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 10px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.abierto .nav-links { display: flex; }
  .nav-links a { padding: 12px 14px; }
}

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 800;
  padding: 13px 22px; border-radius: 16px; border: 0; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-1 { background: var(--coral); color: var(--on-color); box-shadow: 0 8px 20px -8px var(--coral); }
.btn-1:hover { background: var(--coral-d); }
.btn-2 { background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.btn-3 { background: var(--teal); color: var(--on-color); }
.btn-s { padding: 9px 14px; border-radius: 12px; font-size: 15px; }

/* ===== Secciones ===== */
.sec { padding: 64px 0; }
.sec-alt { background: var(--bg-2); }
.sec-head { max-width: 720px; margin-bottom: 30px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { display: inline-block; font-weight: 900; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--coral-d); margin-bottom: 8px; }
.sec-head h2 { font-size: clamp(30px, 4.5vw, 44px); }
.sec-head p { color: var(--muted); font-size: 18px; margin: 10px 0 0; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 56px 0 70px; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(4px); opacity: .55; z-index: -1;
}
.hero::before { width: 520px; height: 520px; background: radial-gradient(circle, var(--sun), transparent 65%); top: -160px; right: -120px; }
.hero::after { width: 420px; height: 420px; background: radial-gradient(circle, color-mix(in srgb, var(--teal) 55%, transparent), transparent 65%); bottom: -200px; left: -140px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(40px, 7vw, 70px); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero .lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); margin: 18px 0 26px; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.pill { background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; }

.hero-art {
  position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin: 0 auto;
}
.hero-art .burbuja {
  position: absolute; display: grid; place-items: center; border-radius: 30px; box-shadow: var(--shadow);
  font-size: clamp(40px, 7vw, 64px); animation: flotar 6s ease-in-out infinite;
}
.hero-art .b1 { inset: 8% 30% 42% 8%; background: var(--sun); border-radius: 40% 60% 55% 45%; font-size: clamp(70px, 12vw, 120px); }
.hero-art .b2 { width: 34%; aspect-ratio: 1; right: 4%; top: 10%; background: var(--teal); animation-delay: -2s; }
.hero-art .b3 { width: 30%; aspect-ratio: 1; right: 12%; bottom: 10%; background: var(--grape); animation-delay: -4s; }
.hero-art .b4 { width: 26%; aspect-ratio: 1; left: 10%; bottom: 6%; background: var(--pink); animation-delay: -1s; }
@keyframes flotar { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-art .burbuja { animation: none; } }

/* ===== Tarjetas ===== */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px;
  box-shadow: var(--shadow-s); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px;
  transition: transform .18s ease, box-shadow .18s ease;
}
a.card:hover, button.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 22px; }
.card p { margin: 0; color: var(--muted); flex: 1; }
.card .ico {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 30px;
  background: var(--c, var(--sun));
}
.card .mas { font-weight: 900; color: var(--coral-d); }
.card-grande { padding: 30px; }
.card-grande h3 { font-size: 28px; }
.tag { display: inline-block; font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== Reto diario / mochila ===== */
.reto {
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
  background: linear-gradient(120deg, var(--grape), var(--sky)); color: #fff; border-radius: var(--r); padding: 26px;
  box-shadow: var(--shadow);
}
.reto .big { font-size: 60px; }
.reto h3 { font-size: 28px; color: #fff; }
.reto p { margin: 4px 0 0; opacity: .92; }
.reto .btn { background: #fff; color: var(--grape); }
@media (max-width: 700px) { .reto { grid-template-columns: 1fr; text-align: center; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 16px; text-align: center; }
.stat b { display: block; font-family: "Baloo 2", sans-serif; font-size: 36px; line-height: 1; color: var(--coral-d); }
.stat span { color: var(--muted); font-weight: 700; font-size: 14px; }

.medallas { display: flex; flex-wrap: wrap; gap: 12px; }
.medalla {
  width: 92px; text-align: center; font-size: 12px; font-weight: 800; color: var(--muted);
}
.medalla i {
  display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 6px; border-radius: 50%;
  font-style: normal; font-size: 36px; background: var(--bg-2); border: 3px dashed var(--line); filter: grayscale(1); opacity: .45;
}
.medalla.ok i { filter: none; opacity: 1; border: 3px solid var(--sun); background: color-mix(in srgb, var(--sun) 25%, var(--surface)); }
.medalla.ok { color: var(--ink); }

/* ===== Paso a paso ===== */
.pasos { counter-reset: p; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.paso { position: relative; padding: 24px 22px 22px 22px; background: var(--surface); border-radius: var(--r); border: 1px solid var(--line); }
.paso::before {
  counter-increment: p; content: counter(p); position: absolute; top: -16px; left: 20px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--coral); color: #fff; font-weight: 900;
}
.paso h3 { font-size: 21px; margin-top: 8px; }
.paso p { color: var(--muted); margin: 6px 0 0; }

/* ===== Banda de apoyo ===== */
.apoyo-band {
  background: linear-gradient(120deg, var(--coral), var(--pink)); color: #fff; border-radius: 28px; padding: 40px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: center; box-shadow: var(--shadow);
}
.apoyo-band h2 { font-size: clamp(30px, 4vw, 42px); color: #fff; }
.apoyo-band p { opacity: .95; font-size: 18px; }
.apoyo-band .btn-1 { background: #fff; color: var(--coral-d); box-shadow: none; }
.apoyo-band .btn-2 { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
@media (max-width: 800px) { .apoyo-band { grid-template-columns: 1fr; padding: 28px 22px; } }

/* ===== Formularios ===== */
.form { display: grid; gap: 14px; }
.form label { font-weight: 800; font-size: 15px; display: grid; gap: 6px; }
.form input, .form select, .form textarea, .campo {
  font: inherit; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); width: 100%;
}
.form textarea { min-height: 110px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus, .campo:focus { outline: none; border-color: var(--coral); }
.fila { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.aviso { padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font-weight: 700; }
.aviso.ok { background: color-mix(in srgb, var(--leaf) 18%, var(--surface)); border-color: var(--leaf); }

/* ===== Herramientas (paneles) ===== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow-s); }
.page-head { padding: 40px 0 10px; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); }
.page-head p { color: var(--muted); font-size: 18px; margin: 8px 0 0; max-width: 720px; }
.migas { font-weight: 800; font-size: 14px; margin-bottom: 10px; display: inline-block; text-decoration: none; }
.tabla { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabla th, .tabla td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
.tabla th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.scroll-x { overflow-x: auto; }

/* Iframes de simulaciones */
.visor { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #000; }
.visor iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ===== Footer ===== */
.footer { background: var(--ink); color: #d9dbef; padding: 48px 0 26px; margin-top: 40px; }
:root[data-theme="dark"] .footer { background: #0e1020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .footer { background: #0e1020; } }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { color: #fff; margin: 0 0 10px; font-family: "Baloo 2", sans-serif; font-size: 19px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer .legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 18px; font-size: 14px; opacity: .8; }

/* Botón flotante WhatsApp */
.flotante {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff; font-size: 30px; text-decoration: none; box-shadow: var(--shadow);
}

/* Impresión */
@media print {
  .nav, .footer, .flotante, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 13px; }
  .panel { box-shadow: none; border: 0; padding: 0; }
}
