/*
 * Sistema de diseño de la web de HarmonFlow (el mismo que la app):
 * superficies planas, bordes sutiles, un único verde de marca y contraste WCAG AA.
 * Tema oscuro por defecto; si el sistema está en modo claro, toda la web pasa a claro.
 */
:root {
  color-scheme: dark light;
  --bg: #0b0f17;
  --surface: #1e293b;
  --surface-2: #111827;      /* tonal, un paso por encima del fondo */
  --line: #334155;
  --ink: #f8fafc;            /* texto principal (≥ 7:1) */
  --muted: #94a3b8;          /* texto secundario (≥ 4,5:1) */
  --muted-strong: #cbd5e1;   /* secundario sobre superficies */
  --accent: #10b981;         /* verde de marca (botones, barras, iconos) */
  --accent-ink: #0b0f17;     /* texto sobre el verde (7,6:1) */
  --accent-text: #34d399;    /* enlaces y textos en verde sobre el fondo */
  --accent-soft: rgba(16, 185, 129, .12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .10);
  --warn-soft: rgba(148, 163, 184, .10);
  --radius: 16px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --line: #e2e8f0;
    --ink: #0f172a;
    --muted: #64748b;
    --muted-strong: #475569;
    --accent-text: #047857;
    --accent-soft: rgba(16, 185, 129, .10);
    --danger: #b91c1c;
    --danger-soft: rgba(185, 28, 28, .06);
    --warn-soft: rgba(100, 116, 139, .08);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body.landing {
  margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.landing img { max-width: 100%; display: block; }
.landing a { color: var(--accent-text); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Accesibilidad: foco visible, salto al contenido y menos movimiento si se pide */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 12px; }
.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; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------- Barra superior (fija, translúcida) ---------------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink) !important; text-decoration: none; font-weight: 800; font-size: 19px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.topbar nav { display: flex; gap: 6px; align-items: center; font-size: 15px; }
.topbar nav a { color: var(--muted-strong); text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.topbar nav a:hover { color: var(--ink); background: var(--surface); }
.topbar .lang { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }

/* ---------------- Portada ---------------- */
.hero { padding: 72px 0 0; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; }
.hero .copy { padding-bottom: 80px; }
.eyebrow { display: inline-block; color: var(--accent-text); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.hero h1 { font-size: clamp(36px, 6vw, 58px); line-height: 1.05; margin: 12px 0 18px; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero p.lead { font-size: 19px; color: var(--muted-strong); max-width: 34em; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-l {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 13px 22px;
  font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit;
  min-height: 48px; transition: background .15s, border-color .15s;
}
.landing a.btn-l.primary, .btn-l.primary { background: var(--accent); color: var(--accent-ink); }
.btn-l.primary:hover { background: #34d399; }
.landing a.btn-l.ghost, .btn-l.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-l.ghost:hover { background: var(--surface); }
/* Insignias de tienda: negras en los dos temas (como las oficiales), mismo alto y ancho */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.landing .store-badge {
  position: relative; display: inline-flex; align-items: center; gap: 11px; box-sizing: border-box;
  height: 52px; width: 222px; justify-content: center; padding: 0 16px; border-radius: 12px;
  background: #000; border: 1px solid rgba(255, 255, 255, .2); color: #fff; text-decoration: none;
  font-family: inherit; line-height: 1.1; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.landing a.store-badge:hover, .landing a.store-badge:focus-visible {
  border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(16, 185, 129, .45);
}
.landing .store-badge svg { flex: none; width: 24px; height: 26px; }
.landing .store-badge .sb-play { stroke: none; }
.landing .store-badge .sb-phone { fill: none; stroke: #e2e8f0; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.sb-small { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.sb-big { font-size: 18px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
/* iOS: deshabilitado (la atenuación va en el contenido para que el aviso se lea entero) */
.landing .store-badge.is-soon { cursor: not-allowed; border-color: rgba(255, 255, 255, .12); }
.store-badge.is-soon > svg, .store-badge.is-soon > .sb-text { opacity: .6; }
.store-badge.is-soon .sb-big { font-size: 16px; }
.sb-tip {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); z-index: 5;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.store-badge.is-soon:hover .sb-tip, .store-badge.is-soon:focus-visible .sb-tip { opacity: 1; transform: translate(-50%, 0); }
.final .store-badges { justify-content: center; margin: 22px 0 26px; }
.final h2 + .store-badges { margin-top: 18px; }
.card .store-badges { justify-content: center; margin-top: 4px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-size: 14px; color: var(--muted-strong); }
.trust span::before { content: "✓"; color: var(--accent-text); font-weight: 800; margin-right: 6px; }

/* ---------------- Secciones (mismo fondo en toda la página: sin cortes) ---------------- */
section.block { padding: 88px 0; border-top: 1px solid var(--line); }
section.block.alt { background: transparent; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 8px 0 12px; letter-spacing: -.01em; }
.section-head p { color: var(--muted-strong); font-size: 18px; margin: 0; }

/* Tarjetas de ventajas y pasos */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile, .step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tile .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-size: 20px; margin-bottom: 14px; }
.tile h4, .step h4 { margin: 0 0 6px; font-size: 18px; }
.tile p, .step p { margin: 0; color: var(--muted-strong); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step::before {
  counter-increment: step; content: counter(step); display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; margin-bottom: 14px;
}

/* Cierre: tarjeta, no franja de otro color */
.final { padding: 0 0 88px; }
.final .wrap > .final-card, .final .final-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 56px 24px; text-align: center; }
.final img.logo { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 18px; }
.final h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 10px; }
.final p { color: var(--muted-strong); font-size: 18px; margin: 0 0 26px; }
.final .cta { justify-content: center; }

/* ---------------- Pie ---------------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 56px 0 28px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer .about img { width: 36px; height: 36px; border-radius: 9px; margin-bottom: 12px; }
.site-footer .about p { margin: 0; max-width: 26em; line-height: 1.6; }
.site-footer h5 { color: var(--ink); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 4px 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 9px; }
.landing .site-footer a { color: var(--muted-strong); text-decoration: none; }
.landing .site-footer a:hover { color: var(--ink); }
.site-footer .bottom { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

/* ---------------- Móvil ---------------- */
@media (max-width: 860px) {
  .topbar nav a:not(.lang) { display: none; }
  .hero { padding-top: 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 0; }
  .hero .copy { padding-bottom: 40px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .cta, .trust, .store-badges { justify-content: center; }
  section.block { padding: 64px 0; }
  .grid, .steps { grid-template-columns: 1fr; }
  .final { padding-bottom: 64px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .site-footer .about { grid-column: 1 / -1; }
  .site-footer .bottom { justify-content: center; text-align: center; }
}
@media (min-width: 861px) and (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
