/* Página de inicio de helpnora.com. Solo variables de brand/tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--font-display); }
p { margin: 0; }
.mono { font-family: var(--font-mono); }

/* Idioma: se muestra solo el texto del idioma activo. */
[data-lang="es"] [data-en], [data-lang="en"] [data-es] { display: none; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Bandas oscuras: teal profundo en claro; en modo oscuro, teal suave para no deslumbrar. */
:root { --band-bg: var(--teal-deep); --band-ink: var(--on-teal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --band-bg: var(--teal-soft); --band-ink: var(--ink); } }
:root[data-theme="dark"] { --band-bg: var(--teal-soft); --band-ink: var(--ink); }

/* ---------- Portada ---------- */
.hero-band { position: relative; overflow: hidden; background: var(--band-bg); color: var(--band-ink); }
.watermark { position: absolute; width: 560px; height: 560px; right: -120px; bottom: -200px; color: var(--band-ink); opacity: .06; pointer-events: none; }
.topbar {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  max-width: 1160px; margin: 0 auto; padding: var(--space-6) var(--space-6) 0;
}
.logo { height: 32px; display: block; }
.lang { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--band-ink) 12%, transparent); }
.lang button {
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; color: inherit; opacity: .75;
  background: none; border: 0; border-radius: var(--radius-full); padding: 4px 12px;
}
.lang button[aria-pressed="true"] { opacity: 1; background: var(--band-ink); color: var(--band-bg); }
.lang button:focus-visible, .btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.hero {
  position: relative; max-width: 1160px; margin: 0 auto; padding: var(--space-8) var(--space-6) 96px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-6); }
.eyebrow {
  align-self: flex-start; display: inline-flex; align-items: center; gap: var(--space-2); padding: 5px 14px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: color-mix(in srgb, var(--band-ink) 12%, transparent);
}
.eyebrow i { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--amber); }
.hero h1 { color: inherit; font-size: clamp(36px, 5vw, 56px); line-height: 1.08; letter-spacing: -0.015em; }
.lead { font-size: 18px; line-height: 28px; opacity: .88; max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }

/* Ilustración: lo que ve el equipo (dashboard) y lo que ve el cliente (su caso). */
.hero-art { position: relative; min-height: 340px; }
.art-card {
  position: absolute; border-radius: var(--radius-lg); padding: var(--space-4);
  box-shadow: 0 24px 60px color-mix(in srgb, var(--ink) 30%, transparent);
}
.art-dash {
  top: 0; left: 0; width: min(100%, 380px); color: var(--band-ink);
  background: color-mix(in srgb, var(--band-ink) 10%, var(--band-bg)); border: 1px solid color-mix(in srgb, var(--band-ink) 18%, transparent);
}
.art-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .7; margin-bottom: var(--space-3); }
.art-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin-bottom: var(--space-3); }
.art-kpis div { display: flex; flex-direction: column; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: color-mix(in srgb, var(--band-ink) 9%, transparent); }
.art-kpis b { font-family: var(--font-display); font-size: 24px; line-height: 30px; }
.art-kpis span { font-size: 11px; opacity: .8; }
.art-kpis .hot b { color: var(--amber); }
.art-chart { width: 100%; height: 70px; display: block; }
.art-chart rect { fill: color-mix(in srgb, var(--band-ink) 32%, transparent); }
.art-chart rect.hi { fill: var(--amber); }
.art-case {
  right: 0; bottom: 0; width: min(92%, 340px); background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line);
}
.art-case-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--teal); }
.pill { padding: 2px 10px; border-radius: var(--radius-full); font-size: 12px; background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.art-case-title { margin: var(--space-2) 0 var(--space-3); font-weight: 600; }
.art-steps { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.art-steps i { flex: 1; height: 6px; border-radius: var(--radius-full); background: var(--teal); }
.art-steps i.ok { background: var(--success); }
.art-reply { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--surface); font-size: 13px; }
.avatar { width: 24px; height: 24px; border-radius: var(--radius-full); display: grid; place-items: center; background: var(--teal); color: var(--on-teal); font-size: 12px; font-weight: 700; flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 48px; padding: 0 var(--space-6);
  border-radius: var(--radius-md); font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s, background-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-light { background: var(--band-ink); color: var(--band-bg); box-shadow: 0 10px 24px color-mix(in srgb, var(--ink) 25%, transparent); }
.btn-ghost { color: var(--band-ink); border: 1.5px solid color-mix(in srgb, var(--band-ink) 45%, transparent); }
.btn-ghost:hover { background: color-mix(in srgb, var(--band-ink) 10%, transparent); }
.btn-primary { background: var(--teal); color: var(--on-teal); }
.btn-primary:hover { background: var(--teal-deep); }
.btn-dark { background: var(--band-bg); color: var(--band-ink); }

/* ---------- Contenido ---------- */
main {
  flex: 1; max-width: 1160px; width: 100%; margin: 0 auto;
  padding: 0 var(--space-6) 72px; display: flex; flex-direction: column; gap: 72px;
}

/* Funciones: tarjeta que se monta sobre la portada. */
.features {
  margin-top: -48px; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px color-mix(in srgb, var(--ink) 10%, transparent);
}
.feature { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6); }
.feature { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.feature:nth-child(4n+1) { border-left: 0; }
.feature:nth-child(-n+4) { border-top: 0; }
.feature strong { font-size: 15px; }
.feature p { font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.f-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); margin-bottom: var(--space-1); }
.f-icon.amber { background: var(--amber-soft); color: var(--ink); }

/* Portales: cabecera de color como en cada login (claro = clientes, oscuro = equipo). */
.portals { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.portal { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface-raised); display: flex; flex-direction: column; }
.portal-top { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-6) var(--space-8); }
.portal-client .portal-top { background: var(--teal-soft); }
.portal-team .portal-top { background: var(--band-bg); color: var(--band-ink); }
.portal-team .portal-top h2 { color: inherit; }
.p-icon { width: 52px; height: 52px; border-radius: var(--radius-lg); display: grid; place-items: center; flex: none; background: var(--surface-raised); color: var(--teal); }
.portal-team .p-icon { background: color-mix(in srgb, var(--band-ink) 14%, transparent); color: var(--band-ink); }
.p-icon .ic { width: 26px; height: 26px; }
.portal h2 { font-size: 22px; line-height: 30px; }
.who { font-size: 14px; opacity: .85; }
.portal-body { padding: var(--space-6) var(--space-8) var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); flex: 1; }
.portal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); color: var(--ink); }
.portal li { display: flex; gap: var(--space-3); align-items: flex-start; }
.portal li .ic { color: var(--success); margin-top: 1px; }
.portal .btn { margin-top: auto; align-self: flex-start; }

/* Cómo entrar */
.how { display: flex; flex-direction: column; gap: var(--space-6); }
.how h2 { font-size: 28px; line-height: 36px; text-align: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); counter-reset: s; position: relative; }
.steps li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: 0 var(--space-4); position: relative; }
.steps li + li::before {
  content: ""; position: absolute; top: 24px; left: calc(-50% + 32px); width: calc(100% - 64px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.num {
  width: 48px; height: 48px; border-radius: var(--radius-full); display: grid; place-items: center; margin-bottom: var(--space-2);
  font-family: var(--font-display); font-size: 20px; font-weight: 700; background: var(--teal); color: var(--on-teal);
  box-shadow: 0 0 0 6px var(--teal-soft);
}
.steps li:last-child .num { background: var(--amber); color: var(--on-amber); box-shadow: 0 0 0 6px var(--amber-soft); }
.steps p { color: var(--ink-muted); font-size: 14px; line-height: 21px; }

/* Contacto */
.contact {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap;
  padding: var(--space-8); border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--teal-soft), color-mix(in srgb, var(--amber-soft) 70%, var(--teal-soft)));
}
.contact h2 { font-size: 24px; line-height: 32px; margin-bottom: var(--space-2); }
.contact p { color: var(--ink-muted); max-width: 560px; }

/* ---------- Pie ---------- */
.footer { background: var(--band-bg); color: var(--band-ink); }
.footer-inner {
  max-width: 1160px; margin: 0 auto; padding: var(--space-8) var(--space-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; font-size: 14px;
}
.footer nav { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.footer a { color: inherit; opacity: .85; text-decoration: none; }
.footer a:hover { opacity: 1; text-decoration: underline; }
.copy { opacity: .7; }

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-bottom: 80px; gap: var(--space-8); }
  .hero-art { min-height: 300px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { border-left: 1px solid var(--line) !important; border-top: 1px solid var(--line) !important; }
  .feature:nth-child(2n+1) { border-left: 0 !important; }
  .feature:nth-child(-n+2) { border-top: 0 !important; }
  .portals { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar, .hero, main, .footer-inner { padding-left: var(--space-4); padding-right: var(--space-4); }
  .hero-copy { padding-top: 0; }
  .lead { font-size: 16px; line-height: 24px; }
  .cta .btn { flex: 1 1 100%; }
  .hero-art { min-height: 360px; }
  .art-dash { width: 100%; }
  .art-case { width: 88%; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .feature { border-left: 0 !important; border-top: 1px solid var(--line) !important; }
  .feature:first-child { border-top: 0 !important; }
  .portal-top, .portal-body { padding-left: var(--space-6); padding-right: var(--space-6); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li + li::before { display: none; }
  .contact { padding: var(--space-6); }
  .contact .btn { width: 100%; }
  .contact-actions { width: 100%; }
  main { gap: 56px; }
}

/* WhatsApp: verde propio de la marca de WhatsApp solo en su botón. */
.contact-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.btn-whatsapp { background: #25D366; color: #073b1f; border-color: transparent; }
.btn-whatsapp:hover { background: #1ebe5b; }
