/* Forja de Héroes — estilos */
:root {
  --bg: #0f0d0b;
  --bg-2: #18140f;
  --card: #1f1a14;
  --card-2: #2a231a;
  --line: #3b3124;
  --text: #ece4d6;
  --muted: #b3a690;
  --gold: #e3b45a;
  --gold-2: #f6d48a;
  --danger: #d9705b;
  --ok: #8fc27a;
  --radius: 14px;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(227,180,90,.12), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--gold-2); }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: #fff; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15,13,11,.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.logo svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: var(--card); }

/* Hero */
.hero { padding: 48px 0 24px; text-align: center; }
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 20px; }

.countdown { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--card); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; font-size: .95rem; color: var(--muted); }
.countdown b { color: var(--gold-2); font-variant-numeric: tabular-nums; font-size: 1.05rem; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 700; border-radius: 12px; padding: 14px 26px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #241a08; box-shadow: 0 6px 24px rgba(227,180,90,.25); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); color: #241a08; box-shadow: 0 10px 30px rgba(227,180,90,.35); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--gold); color: #fff; }
.btn.sm { padding: 9px 14px; font-size: .92rem; border-radius: 10px; }

/* Test */
.quiz { background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: 20px; padding: 28px 22px; margin: 24px auto 40px; max-width: 760px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.quiz[hidden], .screen[hidden] { display: none; }
.progress { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-bottom: 10px; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .3s; }
.qmeta { display: flex; justify-content: space-between; color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.question { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 1.65rem); color: #fff; margin-bottom: 18px; }
.answers { display: grid; gap: 10px; }
.answer { text-align: left; font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: border-color .12s, background .12s, transform .12s; }
.answer:hover, .answer:focus-visible { border-color: var(--gold); background: var(--card-2); outline: none; transform: translateX(3px); }
.quiz-nav { margin-top: 16px; display: flex; justify-content: space-between; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 6px 0; }
.linkbtn:hover { color: #fff; }

/* Resultado */
.result-head { text-align: center; padding: 6px 0 10px; }
.result-head .crest { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; border: 3px solid var(--cls, var(--gold)); box-shadow: 0 0 40px color-mix(in srgb, var(--cls, var(--gold)) 45%, transparent); background: var(--bg); }
.result-head .crest svg { width: 50px; height: 50px; color: var(--cls, var(--gold)); }
.result-head h2 { color: var(--cls, #fff); font-size: clamp(2rem, 6vw, 2.8rem); margin-bottom: 4px; }
.result-head .tagline { color: var(--muted); font-style: italic; margin-bottom: 10px; }
.match { display: inline-block; font-weight: 700; color: var(--bg); background: var(--cls, var(--gold)); padding: 3px 12px; border-radius: 999px; font-size: .9rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 12px 0; }
.chip { font-size: .82rem; border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; color: var(--muted); background: var(--bg-2); }
.chip.new { border-color: var(--gold); color: var(--gold-2); }
.result-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin: 18px 0; }
.box { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.box h4 { font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.box ul { margin: 0; padding-left: 18px; }
.box li { margin-bottom: 4px; }
.pros li::marker { color: var(--ok); }
.cons li::marker { color: var(--danger); }
.races-row { margin-bottom: 8px; }
.races-row strong { display: inline-block; min-width: 72px; }
.note { font-size: .85rem; color: var(--muted); }
.runners { display: grid; gap: 8px; }
.runner { display: flex; align-items: center; gap: 10px; }
.runner .bar { flex: 1; height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.runner .bar span { display: block; height: 100%; }
.runner .name { min-width: 92px; font-weight: 600; }
.runner .pct { min-width: 42px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.share { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--card-2); border: 1px solid var(--gold); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; }

/* Secciones de contenido */
section.block { padding: 36px 0; border-top: 1px solid var(--line); }
.grid-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ccard { display: block; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--cls); border-radius: var(--radius); padding: 16px; transition: transform .12s, border-color .12s; }
.ccard:hover { transform: translateY(-2px); color: var(--text); border-color: var(--cls); }
.ccard h3 { color: var(--cls); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.ccard h3 svg { width: 22px; height: 22px; }
.ccard p { margin: 0; font-size: .95rem; color: var(--muted); }
.ccard .roles { font-size: .8rem; color: var(--text); margin-top: 8px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.matrix { border-collapse: collapse; width: 100%; min-width: 720px; font-size: .92rem; }
.matrix th, .matrix td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.matrix thead th { position: sticky; top: 0; background: var(--card-2); font-size: .82rem; }
.matrix th[scope="row"] { text-align: left; white-space: nowrap; }
.matrix td.yes { color: var(--ok); font-weight: 700; }
.matrix td.new { color: var(--gold-2); font-weight: 700; }
.matrix td.no { color: #4c4235; }
.matrix tr.fac td { background: var(--bg-2); text-align: left; font-weight: 700; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin-top: 10px; }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; color: #fff; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Guía de clases */
.class-section { padding: 30px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.class-section h2 { color: var(--cls); display: flex; align-items: center; gap: 12px; }
.class-section h2 svg { width: 34px; height: 34px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 24px; }
.toc a { text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--cls); background: var(--card); font-size: .92rem; }
.toc a:hover { border-color: var(--cls); }
.cta-inline { background: var(--card); border: 1px solid var(--gold); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 24px 0; }
.cta-inline p { margin: 0; }

/* Páginas legales */
.legal { max-width: 780px; padding: 40px 16px 60px; }
.legal h2 { font-size: 1.35rem; margin-top: 1.6em; }
.legal .placeholder { background: rgba(227,180,90,.15); color: var(--gold-2); padding: 0 4px; border-radius: 4px; }

/* Huecos de anuncios */
.ad-slot { margin: 24px auto; max-width: 760px; min-height: 0; }

/* Pie */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .88rem; margin-top: 20px; }
.site-footer .links { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: #fff; }

/* Aviso de cookies */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.5); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: .92rem; }
.cookie-banner p { margin: 0; flex: 1 1 280px; }
.cookie-banner .actions { display: flex; gap: 8px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .result-grid { grid-template-columns: 1fr; }
  .quiz { padding: 22px 16px; border-radius: 16px; }
  .hero { padding-top: 32px; }
  .nav a { padding: 6px 8px; font-size: .9rem; }
}

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

/* Herramientas */
.tool { background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin: 16px 0 28px; }
.controls { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 0; margin-bottom: 6px; }
.field select, .field input[type="text"] { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
.field select:focus, .field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.field select:disabled { opacity: .45; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .93rem; }
.seg input:checked + span { background: var(--gold); color: #241a08; border-color: var(--gold); font-weight: 700; }
.seg input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.names { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.name-card { display: flex; align-items: stretch; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.name-card:hover { border-color: var(--gold); }
.name-txt { flex: 1; text-align: left; font: inherit; font-family: var(--serif); font-size: 1.12rem; color: #fff; background: none; border: 0; padding: 10px 12px; cursor: copy; }
.fav { background: none; border: 0; border-left: 1px solid var(--line); color: #5b4e3b; font-size: 1.1rem; padding: 0 12px; cursor: pointer; }
.fav.on, .fav:hover { color: var(--gold-2); }
.check-out { margin: 12px 0 0; min-height: 1.5em; }
.check-out.good { color: var(--ok); }
.check-out.bad { color: var(--danger); }
.picks { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.pick { background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--cls); border-radius: var(--radius); padding: 16px; }
.pick h3 { color: var(--cls); margin: 6px 0 6px; }
.pick p { margin: 0 0 8px; }
.pick-tag { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pick-why { color: var(--muted); }
.matrix.left td, .matrix.left th { text-align: left; }
@media (max-width: 640px) { .picks { grid-template-columns: 1fr; } .tool { padding: 16px; } .names { grid-template-columns: 1fr 1fr; } }

/* Personajes laterales (solo en la portada y en pantallas anchas) */
.home-top { position: relative; }
.home-top > .hero, .home-top > .wrap { position: relative; z-index: 2; }
.side-art { display: none; }
@media (min-width: 1400px) {
  .side-art { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
  .side-art img { position: absolute; height: auto; filter: drop-shadow(0 14px 34px rgba(0,0,0,.55)); }
  .side-art .side-left { width: min(480px, calc((100vw - 760px) / 2 - 20px)); left: max(0px, calc((100vw - 760px) / 2 - 500px)); bottom: 0; }
  .side-art .side-right { width: min(440px, calc((100vw - 760px) / 2 - 30px)); right: max(10px, calc((100vw - 760px) / 2 - 470px)); bottom: 30px; }
}
