/* Página principal de Korly (korly.com.mx). Paleta y tipografías son las mismas de la app (frontend/src/index.css). */
:root {
  --hero: #122420;
  --hero-2: #0b1614;
  --ivory: #f6f4ef;
  --white: #ffffff;
  --ink: #14211e;
  --muted: #5d6f6a;
  --primary: #167f6c;
  --primary-dark: #146155;
  --mint: #eaf5f1;
  --border: #d7e8e3;
  --gold: #feb816;
  --gold-dark: #f89c1b;
  --hero-muted: #8fbbae;
  --radius: 20px;
  --font-display: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Work Sans', ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--primary);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.02em;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}
.narrow {
  width: min(760px, 100% - 40px);
}
.center {
  text-align: center;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-gold {
  background: var(--gold);
  color: #3b2a00;
}
.btn-gold:hover {
  background: #ffc43d;
}
.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-ghost:hover {
  border-color: #fff;
}
.btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-outline:hover {
  border-color: #fff;
}
.btn-lg {
  padding: 14px 26px;
  font-size: 16.5px;
}

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--hero) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
}
.main-nav {
  display: flex;
  gap: 26px;
}
.main-nav a {
  color: var(--hero-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.main-nav a:hover {
  color: #fff;
}
.header-actions {
  display: flex;
  gap: 10px;
}

/* ---------- Héroe ---------- */
.hero {
  position: relative;
  overflow: clip;
  min-height: clamp(680px, 46vw, 940px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(47, 174, 147, 0.22), transparent 60%),
    radial-gradient(700px 420px at 5% 95%, rgba(254, 184, 22, 0.1), transparent 60%),
    var(--hero);
  color: #fff;
  padding-block: 64px 80px;
}
.hero-grid {
  position: relative;
  z-index: 7;
}
.hero-copy {
  max-width: 520px;
}
.eyebrow {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 800;
}
.hl {
  color: var(--gold);
}
.lead {
  margin-top: 20px;
  font-size: clamp(17px, 2vw, 20px);
  color: #cfe6df;
  max-width: 34em;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.center-row {
  justify-content: center;
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  color: var(--hero-muted);
  font-size: 14.5px;
}
.hero-points li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  margin-right: 8px;
}

/* ---------- Escena ilustrada del héroe ---------- */
/* escena:inicio */
/* Escena ilustrada (login de la app y héroe de korly.com.mx). Fuente única: landing/herramientas/escena/, generada con generar-escena.mjs. */
.arte {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
  cursor: crosshair;
}
.arte-capa {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.arte-color {
  --c-bg: #14302a;
  --c-d1: #0a1613;
  --c-d2: #0f241f;
  --c-d3: #17342d;
  --c-d4: #1f4a40;
  --c-teal: #167f6c;
  --c-teal2: #47a67c;
  --c-mint: #9fe3cf;
  --c-gold: #feb816;
  --c-gold2: #f89c1b;
  --c-white: #ffffff;
  --c-cream: #f3f0e6;
  --c-bun: #f0bd72;
  --c-bun2: #d99a4a;
  --c-coral: #ee6a52;
  --c-coral2: #c94a36;
  --c-skin: #f0b38d;
  --c-skin2: #d9916a;
  --c-pig: #aab9b4;
  --c-pig2: #7f948e;
  --c-soft1: rgba(71, 166, 124, 0.2);
  --c-soft2: rgba(254, 184, 22, 0.13);
  --c-soft3: rgba(159, 227, 207, 0.1);
  --c-anillo: #47a67c;
  --c-anillo-pista: #24493f;
  --c-t-d: #0a1613;
  --c-t-c: #ee6a52;
  --c-t-w: #ffffff;
  --c-t-m: #feb816;
  --c-txt: #ffffff;
  --c-txt-m: #8fbbae;
  --c-linea: rgba(255, 255, 255, 0.12);
  --line: none;
  --sw: 0;
}
/* Capa de contornos: se ve solo por donde "pasó el cursor" (la máscara la escribe el script en --mascara). */
.arte-contornos {
  --c-bg: none;
  --c-d1: none;
  --c-d2: none;
  --c-d3: none;
  --c-d4: none;
  --c-teal: none;
  --c-teal2: none;
  --c-mint: none;
  --c-gold: none;
  --c-gold2: none;
  --c-white: none;
  --c-cream: none;
  --c-bun: none;
  --c-bun2: none;
  --c-coral: none;
  --c-coral2: none;
  --c-skin: none;
  --c-skin2: none;
  --c-pig: none;
  --c-pig2: none;
  --c-soft1: none;
  --c-soft2: none;
  --c-soft3: none;
  --c-anillo: var(--line);
  --c-anillo-pista: var(--line);
  --c-t-d: var(--line);
  --c-t-c: var(--line);
  --c-t-w: var(--line);
  --c-t-m: var(--line);
  --c-txt: none;
  --c-txt-m: none;
  --c-linea: var(--line);
  --line: #7fe3cb;
  --sw: 2.4;
  background:
    radial-gradient(60% 50% at 30% 25%, rgba(47, 174, 147, 0.5), transparent 70%),
    radial-gradient(55% 45% at 75% 80%, rgba(254, 184, 22, 0.32), transparent 70%),
    #0a1613;
  -webkit-mask-image: var(--mascara, linear-gradient(transparent, transparent));
  mask-image: var(--mascara, linear-gradient(transparent, transparent));
  animation: korly-cambia-color 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes korly-cambia-color {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(-125deg);
  }
}

:is(.arte, .arte-saliente) .k-bg,
:is(.arte, .arte-saliente) .k-d1,
:is(.arte, .arte-saliente) .k-d2,
:is(.arte, .arte-saliente) .k-d3,
:is(.arte, .arte-saliente) .k-d4,
:is(.arte, .arte-saliente) .k-teal,
:is(.arte, .arte-saliente) .k-teal2,
:is(.arte, .arte-saliente) .k-mint,
:is(.arte, .arte-saliente) .k-gold,
:is(.arte, .arte-saliente) .k-gold2,
:is(.arte, .arte-saliente) .k-white,
:is(.arte, .arte-saliente) .k-cream,
:is(.arte, .arte-saliente) .k-bun,
:is(.arte, .arte-saliente) .k-bun2,
:is(.arte, .arte-saliente) .k-coral,
:is(.arte, .arte-saliente) .k-coral2,
:is(.arte, .arte-saliente) .k-skin,
:is(.arte, .arte-saliente) .k-skin2,
:is(.arte, .arte-saliente) .k-pig,
:is(.arte, .arte-saliente) .k-pig2,
:is(.arte, .arte-saliente) .k-soft1,
:is(.arte, .arte-saliente) .k-soft2,
:is(.arte, .arte-saliente) .k-soft3,
:is(.arte, .arte-saliente) .k-anillo,
:is(.arte, .arte-saliente) .k-anillo-pista,
:is(.arte, .arte-saliente) .k-linea,
:is(.arte, .arte-saliente) .k-t-d,
:is(.arte, .arte-saliente) .k-t-c,
:is(.arte, .arte-saliente) .k-t-w,
:is(.arte, .arte-saliente) .k-t-m {
  stroke: var(--line);
  stroke-width: var(--sw);
  stroke-linejoin: round;
}
:is(.arte, .arte-saliente) .k-bg {
  fill: var(--c-bg);
}
:is(.arte, .arte-saliente) .k-d1 {
  fill: var(--c-d1);
}
:is(.arte, .arte-saliente) .k-d2 {
  fill: var(--c-d2);
}
:is(.arte, .arte-saliente) .k-d3 {
  fill: var(--c-d3);
}
:is(.arte, .arte-saliente) .k-d4 {
  fill: var(--c-d4);
}
:is(.arte, .arte-saliente) .k-teal {
  fill: var(--c-teal);
}
:is(.arte, .arte-saliente) .k-teal2 {
  fill: var(--c-teal2);
}
:is(.arte, .arte-saliente) .k-mint {
  fill: var(--c-mint);
}
:is(.arte, .arte-saliente) .k-gold {
  fill: var(--c-gold);
}
:is(.arte, .arte-saliente) .k-gold2 {
  fill: var(--c-gold2);
}
:is(.arte, .arte-saliente) .k-white {
  fill: var(--c-white);
}
:is(.arte, .arte-saliente) .k-cream {
  fill: var(--c-cream);
}
:is(.arte, .arte-saliente) .k-bun {
  fill: var(--c-bun);
}
:is(.arte, .arte-saliente) .k-bun2 {
  fill: var(--c-bun2);
}
:is(.arte, .arte-saliente) .k-coral {
  fill: var(--c-coral);
}
:is(.arte, .arte-saliente) .k-coral2 {
  fill: var(--c-coral2);
}
:is(.arte, .arte-saliente) .k-skin {
  fill: var(--c-skin);
}
:is(.arte, .arte-saliente) .k-skin2 {
  fill: var(--c-skin2);
}
:is(.arte, .arte-saliente) .k-pig {
  fill: var(--c-pig);
}
:is(.arte, .arte-saliente) .k-pig2 {
  fill: var(--c-pig2);
}
:is(.arte, .arte-saliente) .k-soft1 {
  fill: var(--c-soft1);
}
:is(.arte, .arte-saliente) .k-soft2 {
  fill: var(--c-soft2);
}
:is(.arte, .arte-saliente) .k-soft3 {
  fill: var(--c-soft3);
}
:is(.arte, .arte-saliente) .k-linea {
  fill: var(--c-linea);
}
:is(.arte, .arte-saliente) .k-anillo,
:is(.arte, .arte-saliente) .k-anillo-pista {
  fill: none;
  stroke-width: 12;
}
:is(.arte, .arte-saliente) .k-anillo {
  stroke: var(--c-anillo);
  stroke-linecap: round;
  stroke-dasharray: 202 289;
}
:is(.arte, .arte-saliente) .k-anillo-pista {
  stroke: var(--c-anillo-pista);
}
.arte-contornos .k-anillo,
.arte-contornos .k-anillo-pista {
  stroke-width: 2.4;
}
:is(.arte, .arte-saliente) .k-t-d,
:is(.arte, .arte-saliente) .k-t-c,
:is(.arte, .arte-saliente) .k-t-w,
:is(.arte, .arte-saliente) .k-t-m {
  fill: none;
  stroke-linecap: round;
  stroke-width: 3.2;
}
:is(.arte, .arte-saliente) .k-t-d {
  stroke: var(--c-t-d);
}
:is(.arte, .arte-saliente) .k-t-c {
  stroke: var(--c-t-c);
}
:is(.arte, .arte-saliente) .k-t-w {
  stroke: var(--c-t-w);
}
:is(.arte, .arte-saliente) .k-t-m {
  stroke: var(--c-t-m);
  stroke-width: 7;
}
.arte-contornos .k-t-m {
  stroke-width: 3;
}
:is(.arte, .arte-saliente) .k-txt,
:is(.arte, .arte-saliente) .k-txt-m,
:is(.arte, .arte-saliente) .k-txt-s,
:is(.arte, .arte-saliente) .k-txt-o {
  font-family: var(--font-display);
  stroke: var(--line);
  stroke-width: calc(var(--sw) * 0.35);
}
:is(.arte, .arte-saliente) .k-txt {
  fill: var(--c-txt);
  font-weight: 800;
}
:is(.arte, .arte-saliente) .k-txt-s {
  fill: var(--c-txt);
  font-weight: 600;
}
:is(.arte, .arte-saliente) .k-txt-m {
  fill: var(--c-txt-m);
  font-weight: 500;
}
:is(.arte, .arte-saliente) .k-txt-o {
  fill: var(--c-gold2);
  font-weight: 800;
}
.arte-color .k-txt-o {
  fill: #7a4a00;
}

/* Movimiento suave de los personajes y objetos (se apaga con "reducir movimiento"). */
:is(.arte, .arte-saliente) .flota {
  animation: korly-flota 6s ease-in-out infinite;
}
:is(.arte, .arte-saliente) .flota-b {
  animation-duration: 7.5s;
  animation-delay: -2s;
}
:is(.arte, .arte-saliente) .flota-c {
  animation-duration: 5s;
  animation-delay: -3.5s;
}
:is(.arte, .arte-saliente) .asoma {
  animation: korly-asoma 4.5s ease-in-out infinite;
}
:is(.arte, .arte-saliente) .brilla {
  transform-box: fill-box;
  transform-origin: center;
  animation: korly-brilla 3.2s ease-in-out infinite;
}
:is(.arte, .arte-saliente) .brilla-b {
  animation-delay: -1.4s;
}
:is(.arte, .arte-saliente) .llama {
  transform-box: fill-box;
  transform-origin: right center;
  animation: korly-llama 0.35s ease-in-out infinite alternate;
}
@keyframes korly-flota {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
}
@keyframes korly-asoma {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}
@keyframes korly-brilla {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
@keyframes korly-llama {
  from {
    transform: scaleX(0.85);
  }
  to {
    transform: scaleX(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .arte-contornos {
    animation: none;
    display: none;
  }
  .arte .flota,
  .arte .flota-b,
  .arte .flota-c,
  .arte .asoma,
  .arte .brilla,
  .arte .llama {
    animation: none;
  }
}
/* escena:fin */
.hero > .arte {
  inset: 0 0 0 auto;
  width: 50%;
}
.arte-saliente {
  position: absolute;
  width: 300px;
  height: auto;
  overflow: visible;
  pointer-events: none;
  z-index: 6;
}
/* Cruzan la raya (la mitad del héroe) hacia el lado del texto; miran hacia allá. */
.saliente-arriba {
  top: 6px;
  width: 270px;
  left: calc(50% - 190px);
  transform: scaleX(-1);
}
.saliente-abajo {
  bottom: 22px;
  left: calc(50% - 125px);
}

/* ---------- Secciones ---------- */
.section {
  padding-block: 84px;
}
.section.alt {
  background: var(--mint);
}
.section h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
}
.sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
}
.sub-left {
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
}
.problem p {
  margin-top: 18px;
  font-size: 19px;
  color: var(--muted);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 44px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.step-n {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold);
  color: #3b2a00;
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 16px;
}
.step h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.step p {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}
.card p {
  color: var(--muted);
  font-size: 15.5px;
}

.privacy {
  background: var(--hero);
  color: #fff;
}
.privacy .sub-left {
  color: var(--hero-muted);
}
.privacy-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}
.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.checks li {
  position: relative;
  padding-left: 32px;
}
.checks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  color: #3b2a00;
  font-size: 13px;
  font-weight: 800;
}
.checks.small {
  gap: 10px;
  font-size: 15.5px;
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 44px;
  max-width: 860px;
  margin-inline: auto;
}
.plan {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan h3 {
  font-size: 24px;
}
.plan-tag {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.plan .btn {
  margin-top: auto;
  align-self: flex-start;
}
.plan-pro {
  background: var(--hero);
  color: #fff;
  border-color: var(--hero);
}
.plan-pro .plan-tag {
  color: var(--gold);
}
.note {
  margin-top: auto;
  color: var(--hero-muted);
  font-size: 14px;
}

.faq {
  margin-top: 36px;
  display: grid;
  gap: 12px;
}
.faq details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px 20px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  color: var(--primary);
  font-size: 22px;
  line-height: 1;
}
.faq details[open] summary::after {
  content: '–';
}
.faq details p {
  padding-bottom: 18px;
  color: var(--muted);
}

.final {
  background:
    radial-gradient(700px 360px at 50% 120%, rgba(254, 184, 22, 0.18), transparent 60%),
    var(--hero);
  color: #fff;
  padding-block: 84px;
}
.final h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
}
.final p {
  margin-top: 12px;
  color: var(--hero-muted);
  font-size: 18px;
}

.site-footer {
  background: var(--hero-2);
  color: var(--hero-muted);
  padding-block: 30px;
  font-size: 14.5px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
}
.footer-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-row a {
  color: var(--hero-muted);
}
.footer-row a:hover {
  color: #fff;
}

/* ---------- Aparición al desplazarse ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Pantallas chicas ---------- */
@media (max-width: 900px) {
  .hero {
    display: block;
    min-height: 0;
    padding-bottom: 0;
  }
  .hero-copy {
    max-width: none;
  }
  .hero > .arte {
    position: relative;
    inset: auto;
    width: 100%;
    height: 440px;
    margin-top: 44px;
  }
  .arte-saliente {
    display: none;
  }
  .main-nav {
    display: none;
  }
  .steps,
  .grid,
  .privacy-grid,
  .plans {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .header-actions .btn-ghost {
    display: none;
  }
  .section {
    padding-block: 60px;
  }
  .hero {
    padding-block: 40px 56px;
  }
  .btn-lg {
    width: 100%;
  }
}

/* Quien prefiere menos movimiento ve el dibujo quieto y el contenido sin aparecer poco a poco. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn {
    transition: none;
  }
}

/* Que el encabezado fijo no tape el título al saltar a una sección. */
section[id] {
  scroll-margin-top: 70px;
}

/* Marca: ícono de Korly + nombre en blanco (los logos completos tienen el nombre en verde oscuro y no se leen sobre fondo oscuro). */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img {
  border-radius: 10px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: #fff;
}
.brand-small .brand-name {
  font-size: 19px;
}
