/* Todo Dicho · sitio público. Mismo lenguaje visual que el juego (apps/web/src/styles.css):
   madera oscura, papel de libreta, birome azul. Móvil primero, sin JS. */

:root {
  color-scheme: dark;
  --wood-dark: #2b1a10;
  --wood: #4a3122;
  --cream: #f3ede0;
  --ink: #1e3f8a;
  --ink-strong: #17307a;
  --gold: #d9a441;
  --silver: #b8b8b8;
  --red: #c8302b;
  --paper-text: #2b1a10;
  --paper-muted: #5a4634;
  --line: rgba(159, 182, 203, 0.35);
  --gutter: 16px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 220, 160, 0.16), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.10) 0 3px, transparent 3px 41px),
    linear-gradient(180deg, var(--wood) 0%, var(--wood-dark) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, .hand {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.05;
  margin: 0;
}
h1 { font-size: clamp(44px, 9vw, 76px); }
h2 { font-size: clamp(34px, 6vw, 48px); color: var(--ink); }
h3 { font-size: clamp(26px, 4.5vw, 32px); color: var(--ink); }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.muted { opacity: 0.75; }
.small { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, #2a1a10, #1d110a);
  border-bottom: 1px solid rgba(0,0,0,0.6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.45), inset 0 -1px 0 rgba(255,220,160,0.08);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 44px; width: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6)); }
.brand .hand { font-size: 26px; color: var(--cream); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 15px; opacity: 0.85; }
.nav a:hover { opacity: 1; background: rgba(255,255,255,0.08); }
.nav .only-wide { display: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 26px; line-height: 1;
  padding: 12px 26px 10px; text-decoration: none; cursor: pointer;
  border: 1px solid rgba(0,0,0,0.35); border-radius: 4px 12px 6px 14px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
  transition: transform 120ms ease, background 120ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--ink); color: var(--cream); border-color: rgba(0,0,0,0.5); }
.btn.primary:hover { background: #2a52b0; }
.btn.paper { background: var(--cream); color: var(--ink); }
.btn.paper:hover { background: #fff; }
.btn.sm { font-size: 21px; padding: 8px 16px 6px; box-shadow: 0 3px 8px rgba(0,0,0,0.4); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 36px; text-align: center; }
.hero .logo { width: 260px; max-width: 70vw; margin: 0 auto 8px; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.6)); }
.hero h1 { color: var(--cream); text-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.hero .tagline { font-size: clamp(19px, 3.5vw, 24px); max-width: 560px; margin: 8px auto 22px; opacity: 0.92; }
.hero .note { margin-top: 16px; font-size: 15px; opacity: 0.75; }
.hero .chapitas-deco { width: 200px; max-width: 55vw; margin: 28px auto 0; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.6)); }

/* ---------- Secciones ---------- */
section { padding: 28px 0; }
.section-title { text-align: center; margin-bottom: 18px; }
.section-title h2 { color: var(--cream); text-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.section-title p { max-width: 620px; margin: 6px auto 0; opacity: 0.85; }

/* Papel de libreta, igual que .panel del juego */
.paper {
  position: relative; color: var(--paper-text);
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, var(--line) 27px 28px),
    linear-gradient(180deg, #F4ECD6, #EFE5CF);
  border: 1px solid rgba(0,0,0,0.25); border-radius: 4px 10px 6px 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.45), inset 0 0 40px rgba(120, 80, 30, 0.12);
  padding: 22px 20px;
  line-height: 28px; /* coincide con el renglón */
}
.paper h2, .paper h3 { color: var(--ink); }
.paper h2 { line-height: 56px; margin-bottom: 4px; }
.paper h3 { line-height: 28px; margin-bottom: 8px; }
.paper .muted { color: var(--paper-muted); opacity: 1; }
.paper a { color: var(--ink); }
.paper hr { border: 0; border-top: 1px dashed rgba(30,63,138,0.4); margin: 14px 0; }
.paper.tilt-l { transform: rotate(-0.6deg); }
.paper.tilt-r { transform: rotate(0.5deg); }

/* Corona chiquita dibujada, como doodle en la esquina */
.paper.doodle::before {
  content: ""; position: absolute; top: 10px; right: 12px; width: 26px; height: 22px; opacity: 0.55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M12 44 L9 20 L22 31 L32 14 L42 31 L55 20 L52 44 Z M14 50 H50' fill='none' stroke='%231e3f8a' stroke-width='5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
.card { display: flex; flex-direction: column; gap: 6px; }
.card .icon { width: 40px; height: 40px; color: var(--ink); margin-bottom: 2px; }
.card .icon svg { width: 100%; height: 100%; }

.two-col { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
.figure { margin: 0; }
.figure img { border-radius: 4px 10px 6px 12px; box-shadow: 0 10px 22px rgba(0,0,0,0.5); border: 1px solid rgba(0,0,0,0.35); }
.figure figcaption { font-size: 14px; opacity: 0.75; margin-top: 8px; text-align: center; }
.paper .dorso {
  float: right; width: 86px; margin: 0 0 8px 14px; border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.3); box-shadow: 0 4px 10px rgba(0,0,0,0.4); transform: rotate(4deg);
}

/* ---------- Chapitas y packs ---------- */
.chapitas-img { width: 220px; margin: 0 auto 8px; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.5)); }
.rules { list-style: none; padding: 0; margin: 0; }
.rules li { position: relative; padding-left: 26px; margin: 0; line-height: 28px; }
.rules .chapita-mini { position: absolute; left: 0; top: 6px; margin: 0; }
.fineprint {
  margin-top: 14px; padding: 12px 14px; line-height: 24px; font-size: 15px;
  background: rgba(30,63,138,0.06); border: 1px dashed rgba(30,63,138,0.45); border-radius: 6px;
}
.fineprint strong { color: var(--ink-strong); }

.packs { width: 100%; border-collapse: collapse; margin: 6px 0 4px; font-size: 16px; line-height: 28px; }
.packs th, .packs td { padding: 0 8px; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.12); vertical-align: middle; }
.packs th { font-family: 'Caveat', cursive; font-weight: 700; font-size: 22px; color: var(--ink); line-height: 28px; }
.packs td.num, .packs th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.packs .pack-name { font-family: 'Caveat', cursive; font-weight: 700; font-size: 22px; color: var(--ink); }
.packs .bonus { color: var(--paper-muted); font-size: 14px; }
.packs tr:last-child td { border-bottom: 0; }
.chapita-mini { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; margin-right: 4px;
  background: radial-gradient(circle at 35% 30%, #f5d67a, var(--gold) 55%, #9a6d1a); box-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.chapita-mini.silver { background: radial-gradient(circle at 35% 30%, #eee, var(--silver) 55%, #6f6f6f); }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px dashed rgba(30,63,138,0.4); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 6px 28px 6px 0; position: relative;
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 24px; line-height: 28px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 6px; font-family: 'Inter', sans-serif; font-weight: 400; font-size: 22px; line-height: 28px; color: var(--ink); opacity: 0.7;
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 12px; }

/* ---------- Contacto ---------- */
.contact { text-align: center; }
.contact .mail { font-family: 'Caveat', cursive; font-weight: 700; font-size: 30px; line-height: 56px; }
.contact .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 4px; }

/* ---------- Footer ---------- */
footer { padding: 28px 0 40px; text-align: center; font-size: 14px; opacity: 0.8; }
footer .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; }
footer a { text-decoration: none; font-weight: 600; }
footer a:hover { text-decoration: underline; }
footer .sep { opacity: 0.5; }

/* ---------- Páginas legales ---------- */
.legal { padding: 28px 0 40px; }
.legal .paper { max-width: 820px; margin: 0 auto; padding: 28px 22px; }
.legal .paper h1 { font-size: clamp(38px, 7vw, 54px); color: var(--ink); line-height: 56px; margin-bottom: 0; }
.legal .paper h2 { font-size: 30px; line-height: 28px; margin: 28px 0 8px; }
.legal .paper p, .legal .paper li { line-height: 28px; }
.legal .paper ul { margin-bottom: 0; }
.legal .lead { color: var(--paper-muted); margin-bottom: 14px; }
.legal .draft {
  margin: 0 0 16px; padding: 4px 12px; line-height: 20px; font-size: 13px;
  background: rgba(217,164,65,0.18); border: 1px dashed rgba(120,80,30,0.5); border-radius: 6px; color: var(--paper-muted);
}
.legal .updated { margin-top: 24px; padding-top: 12px; border-top: 1px dashed rgba(30,63,138,0.4); font-size: 14px; color: var(--paper-muted); }
.legal .toc { list-style: decimal; column-count: 1; margin-bottom: 8px; }
.legal .toc a { text-decoration: none; }
.legal .toc a:hover { text-decoration: underline; }

/* ---------- Pantallas más anchas ---------- */
@media (min-width: 640px) {
  .nav .only-wide { display: inline-block; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .paper { padding: 26px 26px; }
  .hero { padding: 56px 0 44px; }
  .legal .toc { column-count: 2; column-gap: 24px; }
}
@media (min-width: 960px) {
  .cards.four { grid-template-columns: repeat(4, 1fr); }
  .two-col { grid-template-columns: 1.1fr 0.9fr; gap: 28px; }
  section { padding: 36px 0; }
  .hero .logo { width: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover { transition: none; transform: none; }
}
