/* ==========================================================================
   Quiz Rodeo · sitio público (quiz.rodeo)
   Paleta tomada de las apps: azul marino, azul de marca y amarillo.
   ========================================================================== */

:root {
    --navy: #0d3b66;
    --blue: #1d6cba;
    --sky: #54c1ff;
    --yellow: #f9c74f;
    --coral: #ff6b35;
    --green: #2e9e4f;

    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-2: #eef3fb;
    --text: #0f1f33;
    --muted: #5b6b80;
    --line: #e1e8f2;
    --shadow: 0 10px 30px rgba(13, 59, 102, .10);
    --shadow-lg: 0 24px 60px rgba(13, 59, 102, .18);

    --radius: 18px;
    --radius-sm: 12px;
    --max: 1160px;
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1422;
        --surface: #111d2f;
        --surface-2: #16253b;
        --text: #e8eef7;
        --muted: #9fb0c6;
        --line: #22344d;
        --shadow: 0 10px 30px rgba(0, 0, 0, .35);
        --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
    }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent);
    padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
}
.lead { font-size: 1.15rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------ Botones ------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: inherit; font-weight: 700; font-size: .98rem; line-height: 1;
    padding: 14px 22px; border-radius: 999px; border: 2px solid transparent;
    cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-decoration: none !important; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--sky)); color: #fff; box-shadow: 0 10px 24px rgba(29, 108, 186, .35); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-white { background: #fff; color: var(--navy); }
.btn-sm { padding: 10px 16px; font-size: .9rem; }
.btn-danger { background: var(--coral); color: #fff; }

/* ------------------------------ Encabezado ------------------------------ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.15rem; text-decoration: none !important; }
.brand img { width: 38px; height: 38px; }
.brand small { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a:not(.btn) { color: var(--text); font-weight: 600; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.nav-links a:not(.btn):hover { background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--blue); }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--text); cursor: pointer; }
.menu-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
    .menu-toggle { display: inline-flex; }
    .nav-links {
        position: absolute; left: 16px; right: 16px; top: 72px; flex-direction: column; align-items: stretch;
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px;
        box-shadow: var(--shadow-lg); display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links .btn { margin-top: 6px; }
}

/* ------------------------------ Hero ------------------------------ */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); }
.hero::before {
    content: ""; position: absolute; inset: -30% -10% auto 40%; height: 720px; z-index: -1;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--sky) 35%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 .accent { background: linear-gradient(135deg, var(--blue), var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; }
.stat strong { display: block; font-size: 1.7rem; font-weight: 800; color: var(--navy); }
.stat span { color: var(--muted); font-size: .92rem; }
@media (prefers-color-scheme: dark) { .stat strong { color: #fff; } }

/* Teléfono ilustrado */
.phone-wrap { position: relative; display: grid; place-items: center; min-height: 520px; }
.phone {
    width: 270px; height: 540px; border-radius: 40px; padding: 12px; background: #0b1422;
    box-shadow: var(--shadow-lg), inset 0 0 0 2px #26374f;
}
.phone-screen { height: 100%; border-radius: 30px; overflow: hidden; background: #f3f5f9; display: flex; flex-direction: column; }
.ps-head { background: linear-gradient(135deg, var(--blue), var(--sky)); color: #fff; padding: 22px 16px 16px; border-radius: 0 0 22px 22px; }
.ps-head b { font-size: .95rem; }
.ps-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.ps-chips span { background: rgba(255, 255, 255, .22); border-radius: 12px; padding: 6px 4px; text-align: center; font-size: .7rem; line-height: 1.3; }
.ps-chips strong { display: block; font-size: .9rem; }
.ps-card { margin: 10px 12px 0; background: #fff; border-radius: 16px; padding: 12px; display: flex; gap: 10px; align-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .05); color: #0f1f33; }
.ps-card .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.ps-card b { font-size: .85rem; display: block; }
.ps-bar { height: 6px; border-radius: 6px; background: #e3e8f0; margin-top: 6px; overflow: hidden; }
.ps-bar i { display: block; height: 100%; background: #3ecf6e; border-radius: 6px; }
.float {
    position: absolute; background: var(--surface); color: var(--text); border: 1px solid var(--line);
    border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); font-weight: 700; font-size: .9rem;
    display: flex; align-items: center; gap: 8px; animation: bob 5s ease-in-out infinite;
}
.float small { display: block; font-weight: 600; color: var(--muted); font-size: .72rem; }
.float.f1 { top: 250px; left: -8px; }
.float.f2 { bottom: 90px; right: -6px; animation-delay: -2s; }
.float.f3 { bottom: 20px; left: 14px; animation-delay: -3.5s; }
.float .big { font-size: 1.5rem; }
@keyframes bob { 50% { transform: translateY(-10px); } }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .phone-wrap { min-height: 480px; }
    .float.f1 { left: 4%; }
    .float.f2 { right: 2%; }
}
@media (max-width: 420px) {
    .phone { width: 240px; height: 480px; }
    .float { font-size: .8rem; padding: 8px 10px; }
}

/* ------------------------------ Apps ------------------------------ */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
    font: inherit; font-weight: 700; font-size: .9rem; padding: 9px 16px; border-radius: 999px; cursor: pointer;
    background: var(--surface); color: var(--text); border: 1px solid var(--line);
}
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.app-card {
    display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.app-top { display: flex; gap: 14px; align-items: center; }
.app-top img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); flex: none; }
.app-top h3 { margin: 0; font-size: 1.05rem; }
.app-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag.new { background: color-mix(in srgb, var(--yellow) 30%, transparent); color: #7a5600; }
@media (prefers-color-scheme: dark) { .tag.new { color: var(--yellow); } }
.app-card p { color: var(--muted); font-size: .95rem; margin: 0; flex: 1; }
.app-card .btn { align-self: flex-start; }
.apps-note { margin-top: 26px; color: var(--muted); text-align: center; }

/* ------------------------------ Características ------------------------------ */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 14px;
    background: var(--surface-2);
}
.feature p { color: var(--muted); margin: 0; }

/* Medallero de ejemplo */
.olympic { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.medal-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.medal-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.medal-table th { font-size: .78rem; color: var(--muted); font-weight: 700; text-align: center; padding: 14px 8px; border-bottom: 1px solid var(--line); }
.medal-table th:nth-child(2) { text-align: left; }
.medal-table td { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--line); font-weight: 700; }
.medal-table td:nth-child(2) { text-align: left; }
.medal-table tr:last-child td { border-bottom: 0; }
.medal-table tr.me td { background: color-mix(in srgb, var(--blue) 10%, transparent); }
.medal-table .flag, .flag-emoji { font-size: 1.3rem; margin-right: 8px; vertical-align: -3px; }
.gold { color: #b8860b; } .silver { color: #6f7782; } .bronze { color: #a0522d; }
@media (prefers-color-scheme: dark) { .gold { color: #f4c542; } .silver { color: #c5ccd6; } .bronze { color: #e09a6b; } }
@media (max-width: 860px) { .olympic { grid-template-columns: 1fr; } }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 24px; }
.step::before {
    counter-increment: step; content: counter(step);
    position: absolute; top: -18px; left: 24px; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--blue), var(--sky));
    box-shadow: 0 6px 16px rgba(29, 108, 186, .35);
}
.step p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 30px; } }

/* Banda administración */
.band {
    background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; border-radius: 28px;
    padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
    position: relative; overflow: hidden;
}
.band::after { content: "¿?"; position: absolute; right: 4%; bottom: -40px; font-size: 180px; font-weight: 800; color: rgba(255, 255, 255, .07); line-height: 1; }
.band h2 { color: #fff; margin-bottom: 8px; }
.band p { margin: 0; color: rgba(255, 255, 255, .85); max-width: 560px; }
.band .actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.band .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .4); }
.band .btn-ghost:hover { color: #fff; border-color: #fff; }

/* ------------------------------ Páginas de texto ------------------------------ */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 24px; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.prose { max-width: 780px; }
.prose h2 { font-size: 1.45rem; margin-top: 2em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose p, .prose li { color: var(--text); }
.updated { color: var(--muted); font-size: .92rem; }
.callout {
    display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius-sm);
    background: var(--surface-2); border: 1px solid var(--line); margin: 20px 0;
}
.callout .ico { font-size: 1.4rem; line-height: 1.2; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: color-mix(in srgb, var(--yellow) 18%, var(--surface)); border-color: color-mix(in srgb, var(--yellow) 50%, transparent); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.toc ol { margin: 8px 0 0; padding-left: 1.2em; }
.card-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); }

/* Eliminar cuenta */
.del-steps { display: grid; gap: 22px; margin: 24px 0 8px; }
.del-step { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.del-step .num {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff;
    background: var(--coral); margin-bottom: 10px;
}
.del-step img { border-radius: 14px; border: 1px solid var(--line); width: 100%; max-width: 360px; justify-self: center; }
@media (max-width: 720px) { .del-step { grid-template-columns: 1fr; } }
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.data-grid .card-box h3 { display: flex; align-items: center; gap: 8px; }
.data-grid ul { margin: 0; padding-left: 1.1em; }
@media (max-width: 720px) { .data-grid { grid-template-columns: 1fr; } }
.mail-box { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
code, .mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--blue); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); }

/* ------------------------------ Pie ------------------------------ */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 28px; margin-top: 40px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { margin: 0 0 12px; font-size: .95rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--blue); }
.footer-grid p { color: var(--muted); font-size: .95rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Banderas: Windows no trae emojis de banderas, se usa Noto Color Emoji (solo se descarga para estos caracteres) */
.flag, .flag-emoji, .float .big { font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Anclas: que el encabezado fijo no tape el título */
[id] { scroll-margin-top: 84px; }
