/* ─────────────────────────────────────────────────────────────────────────
   Santiago Bus · sistema de buhhoapps.dev (Sora + JetBrains Mono, bordes
   finos, rejilla 960) con el acento propio de la app: amarillo #F7C600.
   El hero, en cambio, va en el verde de buhhoapps.dev.
   ───────────────────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg: #0d0f14;
  --bg-soft: #111318;
  --card: rgba(255, 255, 255, .03);
  --card-hover: rgba(247, 198, 0, .25);
  --border: rgba(255, 255, 255, .08);
  --border-faint: rgba(255, 255, 255, .06);
  --text: #e8eaf0;
  --text-bright: #f0f2f8;
  --text-dim: rgba(232, 234, 240, .5);
  --text-faint: rgba(232, 234, 240, .35);
  --surface: #14171e;
  --shadow: 0 14px 44px rgba(0, 0, 0, .45);
  --accent: #f7c600;
  --accent-soft: rgba(247, 198, 0, .08);
  --accent-border: rgba(247, 198, 0, .22);
  /* Acento para texto (logo, h1 em): en claro el amarillo no se lee, se oscurece */
  --accent-ink: #f7c600;
  --accent-ink-dim: rgba(247, 198, 0, .45);
  --on-accent: #1a1400;
  --link: #f7c600;
  /* La barra de arriba, en el verde de buhhoapps.dev */
  --nav-accent: #7eeea0;
  --nav-accent-dim: rgba(126, 238, 160, .4);
  --nav-accent-soft: rgba(126, 238, 160, .1);
  --font-body: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 960px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f8;
  --bg-soft: #ecedf0;
  --card: #ffffff;
  --card-hover: rgba(138, 106, 0, .3);
  --border: rgba(0, 0, 0, .12);
  --border-faint: rgba(0, 0, 0, .08);
  --text: #1a1d26;
  --text-bright: #0d0f14;
  --text-dim: rgba(26, 29, 38, .65);
  --text-faint: rgba(26, 29, 38, .5);
  --surface: #ffffff;
  --shadow: 0 10px 30px rgba(13, 15, 20, .07);
  --accent: #f7c600;
  --accent-soft: rgba(247, 198, 0, .18);
  --accent-border: rgba(138, 106, 0, .3);
  --accent-ink: #8a6a00;
  --accent-ink-dim: rgba(138, 106, 0, .55);
  --on-accent: #1a1400;
  --link: #7a5d00;
  --nav-accent: #0d9448;
  --nav-accent-dim: rgba(13, 148, 72, .55);
  --nav-accent-soft: rgba(13, 148, 72, .1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── Barra superior ───────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 2rem;
  border-bottom: .5px solid var(--border);
  background: color-mix(in srgb, var(--bg) 95%, transparent);
}
.logo {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: -.5px;
  color: var(--nav-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.logo:hover { text-decoration: none; }
.logo .logo-dim { color: var(--nav-accent-dim); font-weight: 400; }
.cursor {
  display: inline-block;
  width: 2px; height: 14px;
  background: var(--nav-accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.navlinks { display: flex; align-items: center; gap: 0; }
.navlink {
  font-size: 13px;
  color: var(--text-dim);
  padding: 0 14px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  text-decoration: none;
}
.navlink:hover { color: var(--nav-accent); text-decoration: none; }
.navlink.active { color: var(--nav-accent); border-bottom-color: var(--nav-accent); }
.menu-btn {
  margin-left: 8px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.menu-btn:hover { color: var(--nav-accent); background: var(--card); }

/* ── Diálogo de ajustes (el del ⋮, como en buhhoapps.dev) ─────────────────── */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: #00000080;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
  padding: 1rem;
}
.dialog-overlay[data-hidden] { display: none; }
.dialog {
  background: color-mix(in srgb, var(--bg) 92%, white);
  border: .5px solid var(--border);
  border-radius: 10px;
  width: 280px;
  max-width: 90vw;
  box-shadow: 0 8px 32px #0000004d;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: .5px solid var(--border);
}
.dialog-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.dialog-close {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  font-size: 16px;
}
.dialog-close:hover { color: var(--text); }
.dialog-section { padding: 12px 14px 16px; }
.dialog-section + .dialog-section { border-top: .5px solid var(--border-faint); }
.dialog-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.dialog-options { display: flex; gap: 6px; }
.dialog-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 6px;
  border: .5px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
  font-family: var(--font-body);
  font-size: 12px;
}
.dialog-option-full { width: 100%; }
.dialog-option-hint { font-size: 10px; color: var(--text-faint); margin-left: auto; }
.dialog-option:hover { border-color: var(--nav-accent-dim); color: var(--text); }
.dialog-option.active { border-color: var(--nav-accent); color: var(--nav-accent); background: var(--nav-accent-soft); }
.dialog-option-label { font-weight: 500; }
.dialog-option-code { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); margin-left: auto; }
.dialog-option.active .dialog-option-code,
.dialog-option.active .dialog-option-hint { color: var(--nav-accent-dim); }
.dialog-option-icon { font-size: 14px; line-height: 1; }

/* ── Estructura ───────────────────────────────────────────────────────────── */
.main { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; flex: 1; }

/* ── Héroe (centrado en tarjeta, como ranking.buhhoapps.dev) ──────────────── */
.hero-centered {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  border-bottom: .5px solid var(--border-faint);
}
.app-mark {
  display: block;
  width: 88px; height: 88px;
  margin: 0 auto 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.hero-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: .5px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow);
}
.hero-card h1 {
  font-size: 33px;
  line-height: 1.15;
  letter-spacing: -.9px;
  margin: 0 0 .5rem;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-dim);
  margin: 0 0 .85rem;
}
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  margin: 0 0 .9rem;
}
.hero-desc {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 460px;
  margin: 0 auto 1.75rem;
}
.hero-card .btn {
  display: flex;
  justify-content: center;
  padding: 14px 20px;
  font-size: 14px;
  border-radius: 10px;
}
.hero-card .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.hero-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: .5px solid var(--border-faint);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  font-size: 14px;
}
.hero-links a { color: var(--link); }

/* ── Héroe anterior (a la izquierda) ──────────────────────────────────────── */
.hero { padding: 3.5rem 0 2.5rem; border-bottom: .5px solid var(--border-faint); }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--accent);
  background: var(--accent-soft);
  border: .5px solid var(--accent-border);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 1.2rem;
}
:root[data-theme="light"] .tag { color: var(--accent-ink); }
h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.5px;
  margin: 0 0 .75rem;
  color: var(--text-bright);
}
h1 em { font-style: normal; color: var(--accent-ink); }
.sub { font-size: 14px; color: var(--text-dim); line-height: 1.65; max-width: 480px; margin: 0 0 1.5rem; }

.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  font-size: 12px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: .5px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: filter .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 500; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text-dim); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--card-hover); }

/* ── Ventajas ─────────────────────────────────────────────────────────────── */
.section { padding: 2.5rem 0 3rem; }
.section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card {
  background: var(--card);
  border: .5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.card .ico {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: .5px solid var(--accent-border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
}
:root[data-theme="light"] .card .ico { color: var(--accent-ink); }
.card h2 { font-size: 13px; font-weight: 600; margin: 0 0 4px; color: var(--text-bright); letter-spacing: -.1px; }
.card p { font-size: 12.5px; color: var(--text-dim); line-height: 1.55; margin: 0; }

/* ── Aviso de datos ───────────────────────────────────────────────────────── */
.note {
  font-size: 12px;
  color: var(--text-faint);
  border-left: 2px solid var(--accent-border);
  padding: 2px 0 2px 12px;
  margin: 0 0 2.5rem;
  max-width: 560px;
}

/* ── Pie ──────────────────────────────────────────────────────────────────── */
footer { border-top: .5px solid var(--border); padding: 2.5rem 2rem 1.75rem; }
.footer-top {
  max-width: var(--maxw);
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 2rem;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent-ink);
  letter-spacing: -.5px;
  margin-bottom: 10px;
}
.footer-logo .logo-dim { color: var(--accent-ink-dim); }
.footer-desc { font-size: 12px; color: var(--text-faint); line-height: 1.7; max-width: 260px; }
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-link { font-size: 13px; color: var(--text-dim); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.footer-link:hover { color: var(--accent); text-decoration: none; }
:root[data-theme="light"] .footer-link:hover { color: var(--accent); }
.footer-link .bullet { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: .7; flex-shrink: 0; }
.footer-bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: .5px solid var(--border-faint);
}
.footer-copy { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.footer-copy a { color: var(--text-dim); }
.footer-made { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

/* ── 404 ──────────────────────────────────────────────────────────────────── */
.notfound {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 56px - 120px);
  padding: 3rem 0;
}
.notfound h1 { max-width: none; }

/* ── Páginas de texto (privacidad) ────────────────────────────────────────── */
.prose { max-width: 720px; margin: 0 auto; padding: 2.5rem 0 4rem; }
.prose h1 { font-size: 28px; margin-bottom: 6px; max-width: none; }
.prose .updated { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-bottom: 2rem; }
.prose h2 { font-size: 15px; font-weight: 600; color: var(--text-bright); margin: 2.25rem 0 8px; letter-spacing: -.1px; }
.prose h3 { font-size: 13.5px; font-weight: 600; color: var(--text-bright); margin: 1.5rem 0 4px; }
.prose p, .prose li { font-size: 13.5px; color: var(--text-dim); line-height: 1.75; }
.prose p { margin: 0 0 12px; }
.prose ul { padding-left: 18px; margin: 0 0 12px; }
.prose li { margin: 5px 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--text);
}
.prose .box {
  background: var(--card);
  border: .5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 20px 0;
}
.prose .box p:last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 12.5px; }
.prose th, .prose td { text-align: left; padding: 9px 8px; border-bottom: .5px solid var(--border-faint); vertical-align: top; }
.prose th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
}
.prose td { color: var(--text-dim); }

/* ── Móvil ────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  .navlink { padding: 0 8px; font-size: 12px; }
  .main { padding: 0 1rem; }
  .hero { padding: 2.5rem 0 2rem; }
  h1 { font-size: 22px; }
  .hero-centered { padding: 2.5rem 0 2rem; }
  .app-mark { width: 72px; height: 72px; margin-bottom: 1.5rem; border-radius: 16px; }
  .hero-card { padding: 1.75rem 1.25rem; border-radius: 14px; }
  .hero-card h1 { font-size: 26px; }
  .hero-sub { font-size: 15px; }
  .hero-desc { font-size: 14px; }
  .hero-card .btn { font-size: 13px; padding: 13px 16px; }
  .hero-links { gap: 1.25rem; font-size: 13px; }
  .section { padding: 2rem 0 2.5rem; }
  footer { padding: 1.75rem 1rem 1.25rem; }
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .prose { padding: 2rem 0 3rem; }
  .prose h1 { font-size: 24px; }
}

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