/* ============================================================
   HV Análisis — Design System (web pública)
   Estética: oscura, profesional, precisa. Sin ruido.
   ============================================================ */

:root {
  --bg: #0b0d10;
  --bg-elevated: #11141a;
  --surface: #161a22;
  --surface-hover: #1c212b;
  --border: #272e3a;
  --border-strong: #3a4452;

  --text: #eef1f6;
  --text-dim: #a9b1bd;
  --text-muted: #6f7785;

  --accent: #e8b84a;
  --accent-hover: #f2c96a;
  --accent-ink: #141005;
  --bronze: #c17a45;
  --green: #6ba87a;
  --red: #d16060;
  --blue: #6fa8dc;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "Share Tech Mono", "Consolas", "Courier New", monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --maxw: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 90% 40% at 50% -8%, rgba(232, 184, 74, 0.08), transparent 60%),
    linear-gradient(180deg, #0d0f13 0%, var(--bg) 40%, #07090c 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: min(var(--maxw), 92vw);
  margin: 0 auto;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ── Header / Nav ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  font-size: 1.05rem;
}

.brand .dot {
  color: var(--accent);
  font-size: 1.3rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-links .btn {
  margin-left: 0.4rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

/* ── Botones ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

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

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn.large {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
}

.btn.block {
  width: 100%;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  padding: 5.5rem 0 4rem;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.12;
  margin: 1.4rem 0 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .lead {
  margin: 1.2rem auto 0;
  max-width: 60ch;
  color: var(--text-dim);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.hero .version-strip {
  margin-top: 2.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero .version-strip b {
  color: var(--text-dim);
  font-weight: 400;
}

/* ── Secciones genéricas ──────────────────────────────────── */

.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 2.6rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}

.section-header p {
  color: var(--text-dim);
  margin: 0;
}

.section-header .kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ── Tarjetas (features) ──────────────────────────────────── */

.grid {
  display: grid;
  gap: 1.1rem;
}

.grid.features {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  background: var(--surface-hover);
}

.card .icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.8rem;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ── Badges de estado ─────────────────────────────────────── */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border-strong);
}

.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.beta {
  color: var(--accent);
  border-color: rgba(232, 184, 74, 0.4);
}

.status-badge.stable {
  color: var(--green);
  border-color: rgba(107, 168, 122, 0.4);
}

.status-badge.testers {
  color: var(--blue);
  border-color: rgba(111, 168, 220, 0.4);
}

/* ── Panel de descarga / versiones ────────────────────────── */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.version-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.version-item .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.version-item .value {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 600;
}

.version-item .value.mono {
  font-family: var(--font-mono);
  font-weight: 400;
}

/* ── Changelog ────────────────────────────────────────────── */

.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.changelog-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
}

.changelog-item .ch-version {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.changelog-item h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.15rem;
}

.changelog-item .ch-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.changelog-item ul {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-dim);
}

.changelog-item li {
  margin: 0.3rem 0;
}

/* ── FAQ / Soporte ────────────────────────────────────────── */

details.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 0.7rem;
}

details.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  outline: none;
}

details.faq summary::before {
  content: "+";
  display: inline-block;
  width: 1.2rem;
  color: var(--accent);
}

details.faq[open] summary::before {
  content: "−";
}

details.faq p {
  margin: 0.7rem 0 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.faq-title {
  font-size: 1.15rem;
  margin: 2.2rem 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* ── Formularios ──────────────────────────────────────────── */

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form .field {
  display: flex;
  flex-direction: column;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Formularios simples (auth) sin clase .form */
form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  margin: 1.1rem 0 0.35rem;
}

form input[type="text"],
form input[type="email"],
form input[type="password"] {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
}

form input:focus {
  outline: none;
  border-color: var(--accent);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.3rem 0 0;
}

.form-msg {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
}

.form-msg.error {
  background: rgba(209, 96, 96, 0.12);
  border: 1px solid rgba(209, 96, 96, 0.4);
  color: #f0b6b6;
}

.form-msg.ok {
  background: rgba(107, 168, 122, 0.12);
  border: 1px solid rgba(107, 168, 122, 0.4);
  color: #b6e0c0;
}

/* ── Auth layout (login / registro / cuenta) ──────────────── */

.auth-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 3rem;
}

.auth-card {
  width: min(430px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  box-shadow: var(--shadow);
}

.auth-links {
  margin-top: 1.6rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-dim);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.account-list {
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.account-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.6rem;
  align-items: baseline;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.7rem;
}

.account-list dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.account-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

/* ── Componentes de contenido ─────────────────────────────── */

.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.page-head {
  padding-bottom: 0.5rem;
}

.page-head h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  margin: 0.2rem 0 0.8rem;
}

.page-head .lead {
  color: var(--text-dim);
}

.dim {
  color: var(--text-dim);
}

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(232, 184, 74, 0.4);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:hover {
  color: var(--accent-hover);
}

ul.checks {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

ul.checks li {
  position: relative;
  padding-left: 1.5rem;
  margin: 0.35rem 0;
  color: var(--text-dim);
}

ul.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
}

/* Novedades (landing) */
.news-item {
  padding: 1.1rem 0;
  border-bottom: 1px dashed var(--border);
}

.news-item:last-child {
  border-bottom: none;
}

.news-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.4rem;
}

.news-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

/* Changelog */
.release-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.release h2 {
  margin: 0;
  font-size: 1.4rem;
}

.release h3 {
  margin: 0.2rem 0 0.2rem;
  font-size: 1.05rem;
  color: var(--text-dim);
}

/* Descarga */
.download-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
}

.download-info {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
}

.dl-meta div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dl-meta .dim {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

ol.steps {
  margin: 0.4rem 0 0;
  padding-left: 1.3rem;
  color: var(--text-dim);
}

ol.steps li {
  margin: 0.45rem 0;
}

/* Botones extra */
.btn.full {
  width: 100%;
}

.btn.danger {
  border-color: rgba(209, 96, 96, 0.5);
  color: var(--red);
}

.btn.danger:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ── Alertas / estado ─────────────────────────────────────── */

.alert {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  margin: 0.8rem 0 0;
}

.alert.error {
  background: rgba(209, 96, 96, 0.12);
  border: 1px solid rgba(209, 96, 96, 0.4);
  color: #f0b6b6;
}

.alert.ok {
  background: rgba(107, 168, 122, 0.12);
  border: 1px solid rgba(107, 168, 122, 0.4);
  color: #b6e0c0;
}

.alert.info {
  background: rgba(111, 168, 220, 0.1);
  border: 1px solid rgba(111, 168, 220, 0.35);
  color: #bcd9f0;
}

.hidden {
  display: none !important;
}

/* ── Auth layout ──────────────────────────────────────────── */

.auth-wrap {
  max-width: 430px;
  margin: 0 auto;
  padding: 4rem 0;
}

.auth-wrap h1 {
  font-size: 1.6rem;
  margin: 0 0 0.3rem;
}

.auth-wrap .sub {
  color: var(--text-dim);
  margin: 0 0 1.6rem;
}

.auth-alt {
  margin-top: 1.4rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-dim);
}

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 2.6rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin: 0.35rem 0;
}

.footer-grid a {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ── Utilidades ───────────────────────────────────────────── */

.center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1rem 1rem;
    gap: 0.2rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-sm);
  }

  .nav-toggle {
    display: block;
  }
}

@media (max-width: 520px) {
  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .panel {
    padding: 1.4rem;
  }
}
