/*
 * RankWOD · web estática de rankwod.com
 * Paleta y tipografía del sistema de diseño de la app (rankwod/nuxt/app/theme/colors.ts
 * y docs/design-tokens.md): rojo primario, escala slate, Barlow Condensed + Barlow.
 * Oro/plata/bronce solo en el podio del leaderboard, siempre como relleno.
 */

@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 800; font-display: swap; src: url("fonts/barlow-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }

:root {
  /* Tema oscuro de la app: base de la web */
  --bg: #0B0F17;
  --surface: #111827;
  --surface-bright: #1F2937;
  --on: #F1F5F9;
  --muted: #CBD5E1;
  --outline: #334155;
  --primary: #F87171;          /* texto/acento sobre oscuro (6.93:1) */
  --primary-fill: #DC2626;     /* relleno de botones, texto blanco (4.83:1) */
  --primary-fill-hover: #B91C1C;
  /* Tema claro de la app: secciones claras */
  --l-bg: #F8FAFC;
  --l-surface: #FFFFFF;
  --l-on: #0F172A;
  --l-muted: #475569;
  --l-outline: #E2E8F0;
  --l-primary: #DC2626;
  /* Podio */
  --gold: #FBBF24;
  --silver: #E2E8F0;
  --bronze: #D9A066;
  --on-podium: #0B0F17;

  --radius: 14px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --motion: 200ms ease-out;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--on);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: 0.005em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary-fill); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color var(--motion), border-color var(--motion), transform var(--motion);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--primary-fill); color: #fff; }
.btn--primary:hover { background: var(--primary-fill-hover); }
.btn--ghost { border-color: rgba(241, 245, 249, 0.55); color: var(--on); }
.btn--ghost:hover { border-color: var(--on); background: rgba(241, 245, 249, 0.08); }
.btn:active { transform: translateY(1px); }

/* ---------- Cabecera ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color var(--motion), box-shadow var(--motion);
}
.header.is-scrolled { background: rgba(11, 15, 23, 0.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--outline); }
.header__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
/* Logotipo: como el de AseguramosTuBox, Barlow 800 en mayúsculas y con la segunda palabra en el color de marca */
.brand span { font-family: var(--font-body); font-weight: 800; font-size: 1.5rem; line-height: 1; text-transform: uppercase; letter-spacing: 0; }
.brand b { color: var(--primary); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--muted); transition: color var(--motion); }
.nav a:not(.btn):hover { color: var(--on); }
.nav .btn { min-height: 42px; padding: 0 18px; font-size: 1.05rem; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; background: none; border: 0; color: var(--on); cursor: pointer; border-radius: 10px;
  }
  .nav-toggle svg { width: 28px; height: 28px; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11, 15, 23, 0.98); border-bottom: 1px solid var(--outline);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--outline); color: var(--on); font-size: 1.1rem; }
  .nav .btn { margin-top: 16px; min-height: 48px; }
  .header.menu-open { background: rgba(11, 15, 23, 0.98); }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,15,23,0.70) 0%, rgba(11,15,23,0.25) 30%, rgba(11,15,23,0.55) 60%, rgba(11,15,23,0.96) 100%),
    linear-gradient(90deg, rgba(11,15,23,0.75) 0%, rgba(11,15,23,0) 70%);
}
.hero__content { padding-top: 140px; padding-bottom: clamp(48px, 9vh, 96px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: currentColor; border-radius: 2px; }
.hero h1 { font-size: clamp(3.2rem, 9vw, 7.25rem); text-transform: uppercase; margin: 18px 0 20px; max-width: 12ch; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero__lead { font-size: clamp(1.1rem, 1.9vw, 1.35rem); color: #E2E8F0; max-width: 40rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__formats { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 40px 0 0; padding: 0; list-style: none; }
.hero__formats li {
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.95rem;
  padding: 6px 12px; border: 1px solid rgba(241,245,249,0.3); border-radius: 999px; color: var(--on); background: rgba(11,15,23,0.35);
}

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 11vw, 128px) 0; }
.section--light { background: var(--l-bg); color: var(--l-on); }
.section--light .eyebrow { color: var(--l-primary); }
.section--surface { background: var(--surface); }
.section__head { max-width: 46rem; margin-bottom: clamp(36px, 6vw, 56px); }
.section__head h2 { font-size: clamp(2.4rem, 5.5vw, 4rem); text-transform: uppercase; margin-top: 14px; }
.section__head p:not(.eyebrow) { margin-top: 16px; font-size: 1.15rem; color: var(--muted); }
.section--light .section__head p:not(.eyebrow) { color: var(--l-muted); }

/* ---------- Funcionalidades ---------- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.feature {
  background: var(--l-surface); border: 1px solid var(--l-outline); border-radius: var(--radius); padding: 28px 26px 30px;
  transition: border-color var(--motion), box-shadow var(--motion), transform var(--motion);
}
.feature:hover { border-color: #CBD5E1; box-shadow: 0 12px 30px -18px rgba(15, 23, 42, 0.35); transform: translateY(-2px); }
.feature__icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: #FEE2E2; color: var(--l-primary); margin-bottom: 20px;
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.65rem; text-transform: uppercase; }
.feature p { margin-top: 10px; color: var(--l-muted); }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* ---------- Formatos ---------- */
.formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.format {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 440px;
  display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; background: var(--surface-bright);
}
.format picture, .format img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.format img { transition: transform 600ms ease-out; }
.format:hover img { transform: scale(1.04); }
.format::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,15,23,0.05) 20%, rgba(11,15,23,0.92) 72%); }
.format__body { padding: 24px 22px 26px; }
.format__tag { font-family: var(--font-display); font-weight: 700; color: var(--primary); letter-spacing: 0.12em; font-size: 0.95rem; }
.format h3 { font-size: 2rem; text-transform: uppercase; margin-top: 4px; }
.format p { margin-top: 10px; color: #E2E8F0; font-size: 0.98rem; }
@media (max-width: 1080px) { .formats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .format { min-height: 400px; } }
@media (max-width: 560px) { .formats { grid-template-columns: 1fr; } .format { min-height: 360px; } }

/* ---------- Leaderboard ---------- */
.live { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.live__copy .section__head { margin-bottom: 28px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: #E2E8F0; }
.checks svg { width: 22px; height: 22px; color: var(--primary); flex: none; margin-top: 1px; }
.board {
  background: var(--surface); border: 1px solid var(--outline); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7);
}
.board__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--outline); }
.board__title { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; text-transform: uppercase; }
.board__sub { color: var(--muted); font-size: 0.9rem; }
.live-dot { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.1em; font-size: 0.9rem; color: var(--primary); }
.live-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(248,113,113,0.6); } 100% { box-shadow: 0 0 0 10px rgba(248,113,113,0); } }
.board__tabs { display: flex; gap: 6px; padding: 12px 20px 0; flex-wrap: wrap; }
.board__tabs span { font-size: 0.85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface-bright); color: var(--muted); }
.board__tabs span[aria-current] { background: var(--primary-fill); color: #fff; }
.board ol { list-style: none; margin: 0; padding: 12px 12px 14px; display: grid; gap: 6px; }
.row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-bright); }
.pos { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; background: #0B0F17; color: var(--on); }
.row--1 .pos { background: var(--gold); color: var(--on-podium); }
.row--2 .pos { background: var(--silver); color: var(--on-podium); }
.row--3 .pos { background: var(--bronze); color: var(--on-podium); }
.who strong { display: block; font-weight: 600; }
.who small { color: var(--muted); font-size: 0.85rem; }
.pts { text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.pts small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.78rem; color: var(--muted); }
.board__note { padding: 0 20px 16px; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 900px) { .live { grid-template-columns: 1fr; } }

/* ---------- Cómo funciona ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { position: relative; padding: 30px 26px; border-radius: var(--radius); background: var(--l-surface); border: 1px solid var(--l-outline); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-weight: 700; font-size: 3.5rem; line-height: 1; color: var(--l-primary);
  display: block; margin-bottom: 14px;
}
.step h3 { font-size: 1.7rem; text-transform: uppercase; }
.step p { margin-top: 10px; color: var(--l-muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Roles ---------- */
.roles { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: stretch; }
.roles__media { position: relative; border-radius: 18px; overflow: hidden; min-height: 420px; }
.roles__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.role-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; align-content: center; }
.role { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 22px; border-radius: var(--radius); background: var(--surface-bright); border: 1px solid var(--outline); }
.role__icon { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: rgba(248,113,113,0.12); color: var(--primary); }
.role__icon svg { width: 28px; height: 28px; }
.role h3 { font-size: 1.6rem; text-transform: uppercase; }
.role p { margin-top: 6px; color: var(--muted); }
@media (max-width: 900px) { .roles { grid-template-columns: 1fr; } .roles__media { min-height: 300px; } }

/* ---------- Banda de foto ---------- */
.band { position: relative; isolation: isolate; padding: clamp(110px, 16vw, 200px) 0; text-align: center; overflow: hidden; }
.band picture, .band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,15,23,0.82), rgba(11,15,23,0.7) 50%, rgba(11,15,23,0.9)); }
.band blockquote { margin: 0 auto; max-width: 18ch; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(2.4rem, 6.5vw, 5rem); line-height: 1; }
.band blockquote em { font-style: normal; color: var(--primary); }

/* ---------- RoninBox ---------- */
.ecosystem { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.ecosystem__card { background: var(--l-surface); border: 1px solid var(--l-outline); border-radius: 18px; padding: clamp(26px, 4vw, 40px); }
.ecosystem__card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ecosystem__card li { display: flex; gap: 12px; color: var(--l-muted); }
.ecosystem__card li strong { color: var(--l-on); font-weight: 600; }
.ecosystem__card svg { width: 22px; height: 22px; color: var(--l-primary); flex: none; margin-top: 1px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-weight: 600; color: var(--l-primary); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-arrow svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .ecosystem { grid-template-columns: 1fr; } }

/* ---------- Contacto ---------- */
.contact { position: relative; isolation: isolate; overflow: hidden; }
.contact picture, .contact img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; z-index: -2; }
.contact::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11,15,23,0.96) 0%, rgba(11,15,23,0.85) 55%, rgba(11,15,23,0.55) 100%); }
.contact__inner { max-width: 44rem; }
.contact h2 { font-size: clamp(2.6rem, 6vw, 4.5rem); text-transform: uppercase; margin-top: 14px; }
.contact p { margin-top: 18px; font-size: 1.15rem; color: #E2E8F0; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.contact__mail { margin-top: 18px; color: var(--muted); font-size: 0.98rem; }
.contact__mail a { color: var(--on); font-weight: 600; }

/* ---------- Pie ---------- */
.footer { background: #070A10; border-top: 1px solid var(--outline); padding: 40px 0; color: var(--muted); font-size: 0.95rem; }
.footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--on); text-decoration: underline; text-underline-offset: 4px; }
.footer .brand span { font-size: 1.2rem; color: var(--on); }
.footer .brand img { width: 32px; height: 32px; }

/* ---------- Aparición al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease-out, transform 500ms ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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