/* Comuniela — landing pública. CSS propio, sin frameworks: HTML indexable y carga instantánea. */

:root {
  /* ---- Paleta de marca (derivada del logo) ---------------------------------
     Única fuente de verdad del verde. Contraste sobre blanco:
       500 → 2.67 · 600 → 3.40 · 700 → 4.86 (AA) · 800 → 7.89 (AAA)
     REGLA: brand-500 y brand-600 NUNCA llevan texto blanco encima.
     Superficie con texto blanco → brand-700. Acento/indicador → brand-500. */
  --brand-500: #47b443;
  --brand-500-rgb: 71, 180, 67;
  --brand-600: #469a41;
  --brand-700: #2f7a2c;
  --brand-700-rgb: 47, 122, 44;
  --brand-800: #235d21;
  --brand-900: #163d15;

  /* Alias semánticos: el resto de la hoja consume estos, no los hex. */
  --green: var(--brand-700);
  --green-rgb: var(--brand-700-rgb);
  --green-dark: var(--brand-800);
  --hit: #15803d; /* verde semántico de "acertado", no es el verde de marca */
  --hit-rgb: 21, 128, 61;
  --ink: #12151a;
  --muted: #667085;
  --line: rgba(0, 0, 0, 0.09);
  --bg: #ffffff;
  --bg-soft: #f6f7f6;
  --blue: #1d4ed8;
  --slate: #64748b;
  --radius: 16px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; }

a { color: inherit; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; margin: 0; }

/* ---------- header ---------- */
/* La barra ocupa el 100% del ancho para que el fondo no se corte al pasar
   sobre secciones de otro color; el contenido sigue centrado en --max. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* logo de marca: el SVG llega a dist/brand/ desde app/src/assets/brand
   (ver scripts/build-site.mjs). A 24px o menos se usa la variante `flat`. */
.brand-mark { width: 30px; height: 30px; display: block; flex-shrink: 0; }

.brand-mark.small { width: 24px; height: 24px; }

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14.5px;
  font-weight: 600;
}

.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  padding: 11px 20px;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-ghost { background: var(--bg-soft); color: var(--ink); }
.btn-ghost:hover { background: #ecefec; }
.btn-lg { padding: 15px 28px; font-size: 16px; }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 24px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(var(--green-rgb), 0.08);
  border-radius: 999px;
  padding: 6px 13px;
}

.hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 800; }

.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted);
  margin: 18px 0 28px;
  max-width: 34em;
}

.lead strong, .prose strong { color: var(--ink); font-weight: 700; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-note { font-size: 13.5px; color: var(--muted); margin: 16px 0 0; }

/* ---------- mockup del boleto ---------- */
.hero-art { position: relative; }

.ticket {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 30px 60px -28px rgba(var(--green-rgb), 0.4);
  padding: 18px;
  transform: rotate(-1.4deg);
}

.ticket-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ticket-title { font-weight: 800; font-size: 15px; }

.chip-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: #c0392b;
  background: rgba(192, 57, 43, 0.1);
  border-radius: 8px;
  padding: 4px 9px;
}

.chip-live .dot { width: 6px; height: 6px; border-radius: 50%; background: #c0392b; }

.row { padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: none; }

.row-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  margin-bottom: 9px;
}

.row-teams b { font-weight: 700; }
.row-teams span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.row-teams .score { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }

.signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.signs i {
  font-style: normal;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  padding: 7px 0;
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--muted);
  border: 1.5px solid transparent;
}

.signs i.on { background: #fff; border-color: var(--green); color: var(--ink); }
.signs i.hit { border-color: var(--hit); background: rgba(var(--hit-rgb), 0.1); }

.bar { display: flex; gap: 2px; margin-top: 9px; height: 6px; }
.bar span { background: var(--green); border-radius: 3px; }
.bar span.x { background: var(--slate); }
.bar span.two { background: var(--blue); }

.ticket-foot { text-align: center; font-size: 11.5px; color: var(--muted); margin: 14px 0 0; }

.chat-float {
  position: absolute;
  right: -8px;
  bottom: -34px;
  width: 250px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.35);
  padding: 12px;
  transform: rotate(1.6deg);
}

.msg {
  background: var(--bg-soft);
  border-radius: 13px;
  border-bottom-left-radius: 5px;
  padding: 8px 11px;
  font-size: 12.5px;
  margin-bottom: 7px;
}

.msg b { display: block; font-size: 11px; color: var(--green); margin-bottom: 2px; }

.msg.mine {
  background: rgba(var(--green-rgb), 0.1);
  border-bottom-left-radius: 13px;
  border-bottom-right-radius: 5px;
  margin-left: 34px;
}

.reacts { display: flex; gap: 6px; }

.reacts span {
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 2px 8px;
}

/* ---------- trust ---------- */
.trust {
  max-width: var(--max);
  margin: 60px auto 0;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.trust b { display: block; font-size: 22px; font-weight: 800; color: var(--green); letter-spacing: -0.02em; }
.trust span { font-size: 13px; color: var(--muted); }

/* ---------- secciones ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 76px 24px; }

.section-alt { max-width: none; background: var(--bg-soft); }
.section-alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.section h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.section-lead { color: var(--muted); font-size: 17px; margin: 12px 0 40px; }

/* pasos */
.steps { list-style: none; counter-reset: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.steps li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
}

.steps h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 15px; margin: 0; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.features article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.features h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.features p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* prosa SEO */
.prose { max-width: 62ch; }
.prose p { color: var(--muted); font-size: 16px; }
.prose ul { color: var(--muted); font-size: 16px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* faq */
.faq { max-width: 76ch; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 18px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--green);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); font-size: 15px; margin: 0 0 16px; }

/* cta final */
.final-cta {
  text-align: center;
  padding: 88px 24px 96px;
  background: var(--brand-800);
  color: #fff;
}

.final-cta h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; }
.final-cta p { color: rgba(255, 255, 255, 0.86); font-size: 17px; margin: 14px 0 30px; }
.final-cta .btn-primary { background: #fff; color: var(--green); }
.final-cta .btn-primary:hover { background: #f1f5f2; }

/* footer */
.site-footer { max-width: var(--max); margin: 0 auto; padding: 44px 24px 60px; }

.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }

.foot-links { display: flex; gap: 20px; margin: 16px 0; font-size: 14px; font-weight: 600; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

.foot-legal { font-size: 12.5px; color: var(--muted); max-width: 70ch; margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 64px; padding-top: 32px; }
  .hero-art { max-width: 420px; margin: 0 auto; }
  .steps, .features { grid-template-columns: 1fr; }
  .trust { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .site-nav { display: none; }
  .section { padding: 56px 20px; }
}

@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; }
  .chat-float { right: -4px; width: 210px; }
}
