/* Landing comercial — tema claro de docs/marca.md.
   Tokens exactos del documento; el lima es acento, no fondo dominante. */

.landing {
  --nexo-bg: #F2F3EE;
  --nexo-surface: #FFFFFF;
  --nexo-ink: #101418;
  --nexo-muted: #55606A;
  --nexo-line: #D5DAD0;
  --nexo-accent: #C7F04A;
  --nexo-accent-ink: #101418;
  --nexo-accent-strong: #5F7A00;
  --nexo-alert: #C63A1E;
  --nexo-ok: #1F7A4D;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: Inter, system-ui, sans-serif;

  min-height: 100vh;
  background: var(--nexo-bg);
  color: var(--nexo-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

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

.landing h1,
.landing h2,
.landing h3,
.landing p {
  margin: 0;
}

.landing a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Botones ---------- */

.landing .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.landing .btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.landing .btn-lg {
  min-height: 50px;
  padding: 0 26px;
  font-size: 16px;
}

.landing .btn-block {
  width: 100%;
}

.landing .btn-primary {
  background: var(--nexo-accent);
  color: var(--nexo-accent-ink);
  border-color: var(--nexo-accent);
}

.landing .btn-primary:hover:not(:disabled) {
  background: #d4f95c;
}

.landing .btn-outline {
  background: transparent;
  color: var(--nexo-ink);
  border-color: var(--nexo-ink);
}

.landing .btn-outline:hover:not(:disabled) {
  background: rgba(16, 20, 24, 0.05);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--nexo-surface);
  border-bottom: 1px solid var(--nexo-line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 16px;
}

.landing .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.landing .brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--nexo-accent);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18);
}

.landing .brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 500;
}

/* Mobile: los enlaces de sección se ocultan; "Iniciar sesión" queda visible. */
.site-nav a {
  display: none;
}

.site-nav a:hover {
  color: var(--nexo-accent-strong);
}

.site-nav-login {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: var(--nexo-ink);
  cursor: pointer;
}

.site-nav-login:hover {
  color: var(--nexo-accent-strong);
}

.btn-demo {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

/* Acceso por subdominio, plegable bajo el header. */

.site-login {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px 14px;
  border-top: 1px solid var(--nexo-line);
  background: var(--nexo-surface);
}

.site-login[hidden] {
  display: none;
}

.site-login-form {
  display: grid;
  gap: 6px;
}

.site-login-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--nexo-muted);
}

.site-login-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-login-row input {
  width: 160px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--nexo-line);
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
}

.site-login-suffix {
  font-size: 15px;
  color: var(--nexo-muted);
}

.site-login-help {
  font-size: 13px;
  color: var(--nexo-muted);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  gap: 32px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 16px 48px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 10vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.hero-title em {
  font-style: normal;
  color: var(--nexo-accent-strong);
}

.hero-sub {
  max-width: 46ch;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--nexo-muted);
}

.hero-cta {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.hero-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--nexo-muted);
}

.hero-preview {
  display: grid;
  justify-items: center;
}

.story-frame {
  width: min(100%, 316px);
  margin: 0;
  padding: 10px;
  border: 1px solid var(--nexo-line);
  border-radius: 22px;
  background: var(--nexo-surface);
}

.story-frame img,
.story-frame-media {
  aspect-ratio: 9 / 16;
}

.story-frame-media {
  overflow: hidden;
  border-radius: 14px;
  background: var(--nexo-bg);
}

.story-frame-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.story-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--nexo-muted);
}

.story-caption-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nexo-accent-strong);
}

/* ---------- Secciones ---------- */

.section-head {
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.section-sub {
  margin-top: 10px;
  color: var(--nexo-muted);
}

.steps {
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 16px;
}

.steps-grid {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--nexo-line);
  border-radius: 12px;
  background: var(--nexo-surface);
}

.step-number {
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--nexo-line);
}

.step-media {
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid var(--nexo-line);
  border-radius: 10px;
  background: var(--nexo-bg);
  overflow: hidden;
}

/* La story se muestra completa (9:16), sin recortar texto. */
.step-media img {
  display: block;
  height: 300px;
  width: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border-radius: 8px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.step-text {
  color: var(--nexo-muted);
  line-height: 1.55;
}

/* ---------- Precio ---------- */

.pricing {
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 16px 64px;
}

.price-card {
  display: grid;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
  padding: 26px;
  border: 2px solid var(--nexo-ink);
  border-radius: 12px;
  background: var(--nexo-surface);
}

.price-amount {
  font-family: var(--font-display);
  font-size: clamp(44px, 9vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}

.price-currency {
  margin-right: 4px;
}

.price-period {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--nexo-muted);
}

.price-trial {
  margin-top: 8px;
  padding: 4px 10px;
  border: 1px solid var(--nexo-accent-strong);
  border-radius: 999px;
  width: fit-content;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--nexo-accent-strong);
}

.price-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--nexo-muted);
}

.price-list li {
  position: relative;
  padding-left: 22px;
  line-height: 1.45;
}

.price-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--nexo-accent);
}

.price-list strong {
  color: var(--nexo-ink);
}

.price-cta {
  display: grid;
  gap: 10px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--nexo-ink);
  color: rgba(243, 245, 242, 0.92);
  padding: 36px 16px 44px;
}

.site-footer-inner {
  display: grid;
  gap: 24px;
  max-width: 1160px;
  margin: 0 auto;
}

.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-footer .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-footer-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-footer-by {
  font-size: 13.5px;
  color: rgba(243, 245, 242, 0.66);
}

.site-footer-by a {
  color: var(--nexo-accent);
}

.site-footer-links {
  display: grid;
  gap: 8px;
  font-size: 15px;
}

.site-footer-links a:hover {
  color: var(--nexo-accent);
}

.site-footer-label {
  margin-bottom: 4px;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(243, 245, 242, 0.55);
}

.site-footer-contact a {
  font-size: 15px;
  color: var(--nexo-accent);
}

/* ---------- Modal de alta ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 20, 24, 0.55);
}

.modal-card {
  position: relative;
  width: min(100%, 540px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 26px 22px 28px;
  border: 1px solid var(--nexo-line);
  border-radius: 12px;
  background: var(--nexo-surface);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--nexo-muted);
  font-size: 16px;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(16, 20, 24, 0.06);
  color: var(--nexo-ink);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.modal-sub {
  margin-top: 8px;
  color: var(--nexo-muted);
}

/* El atributo hidden debe ganar siempre sobre .modal-success { display: grid };
   sin esto el bloque de éxito queda visible bajo el formulario al abrir el modal. */
.modal-body[hidden] {
  display: none;
}

.register-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.register-form .field {
  display: grid;
  gap: 6px;
}

.field-row {
  display: grid;
  gap: 16px;
}

.register-form .field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--nexo-ink);
}

.field-optional {
  font-weight: 400;
  color: var(--nexo-muted);
}

.register-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--nexo-line);
  border-radius: 8px;
  background: var(--nexo-bg);
  color: var(--nexo-ink);
  font: inherit;
  font-size: 15px;
}

.register-form input:focus {
  border-color: var(--nexo-accent-strong);
  outline: 2px solid var(--nexo-accent);
  outline-offset: 1px;
}

.field-hint {
  font-size: 12.5px;
  color: var(--nexo-muted);
}

.slug-input {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--nexo-line);
  border-radius: 8px;
  background: var(--nexo-bg);
  overflow: hidden;
}

.slug-input:focus-within {
  border-color: var(--nexo-accent-strong);
  outline: 2px solid var(--nexo-accent);
  outline-offset: 1px;
}

.slug-prefix,
.slug-suffix {
  flex: none;
  padding: 0 10px;
  font-size: 14px;
  color: var(--nexo-muted);
  background: rgba(16, 20, 24, 0.04);
  line-height: 44px;
}

.slug-input input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
}

.slug-input input:focus {
  outline: none;
}

.slug-status {
  min-height: 18px;
  font-size: 13px;
  color: var(--nexo-muted);
}

.slug-status.is-ok {
  color: var(--nexo-ok);
  font-weight: 600;
}

.slug-status.is-bad {
  color: var(--nexo-alert);
  font-weight: 600;
}

.form-error {
  padding: 10px 12px;
  border: 1px solid var(--nexo-alert);
  border-radius: 8px;
  background: rgba(198, 58, 30, 0.08);
  color: var(--nexo-alert);
  font-size: 14px;
  font-weight: 500;
}

.form-error[hidden] {
  display: none;
}

/* Éxito */

.modal-success {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--nexo-accent);
  color: var(--nexo-accent-ink);
  font-size: 22px;
  font-weight: 700;
}

.success-box {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--nexo-line);
  border-radius: 10px;
  background: var(--nexo-bg);
}

.success-label {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nexo-muted);
}

.success-url {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--nexo-accent-strong);
  word-break: break-all;
}

.success-note {
  font-size: 14px;
  color: var(--nexo-muted);
}

/* ---------- Responsive ---------- */

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .hero-cta {
    grid-auto-flow: column;
    justify-content: start;
  }
}

@media (min-width: 900px) {
  .site-nav a {
    display: inline;
  }

  .site-header-inner {
    padding: 16px 24px;
  }

  .btn-demo {
    min-height: 44px;
    font-size: 15px;
  }

  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 48px;
    padding: 72px 24px 80px;
  }

  .hero-cta {
    margin-top: 30px;
  }

  .steps {
    padding: 72px 24px;
  }

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .step-media img {
    height: 330px;
  }

  .pricing {
    padding: 72px 24px 88px;
  }

  .price-card {
    padding: 34px 32px;
  }

  .site-footer-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 48px;
  }

  .site-footer-links {
    grid-auto-flow: column;
    justify-content: center;
    gap: 28px;
  }
}

/* ---------- Accesibilidad ---------- */

@media (prefers-reduced-motion: reduce) {
  .landing * {
    transition: none !important;
    animation: none !important;
  }
}
