/**
 * landing.css — Landing pública de AHAN (ahan-medical/index.html)
 *
 * Autocontenido (no depende de tokens.css): define sus propias variables
 * light/dark y reutiliza el gradiente de marca AHAN.
 * Compatible con js/theme-toggle.js  (data-theme en <html>, #btn-theme-toggle).
 */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --lp-font: "Kanit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lp-brand-gradient: linear-gradient(135deg, #0080ff 0%, #7f00ff 60%, #ff00ff 100%);
  --lp-bg: #f3f4ff;
  --lp-surface: #ffffff;
  --lp-border: #d6d9e8;
  --lp-text: #060a18;
  --lp-muted: #5b6478;
  --lp-blue: #0080ff;
  --lp-blue-hover: #0166f8;
  --lp-shadow: 0 14px 34px rgba(24, 32, 90, 0.1);
  --lp-shadow-lg: 0 22px 50px rgba(24, 32, 90, 0.16);
  --lp-radius: 18px;
  --lp-radius-sm: 12px;
}

[data-theme="dark"] {
  --lp-bg: #0b0e1a;
  --lp-surface: #131a2b;
  --lp-border: #2a3142;
  --lp-text: #f3f4ff;
  --lp-muted: #9aa3b5;
  --lp-blue: #55aaff;
  --lp-blue-hover: #7abfff;
  --lp-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  --lp-shadow-lg: 0 22px 50px rgba(0, 0, 0, 0.55);
}

/* ─── Base ──────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--lp-font);
  background: var(--lp-bg);
  color: var(--lp-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
button {
  font-family: inherit;
}
.lp-container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* ─── Header ────────────────────────────────────────────────── */
.lp-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--lp-surface) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lp-border);
}
.lp-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lp-gap, 16px);
  min-height: 68px;
  padding: 10px 0;
}
.lp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.lp-brand__img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.lp-brand__name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lp-brand__sub {
  font-size: 0.78rem;
  color: var(--lp-muted);
  font-weight: 300;
  letter-spacing: 0.04em;
}
.lp-header__nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.lp-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lp-nav a {
  text-decoration: none;
  color: var(--lp-muted);
  font-size: 0.95rem;
  font-weight: 400;
  transition: color 160ms ease;
}
.lp-nav a:hover {
  color: var(--lp-text);
}
.lp-btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--lp-border);
  border-radius: 50%;
  background: var(--lp-surface);
  cursor: pointer;
  padding: 0;
}
.lp-btn-toggle img {
  width: 18px;
  height: 18px;
}
/* Un solo ícono por tema: sol en oscuro, luna en claro (sin depender del JS) */
.lp-btn-toggle .icon-sol,
.lp-btn-toggle .icon-luna {
  display: block;
}
[data-theme="light"] .lp-btn-toggle .icon-sol {
  display: none;
}
[data-theme="dark"] .lp-btn-toggle .icon-luna {
  display: none;
}
.lp-header__cta {
  margin-left: 4px;
}

/* ─── Botones ───────────────────────────────────────────────── */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 26px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
  line-height: 1;
}
.lp-btn--primary {
  background: var(--lp-brand-gradient);
  color: #fff;
  box-shadow: 0 8px 20px rgba(127, 0, 255, 0.35);
}
.lp-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(127, 0, 255, 0.45);
}
.lp-btn--ghost {
  border-color: var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-text);
}
.lp-btn--ghost:hover {
  transform: translateY(-2px);
  border-color: var(--lp-blue);
  color: var(--lp-blue);
}
.lp-btn--block {
  width: 100%;
}
.lp-btn[disabled],
.lp-btn--disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Hero ──────────────────────────────────────────────────── */
.lp-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 90px);
  text-align: center;
}
.lp-hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 32%,
    rgba(0, 128, 255, 0.2),
    rgba(127, 0, 255, 0.15) 42%,
    rgba(255, 0, 255, 0.06) 62%,
    transparent 78%
  );
  pointer-events: none;
}
.lp-hero__content {
  position: relative;
}
.lp-hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--lp-blue);
  border: 1px solid var(--lp-border);
  background: color-mix(in srgb, var(--lp-surface) 70%, transparent);
  border-radius: 999px;
  padding: 7px 16px;
}
.lp-hero__chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lp-brand-gradient);
}
.lp-hero__title {
  font-size: clamp(2.1rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 22px auto 18px;
  max-width: 18ch;
}
.lp-hero__title em {
  font-style: normal;
  background: var(--lp-brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: var(--lp-muted);
  max-width: 54ch;
  margin: 0 auto 30px;
}
.lp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.lp-hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px;
  margin-top: 44px;
  color: var(--lp-muted);
  font-size: 0.9rem;
}
.lp-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lp-hero__meta svg {
  color: var(--lp-blue);
}

/* ─── Secciones ─────────────────────────────────────────────── */
.lp-section {
  padding: clamp(52px, 7vw, 88px) 0;
}
.lp-section__head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 42px;
}
.lp-section__label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lp-blue);
}
.lp-section__title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 10px 0 8px;
  letter-spacing: -0.01em;
}
.lp-section__desc {
  color: var(--lp-muted);
  font-size: 1rem;
}
.lp-section--alt {
  background: var(--lp-surface);
  border-block: 1px solid var(--lp-border);
}

/* ─── Por qué AHAN: tarjetas de beneficio ───────────────────── */
.lp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.lp-card {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  padding: 26px 24px;
  box-shadow: var(--lp-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}
.lp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--lp-shadow-lg);
}
.lp-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--lp-brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.lp-card__icon svg {
  width: 22px;
  height: 22px;
  color: #fff;
}
.lp-card__title {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0;
}
.lp-card__text {
  color: var(--lp-muted);
  font-size: 0.93rem;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.36s ease, opacity 0.36s ease, margin 0.36s ease;
}
/* Acordeón: al hover (o al abrirse por clic/touch) se despliega la descripción */
.lp-card:hover .lp-card__text,
.lp-card.is-open .lp-card__text {
  max-height: 260px;
  margin-top: 10px;
  opacity: 1;
}

/* ─── Productos ─────────────────────────────────────────────── */
.lp-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.lp-product {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg, 22px);
  overflow: hidden;
  box-shadow: var(--lp-shadow);
}
.lp-product--featured {
  border-color: transparent;
  background:
    linear-gradient(var(--lp-surface), var(--lp-surface)) padding-box,
    var(--lp-brand-gradient) border-box;
}
.lp-product__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 0;
}
.lp-product__badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--lp-brand-gradient);
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
}
.lp-product__badge--soon {
  background: var(--lp-border);
  color: var(--lp-muted);
}
.lp-product__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--lp-brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-product__icon svg {
  width: 23px;
  height: 23px;
  color: #fff;
}
.lp-product__body {
  flex: 1;
  padding: 18px 24px 6px;
}
.lp-product__name {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.lp-product__desc {
  color: var(--lp-muted);
  font-size: 0.95rem;
  margin: 0 0 16px;
}
.lp-product__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.lp-product__features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--lp-text);
}
.lp-product__features svg {
  width: 16px;
  height: 16px;
  color: var(--lp-blue);
  flex-shrink: 0;
  margin-top: 2px;
}
.lp-product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 24px 24px;
}

/* ─── Planes / precios ──────────────────────────────────────── */
.lp-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.lp-plan {
  display: flex;
  flex-direction: column;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  padding: 26px 24px;
  box-shadow: var(--lp-shadow);
  position: relative;
}
.lp-plan--popular {
  border-color: transparent;
  background:
    linear-gradient(var(--lp-surface), var(--lp-surface)) padding-box,
    var(--lp-brand-gradient) border-box;
  box-shadow: var(--lp-shadow-lg);
}
.lp-plan__tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--lp-brand-gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 14px;
  white-space: nowrap;
}
.lp-plan__name {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 12px;
}
.lp-plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.lp-plan__price b {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.lp-plan__price span {
  color: var(--lp-muted);
  font-size: 0.9rem;
}
.lp-plan__note {
  color: var(--lp-muted);
  font-size: 0.85rem;
  margin: 0 0 18px;
}
.lp-plan__features {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 10px;
  flex: 1;
}
.lp-plan__features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9rem;
}
.lp-plan__features svg {
  width: 16px;
  height: 16px;
  color: var(--lp-blue);
  flex-shrink: 0;
  margin-top: 2px;
}
.lp-plan__features li.is-muted {
  color: var(--lp-muted);
}
.lp-plan.is-selected {
  outline: 3px solid var(--lp-blue);
  outline-offset: 2px;
}
.lp-plans__foot {
  text-align: center;
  color: var(--lp-muted);
  font-size: 0.87rem;
  margin-top: 26px;
}

/* ─── CTA final ─────────────────────────────────────────────── */
.lp-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: var(--lp-radius);
  background: var(--lp-brand-gradient);
  color: #fff;
  padding: clamp(40px, 6vw, 68px) 28px;
}
.lp-cta h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 12px;
}
.lp-cta p {
  margin: 0 auto 26px;
  max-width: 46ch;
  opacity: 0.94;
}
.lp-cta .lp-btn--primary {
  background: #fff;
  color: #7f00ff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}
.lp-cta .lp-btn--primary:hover {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

/* ─── Footer ────────────────────────────────────────────────── */
.lp-footer {
  border-top: 1px solid var(--lp-border);
  padding: 30px 0 42px;
  color: var(--lp-muted);
  font-size: 0.85rem;
}
.lp-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.lp-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lp-footer__brand img {
  width: 26px;
  height: 26px;
}

/* ─── Accesibilidad ─────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--lp-blue);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 920px) {
  .lp-grid,
  .lp-plans {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
  .lp-products {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 700px) {
  .lp-nav {
    display: none;
  }
  .lp-header__inner {
    min-height: 60px;
  }
  .lp-brand__sub {
    display: none;
  }
  .lp-hero__meta {
    gap: 14px;
  }
  .lp-product__actions .lp-btn {
    width: 100%;
  }
}