/*
 * tapbar.es
 * Misma paleta y tipografías que la app: negro cálido, crema y un único acento naranja;
 * Barlow Condensed para titulares e Inter para el texto. Las fuentes se sirven desde
 * este dominio (sin Google Fonts) y no hay estilos en línea: lo exige la CSP de vercel.json.
 */

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

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

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --base: #0c0b0a;
  --raised: #171614;
  --line: #2a2724;
  --ink: #f5f1ea;
  --ink-soft: rgb(245 241 234 / 0.78);
  --muted: #8f887e;
  --pop: #ff6b3d;
  --pop-hover: #ff8259;
  --pop-soft: rgb(255 107 61 / 0.12);
  --headline: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  --max: 1200px;
  --radius: 20px;
  color-scheme: dark;
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 48px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
figcaption {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--pop);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--pop);
  color: var(--base);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgb(12 11 10 / 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: block;
  border-radius: 4px;
}

.brand img {
  width: auto;
  height: 22px;
}

@media (min-width: 640px) {
  .site-header .wrap {
    height: 72px;
  }

  .brand img {
    height: 26px;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.btn svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--pop);
  color: var(--base);
}

.btn-primary:hover {
  background: var(--pop-hover);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--muted);
}

.btn-small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9375rem;
}

/* ---------- Tipografía ---------- */

.eyebrow {
  color: var(--pop);
  font: 600 0.8125rem/1.3 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.display {
  font-family: var(--headline);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

/* El punto naranja del logotipo, también al final de los titulares */
.dot {
  color: var(--pop);
}

h2.display {
  font-size: clamp(2.5rem, 9vw, 4.5rem);
}

/* Partes de un titular que no se separan al saltar de línea */
.nowrap {
  white-space: nowrap;
}

.lead {
  max-width: 34em;
  color: var(--ink-soft);
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
}

.section-head {
  max-width: 760px;
}

.section-head > * + * {
  margin-top: 16px;
}

.section-head .lead {
  margin-top: 20px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 48px 72px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(640px 420px at 78% 42%, rgb(255 107 61 / 0.14), transparent 70%);
  pointer-events: none;
}

.hero .wrap {
  display: grid;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(3.25rem, 15.5vw, 7rem);
}

.hero h1 > span {
  display: block;
}

.hero .lead {
  margin-top: 24px;
}

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

.hero-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 960px) {
  .hero {
    padding-block: 96px 128px;
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 56px;
  }
}

@media (max-width: 479px) {
  .hero-actions .btn {
    width: 100%;
  }
}

/* Pantalla de sala (ilustración de la portada): igual que la TV de la app */

.screen-frame {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, #1d1b19, #121110);
  box-shadow:
    0 40px 120px -48px rgb(255 107 61 / 0.45),
    0 30px 60px -30px #000;
}

.screen {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

.screen-col {
  min-width: 0;
  padding: 16px 14px 18px;
}

@media (min-width: 560px) {
  .screen-col {
    padding: 20px 18px 22px;
  }
}

.screen-col + .screen-col {
  border-left: 1px solid var(--line);
}

.screen-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  font: 800 clamp(0.8rem, 3.2vw, 1.375rem) / 1 var(--headline);
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.screen-preparing .screen-title {
  color: var(--muted);
}

.screen-count {
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.codes {
  display: grid;
  gap: 0.06em;
  margin-top: 16px;
  font-family: var(--headline);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.codes li {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  transform-origin: left center;
}

.codes .hash {
  margin-right: 0.04em;
  font-size: 0.45em;
}

.codes-ready {
  color: var(--pop);
  font-size: clamp(2.25rem, 9vw, 3.5rem);
}

.codes-ready .hash {
  color: rgb(255 107 61 / 0.5);
}

.codes-preparing {
  color: rgb(245 241 234 / 0.75);
  font-size: clamp(1.625rem, 6.5vw, 2.5rem);
}

.codes-preparing .hash {
  color: var(--muted);
}

.codes-ready li.is-new {
  animation: pop-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.codes-preparing li.is-new {
  animation: fade-in 0.4s ease both;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.screen-figure figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

/* ---------- Secciones ---------- */

.section {
  padding-block: 72px;
  border-top: 1px solid var(--line);
}

@media (min-width: 960px) {
  .section {
    padding-block: 112px;
  }
}

/* Cómo funciona */

.steps {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 56px;
  }
}

.step {
  padding: 28px 24px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--raised);
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-num {
  color: var(--pop);
  font: 800 3rem/1 var(--headline);
}

.step-top svg {
  width: 28px;
  height: 28px;
  color: var(--muted);
}

.step h3 {
  margin-top: 28px;
  font: 800 1.75rem/1 var(--headline);
  text-transform: uppercase;
}

.step p {
  margin-top: 12px;
  color: var(--muted);
}

/* Beneficios */

.pillars {
  display: grid;
  gap: 48px;
  margin-top: 40px;
}

@media (min-width: 960px) {
  .pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    margin-top: 64px;
  }
}

.pillar-title {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font: 800 1.75rem/1 var(--headline);
  text-transform: uppercase;
}

.benefit {
  margin-top: 28px;
}

.benefit-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--pop-soft);
  color: var(--pop);
}

.benefit-icon svg {
  width: 22px;
  height: 22px;
}

.benefit h4 {
  margin-top: 16px;
  font: 600 1.125rem/1.35 var(--body);
}

.benefit p {
  margin-top: 8px;
  color: var(--muted);
}

/* A medida */

.custom {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .custom {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 64px;
  }
}

.checklist {
  display: grid;
  gap: 12px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--raised);
  font-weight: 500;
}

.checklist svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--pop);
}

/* Contacto */

.contact-card {
  position: relative;
  overflow: hidden;
  padding: 56px 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--raised);
  text-align: center;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(560px 300px at 50% 0%, rgb(255 107 61 / 0.16), transparent 70%);
  pointer-events: none;
}

.contact-card > * {
  position: relative;
}

.contact-card h2 {
  margin-top: 16px;
}

.contact-card .lead {
  margin: 20px auto 0;
  max-width: 30em;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

@media (min-width: 640px) {
  .contact-card {
    padding: 80px 40px;
  }
}

@media (max-width: 479px) {
  .contact-actions .btn {
    width: 100%;
  }
}

/* ---------- Pie ---------- */

.site-footer {
  padding-block: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: grid;
  gap: 24px;
}

@media (min-width: 820px) {
  .site-footer .wrap {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 40px;
  }
}

.footer-brand img {
  width: auto;
  height: 20px;
}

.footer-brand p {
  margin-top: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ---------- Páginas legales ---------- */

.legal {
  padding-block: 56px 96px;
}

.legal .wrap {
  max-width: calc(760px + 2 * var(--gutter));
}

.legal h1 {
  font-size: clamp(2.75rem, 11vw, 4.5rem);
}

.legal .updated {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.legal h2 {
  margin-top: 44px;
  font: 600 1.25rem/1.35 var(--body);
}

.legal p,
.legal li {
  margin-top: 12px;
  color: var(--ink-soft);
}

.legal ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.legal li::marker {
  color: var(--pop);
}

.legal dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: 16px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--raised);
}

.legal dt {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
}

.legal dt:first-child {
  margin-top: 0;
}

@media (min-width: 640px) {
  .legal dl {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 10px 24px;
  }

  .legal dt {
    margin-top: 0;
    font-size: 1rem;
  }
}

.legal a {
  color: var(--ink);
  text-decoration-color: var(--pop);
  text-underline-offset: 3px;
}

/* Datos que faltan por rellenar antes de publicar */
.pending {
  color: var(--pop);
  font-weight: 600;
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 220px);
  padding-block: 72px;
  text-align: center;
}

.not-found h1 {
  font-size: clamp(3rem, 14vw, 6rem);
}

.not-found p {
  margin-top: 16px;
  color: var(--muted);
}

.not-found .btn {
  margin-top: 32px;
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .codes li.is-new {
    animation: none;
  }

  .btn {
    transition: none;
  }
}
