/* =============================================================
   landing.css — web de presentación de GestionaYa (www.gestionaya.lat)
   Solo HTML + CSS: SIN JavaScript (la cookie csrf_token tiene Domain=.gestionaya.lat y es legible por JS;
   un script en este origen podría leerla). Sin recursos externos (la CSP es `default-src 'none'`).
   Los pares texto/fondo se declaran como variables --pair-* y los verifica landing-contract.test.ts (WCAG AA).
   ============================================================= */
:root {
  --bg: #ffffff;
  --bg-soft: #fff7ed;
  --text: #1c1917;
  --muted: #57534e;
  --brand: #c2410c;
  --brand-dark: #9a3412;
  --on-brand: #ffffff;
  --border: #e7e5e4;
  --accent-border: #fed7aa;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(28 25 23 / 6%), 0 8px 24px rgb(28 25 23 / 6%);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--brand-dark);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--brand-dark);
  color: var(--on-brand);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  left: 8px;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* ---------- Cabecera ---------- */
.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.topbar__row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand__name {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  text-align: center;
}

.btn--lg {
  padding: 13px 26px;
  font-size: 1.05rem;
}

.btn--primary {
  background: var(--brand);
  color: var(--on-brand);
}

.btn--primary:hover {
  background: var(--brand-dark);
}

.btn--ghost {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--bg-soft);
}

.btn--light {
  background: var(--bg);
  color: var(--brand-dark);
}

.btn--light:hover {
  background: var(--bg-soft);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--bg-soft), var(--bg) 70%);
  padding: 56px 0 64px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--accent-border);
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 14px;
}

.hero__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero__art svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 28px rgb(194 65 12 / 14%));
}

/* ---------- Secciones ---------- */
.section {
  padding: 64px 0;
}

.section--soft {
  background: var(--bg-soft);
}

.section__lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3 {
  color: var(--brand-dark);
}

.card p {
  margin: 0;
  color: var(--muted);
}

.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.step {
  background: var(--bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 24px;
}

.step__n {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.roadmap {
  border: 2px dashed var(--accent-border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--bg-soft);
}

.roadmap p {
  margin: 0;
  color: var(--muted);
  max-width: 42em;
}

/* ---------- Llamada a la acción final ---------- */
.cta {
  background: var(--brand-dark);
  color: var(--on-brand);
  padding: 44px 0;
}

.cta h2,
.cta p {
  color: var(--on-brand);
  margin: 0 0 4px;
}

.cta__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- Pie ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer__row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
}

.footer__brand {
  font-weight: 700;
  color: var(--text);
}

.footer__link {
  margin-left: auto;
}

/* ---------- Página 404 ---------- */
.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
}

/* ---------- Pares texto/fondo verificados por la prueba de contrato (WCAG AA, 4.5:1) ---------- */
:root {
  --pair-body: var(--text) var(--bg);
  --pair-muted: var(--muted) var(--bg);
  --pair-muted-soft: var(--muted) var(--bg-soft);
  --pair-btn: var(--on-brand) var(--brand);
  --pair-btn-hover: var(--on-brand) var(--brand-dark);
  --pair-link: var(--brand-dark) var(--bg);
  --pair-link-soft: var(--brand-dark) var(--bg-soft);
  --pair-cta: var(--on-brand) var(--brand-dark);
  --pair-cta-btn: var(--brand-dark) var(--bg);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .topbar__row {
    justify-content: space-between;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 36px 0 44px;
  }

  .section {
    padding: 44px 0;
  }
}

@media (max-width: 520px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .hero__actions .btn {
    width: 100%;
  }
}
