/* Landing pública de Tavern Up.

   Paleta y tipografía son las de la app (tavern_up/doc/design.md §2 y §4).
   La app es solo oscura a propósito, y la landing también: es el escaparate de
   esa misma taberna a la luz de las antorchas.

   Las fuentes se sirven desde assets/fonts y no desde Google Fonts: así no se
   manda la IP del visitante a un tercero sin consentimiento (RGPD) y la página
   no depende de nadie más para verse bien. Licencias en assets/fonts. */

@font-face { font-family: "Cinzel"; src: url("../fonts/Cinzel-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ground:    #121110;
  --surface:   #1C1A17;
  --raised:    #292524;
  --border:    #332E27;
  --ink:       #F5F0E6;
  --ink-mid:   #C9C2B6;
  --ink-muted: #A8A29E;
  --accent:    #D97706;
  --highlight: #F59E0B;
  --on-accent: #121110;
  --available: #16A34A;
  --full:      #DC2626;

  --display: "Cinzel", "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 5vw, 56px);
  --max: 1120px;
  --r-md: 12px;
  --r-card: 16px;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-mid);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
strong { color: var(--ink); font-weight: 600; }
em { color: var(--ink); }
a { color: var(--highlight); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: var(--on-accent);
  padding: 8px 14px; border-radius: 8px; font-weight: 700; z-index: 20;
}
.skip:focus { left: 8px; }

/* ---------- Barra ---------- */

.bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.bar.scrolled { border-bottom-color: var(--border); }
.bar .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.bar .logo { margin-right: auto; }
.bar .logo img { height: 38px; width: auto; }
.bar nav { display: flex; gap: 4px; }
.bar nav a {
  color: var(--ink-muted); text-decoration: none; font-size: 14.5px;
  padding: 8px 12px; border-radius: 8px;
}
.bar nav a:hover { color: var(--ink); background: var(--surface); }
@media (max-width: 860px) { .bar nav { display: none; } }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--r-md);
  font: 700 15px/1 var(--body);
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: box-shadow .2s, background .2s, color .2s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--highlight); box-shadow: 0 4px 18px -2px rgb(245 158 11 / .35); }
.btn-ghost { border-color: var(--border); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Tipografía de sección ---------- */

.kicker {
  font-size: 12.5px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 18px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--ink); text-wrap: balance; margin: 0; }
h2 { font-size: clamp(28px, 4.4vw, 42px); line-height: 1.12; margin-bottom: 20px; }
h3 { font-size: 20px; line-height: 1.25; margin-bottom: 10px; }
p { margin: 0 0 16px; }
.lead { font-size: clamp(17.5px, 2vw, 20px); line-height: 1.6; max-width: 36em; }

section { padding: clamp(72px, 10vw, 128px) 0 0; }
.section-head { max-width: 46em; margin-bottom: clamp(36px, 5vw, 56px); }

/* ---------- Portada ---------- */

.hero { padding-top: clamp(40px, 7vw, 88px); }
.hero .wrap {
  display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(32px, 4vw, 56px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 62px); line-height: 1.05; letter-spacing: .005em;
  margin-bottom: 26px;
}
.hero h1 span { color: var(--highlight); display: block; white-space: nowrap; }
.hero .lead { margin-bottom: 32px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px;
  font-size: 14px; color: var(--ink-muted);
}
.hero-meta span::before { content: "◆"; color: var(--accent); font-size: 9px; margin-right: 8px; vertical-align: 2px; }

.emblem { position: relative; justify-self: center; width: min(100%, 440px); }
.emblem::before {
  content: ""; position: absolute; inset: 14% 10% 22%;
  background: radial-gradient(closest-side, rgb(245 158 11 / .30), transparent);
  filter: blur(24px);
  animation: flicker 5s ease-in-out infinite;
}
.emblem img { position: relative; width: 100%; height: auto; }
@keyframes flicker {
  0%, 100% { opacity: .85; transform: scale(1); }
  35% { opacity: 1; transform: scale(1.03); }
  60% { opacity: .75; transform: scale(.99); }
}
@media (prefers-reduced-motion: reduce) { .emblem::before { animation: none; } }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .emblem { order: -1; width: min(70%, 300px); }
}

/* ---------- El problema ---------- */

.problem {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r-card);
  overflow: hidden;
}
.problem div { background: var(--surface); padding: 28px 26px; }
.problem b { display: block; font-family: var(--display); font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.problem p { margin: 0; font-size: 15.5px; color: var(--ink-muted); }
@media (max-width: 760px) { .problem { grid-template-columns: 1fr; } }

.question {
  margin: clamp(36px, 5vw, 56px) 0 0; padding: 0 0 0 22px;
  border-left: 2px solid var(--accent);
  font-family: var(--display); font-size: clamp(22px, 3vw, 30px); line-height: 1.3;
  color: var(--ink); max-width: 28em;
}

/* ---------- Cómo funciona ---------- */

.how { display: grid; grid-template-columns: 1fr 340px; gap: clamp(40px, 6vw, 88px); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: paso; }
.steps li {
  counter-increment: paso; position: relative;
  padding: 0 0 34px 68px;
}
.steps li::before {
  content: counter(paso);
  position: absolute; left: 0; top: -4px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 18px/1 var(--display); color: var(--highlight);
  background: var(--surface); border: 1px solid var(--border);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 22px; top: 46px; bottom: 4px;
  width: 1px; background: var(--border);
}
.steps p { margin: 0; font-size: 16px; max-width: 32em; }
@media (max-width: 860px) { .how { grid-template-columns: 1fr; } .phone-wrap { justify-self: center; } }

/* Teléfono ilustrativo: la app aún no está publicada, así que no hay capturas.
   Se dibuja con los tokens de la app para que se parezca a lo que será. */
.phone-wrap { position: sticky; top: 96px; }
.phone {
  width: 300px; height: 610px; border-radius: 44px; padding: 10px;
  background: #0A0908; border: 1px solid var(--border);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / .7), 0 0 0 1px #000 inset;
}
.screen {
  position: relative; height: 100%; border-radius: 34px; overflow: hidden;
  background: var(--ground);
}
.screen .map { position: absolute; inset: 0; width: 100%; height: 100%; }
.screen .top {
  position: absolute; top: 14px; left: 14px; right: 14px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.chip {
  font: 600 11.5px/1 var(--body); color: var(--ink);
  background: var(--raised); border: 1px solid var(--border);
  padding: 7px 10px; border-radius: 999px;
}
.chip.on { background: rgb(217 119 6 / .18); border-color: rgb(217 119 6 / .5); color: var(--highlight); }
.sheet {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 14px;
  box-shadow: 0 -6px 28px rgb(0 0 0 / .6);
}
.sheet .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sheet .title { font: 600 15px/1.3 var(--body); color: var(--ink); margin: 8px 0 4px; }
.sheet .meta { font-size: 12.5px; color: var(--ink-muted); margin: 0 0 10px; }
.badge {
  font: 600 11px/1 var(--body); padding: 5px 8px; border-radius: 999px; border: 1px solid;
}
.badge.sede { color: var(--highlight); background: rgb(217 119 6 / .18); border-color: rgb(217 119 6 / .5); }
.badge.open { color: #4ADE80; background: rgb(22 163 74 / .16); border-color: rgb(22 163 74 / .45); }
.badge.cost { color: var(--ink-mid); background: var(--raised); border-color: var(--border); }
.org {
  display: flex; align-items: center; gap: 8px;
  border-top: 1px solid var(--border); padding-top: 10px; font-size: 12.5px; color: var(--ink-muted);
}
.org .avatar { width: 26px; height: 26px; border-radius: 50%; background: #57534E; flex: none; }
.org b { color: var(--ink); font-weight: 600; }
.org .score { margin-left: auto; color: var(--ink); font-weight: 700; }
.sheet .apply {
  margin-top: 10px; width: 100%; min-height: 40px; border: 0; border-radius: var(--r-md);
  background: var(--accent); color: var(--on-accent); font: 700 13.5px/1 var(--body);
}
.phone-note { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--ink-muted); }

/* ---------- Dos tipos de mesa ---------- */

.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.kind {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: clamp(24px, 3.5vw, 36px);
}
.kind.sede { border-color: rgb(217 119 6 / .45); box-shadow: 0 4px 22px -6px rgb(245 158 11 / .18); }
.kind .tag { margin-bottom: 18px; display: inline-block; }
.kind ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.kind li { position: relative; padding-left: 22px; font-size: 15.5px; }
.kind li::before { content: "·"; position: absolute; left: 6px; color: var(--accent); font-weight: 700; }
.kinds-foot { margin-top: 22px; color: var(--ink-muted); font-size: 15.5px; max-width: 46em; }
@media (max-width: 760px) { .kinds { grid-template-columns: 1fr; } }

/* ---------- Reputación ---------- */

.rep { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.profile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 26px;
}
.profile .who { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.profile .avatar {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: #57534E; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgb(245 158 11 / .55);
}
.profile .name { font: 600 17px/1.2 var(--body); color: var(--ink); }
.profile .role { font-size: 13px; color: var(--ink-muted); }
.stat-line {
  font: 700 clamp(26px, 3vw, 32px)/1.2 var(--body); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-line .pct { color: var(--highlight); }
.stat-line span { white-space: nowrap; }
.stat-line .sep { color: var(--ink-muted); font-weight: 400; }
.stat-line .unit { font-size: .62em; font-weight: 600; color: var(--ink-muted); }
.stat-meta { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--ink-mid); }
.stat-meta .sep { color: var(--ink-muted); font-weight: 400; margin: 0 4px; }
.stat-tip {
  display: inline-block; margin: 12px 0 0; padding: 8px 12px;
  background: var(--raised); border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; line-height: 1.45; color: var(--ink-mid);
}
.stat-tip span { color: var(--highlight); margin-right: 4px; }
.profile hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0 16px; }
.novato { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-muted); }
.novato .badge { color: var(--ink); background: var(--raised); border-color: var(--border); }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.points b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.points p { margin: 0; font-size: 16px; }
@media (max-width: 860px) { .rep { grid-template-columns: 1fr; } }

/* ---------- Seguridad ---------- */

.grid4 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden;
}
.grid4 > div { background: var(--surface); padding: 28px 24px; }
.grid4 .icon {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 16px;
  display: grid; place-items: center;
  background: rgb(217 119 6 / .14); color: var(--highlight);
}
.grid4 .icon svg { width: 22px; height: 22px; }
.grid4 h3 { font: 600 17px/1.3 var(--body); color: var(--ink); margin-bottom: 8px; }
.grid4 p { margin: 0; font-size: 15px; color: var(--ink-muted); }

/* ---------- Gratis ---------- */

.free {
  background: var(--accent); color: #35220A;
  border-radius: var(--r-card); padding: clamp(32px, 5vw, 64px);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px);
}
.free h2 { color: #1A1003; }
.free p { color: #35220A; font-size: 17px; }
.free strong { color: #120C02; font-weight: 700; }
.free ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: start; }
.free li {
  background: rgb(18 17 16 / .1); border: 1px solid rgb(18 17 16 / .18);
  border-radius: var(--r-md); padding: 14px 16px; font-size: 15.5px; color: #2A1A05;
}
.free li b { color: #120C02; }
@media (max-width: 760px) { .free { grid-template-columns: 1fr; } }

/* ---------- Sedes ---------- */

.venues {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: start;
}
.checks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--available); font-weight: 700; }
.trial {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 30px 28px;
}
.trial .big { font: 700 clamp(40px, 5vw, 54px)/1 var(--display); color: var(--ink); margin: 0 0 6px; }
.trial .sub { color: var(--highlight); font-weight: 600; margin: 0 0 18px; }
.trial ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.trial li::before { content: "—"; color: var(--accent); margin-right: 10px; }
@media (max-width: 860px) { .venues { grid-template-columns: 1fr; } }

/* ---------- Comunidad ---------- */

.quote {
  text-align: center; max-width: 820px; margin: 0 auto;
}
.quote blockquote {
  margin: 0 0 22px; font-family: var(--display); color: var(--ink);
  font-size: clamp(24px, 3.6vw, 36px); line-height: 1.3; text-wrap: balance;
}
.quote p { color: var(--ink-muted); max-width: 38em; margin: 0 auto 16px; }
.quote .kicker { color: var(--accent); }

/* ---------- Preguntas ---------- */

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px;
  padding: 20px 0; font: 600 17px/1.4 var(--body); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; max-width: 40em; font-size: 16px; }

/* ---------- Cierre y pie ---------- */

.closing { text-align: center; padding-bottom: clamp(72px, 10vw, 120px); }
.closing img { width: 120px; height: auto; margin: 0 auto 26px; }
.closing .lead { margin: 0 auto 30px; }
.closing .cta-row { justify-content: center; }

footer { border-top: 1px solid var(--border); padding: 32px 0 48px; font-size: 14px; color: var(--ink-muted); }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
footer img { height: 30px; width: auto; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-left: auto; }
footer a { color: var(--ink-muted); text-decoration: none; }
footer a:hover { color: var(--ink); }


/* ---------- Documentos: normas, aviso legal, privacidad ----------
   Páginas generadas desde doc/ por trastienda/scripts/md_a_html.py. */

.doc .wrap { max-width: 820px; padding-top: clamp(32px, 6vw, 64px); padding-bottom: clamp(56px, 8vw, 96px); }
.doc h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.08; margin-bottom: 14px; }
.doc h1 + p { color: var(--ink-muted); font-size: 15px; }
.doc h2 { font-size: clamp(22px, 3.2vw, 28px); margin: 56px 0 16px; scroll-margin-top: 88px; }
.doc h3 { font: 600 17px/1.4 var(--body); color: var(--ink); margin: 32px 0 10px; }
.doc p, .doc li { max-width: 68ch; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 16px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--accent); }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0 0; }
.doc blockquote { margin: 0 0 18px; padding: 14px 20px; background: var(--surface); border-left: 2px solid var(--accent); }
.doc blockquote p { margin: 0; }
.doc .indice {
  margin: 32px 0 8px; padding: 18px 22px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
}
.doc .indice b { display: block; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.doc .indice ol { margin: 0; columns: 2 240px; column-gap: 32px; }
.doc .indice li { break-inside: avoid; margin-bottom: 6px; }
.doc .indice a { color: var(--ink-mid); text-decoration: none; }
.doc .indice a:hover { color: var(--highlight); }
.doc .tabla { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--r-md); }
.doc table { border-collapse: collapse; width: 100%; font-size: 14.5px; background: var(--surface); }
.doc th, .doc td { text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); background: var(--ground); }
.doc tbody tr:last-child td { border-bottom: 0; }
.doc table { min-width: 560px; }

/* Un hueco sin rellenar tiene que saltar a la vista: no se publica sin verlo. */
mark.hueco {
  background: rgb(220 38 38 / .18); color: #FCA5A5;
  border: 1px dashed rgb(220 38 38 / .6); border-radius: 4px; padding: 0 4px;
}

footer nav a[aria-current="page"] { color: var(--highlight); }
