/* PrivaSteward — Landing Ley 21.719
 * Identidad preservada: Outfit (display) + Inter (body), azul #2c5282 de la app.
 * Registro: "software cívico de grado institucional" — calma, autoridad, levemente austero.
 * Estrategia de color: Restrained + un momento Drench (banda legal + sección contacto).
 */

:root {
  /* Tinta y neutros — tint del azul de marca, no warm-by-default. */
  --ps-ink:        #1a202c;   /* texto principal (darkened for contrast) */
  --ps-ink-soft:   oklch(0.35 0.025 250);   /* texto secundario (darkened for contrast) */
  --ps-ink-muted:  oklch(0.40 0.025 250);   /* metadata — L bajado para pasar WCAG AA 4.5 */
  --ps-line:       oklch(0.88 0.015 250);   /* divisores (darkened for better card separation) */
  --ps-bg:         #ffffff;  /* fondo general (pure white baseline) */
  --ps-surface:    #ffffff;            /* tarjetas (white to pop against tint) */
  --ps-tint:       #b9ccdf;   /* bandas suaves (darkened to contrast with surface) */

  /* Acento de marca (azul institucional) — convertido de #2c5282 a OKLCH. */
  --ps-accent:     #2c5282;
  --ps-accent-deep:oklch(0.34 0.13 254);
  --ps-accent-soft:oklch(0.92 0.05 254); /* (darkened and bluer for Modulo 05 contrast) */

  --ps-success:    oklch(0.55 0.13 150);

  /* Tipografía de la app. */
  --ps-font-display: 'Outfit', system-ui, sans-serif;
  --ps-font-body: 'Inter', system-ui, sans-serif;

  --ps-radius: 10px;
  --ps-radius-sm: 6px;

  --max: 1140px;
  --max-narrow: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--ps-font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ps-ink);
  background: var(--ps-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--ps-font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: var(--ps-accent); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: var(--max-narrow); }
.center { text-align: center; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ps-accent);
  color: white;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 var(--ps-radius-sm) 0;
}
.skip-link:focus { left: 0; color: white; }

/* ---------- Metricas (Resultados Cuantificados) ---------- */
.metrics-section {
  padding: clamp(48px, 6vw, 80px) 0;
  background-color: var(--ps-bg);
  border-bottom: 1px solid var(--ps-line);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.metric-card {
  background: var(--ps-surface);
  border: 1px solid var(--ps-line);
  padding: 32px;
  border-radius: var(--ps-radius);
  box-shadow: 0 10px 25px rgba(44, 82, 130, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(44, 82, 130, 0.12);
}
.metric-card h3 {
  font-family: var(--ps-font-display);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  color: var(--ps-accent);
  margin: 0 0 12px;
  line-height: 1.25;
}
.metric-card p {
  font-size: 16px;
  color: var(--ps-ink-soft);
  margin: 0;
  line-height: 1.5;
}

/* ---------- Comparación ---------- */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.compare-card {
  padding: 32px;
  border-radius: var(--ps-radius);
  border: 1px solid var(--ps-line);
}
.compare-before {
  background: var(--ps-surface);
  border-top: 4px solid oklch(0.6 0.15 25); /* rojo/naranja tenue */
}
.compare-after {
  background: var(--ps-tint);
  border-top: 4px solid var(--ps-accent);
  box-shadow: 0 10px 25px rgba(44, 82, 130, 0.08);
}
.compare-card h3 {
  font-family: var(--ps-font-display);
  font-size: 20px;
  margin: 0 0 20px;
  color: var(--ps-ink);
}
.compare-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.compare-list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--ps-ink-soft);
  line-height: 1.4;
}
.compare-list li::before {
  content: "×";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
  color: oklch(0.6 0.15 25);
  font-size: 18px;
}
.compare-after .compare-list li::before {
  content: "✓";
  color: var(--ps-accent);
}
@media (max-width: 760px) {
  .comparison-grid { grid-template-columns: 1fr; }
}

/* ---------- Layout de lectura (Prose) ---------- */
.btn {
  display: inline-block;
  font-family: var(--ps-font-display);
  font-weight: 500;
  font-size: 16px;
  padding: 13px 22px;
  border-radius: var(--ps-radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s ease-out;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-primary { background: var(--ps-accent); color: white; }
.btn-primary:hover { background: var(--ps-accent-deep); color: white; }
.btn-ghost { color: var(--ps-ink); border-color: var(--ps-line); background: transparent; }
.btn-ghost:hover { border-color: var(--ps-accent); color: var(--ps-accent); background: var(--ps-accent-soft); }
.btn-light { background: white; color: var(--ps-accent-deep); }
.btn-light:hover { background: oklch(0.97 0 0); color: var(--ps-accent-deep); }
.btn-light-ghost { color: white; border-color: oklch(0.7 0.04 254); background: transparent; }
.btn-light-ghost:hover { border-color: white; color: white; background: oklch(0.4 0.05 254); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.985 0.003 250 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ps-line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ps-ink); }
.brand-mark { display: flex; }
.brand-name {
  font-family: var(--ps-font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.site-nav a {
  color: var(--ps-ink-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--ps-accent); }
.header-inner .btn-sm { margin-left: 8px; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(24px, 4vw, 56px) 0 clamp(48px, 7vw, 80px);
  border-bottom: 1px solid var(--ps-line);
  background: radial-gradient(ellipse at top right, var(--ps-accent-soft) 0%, var(--ps-bg) 45%, var(--ps-tint) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.legal-kicker {
  display: inline-block;
  font-family: var(--ps-font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--ps-accent-deep);
  background: var(--ps-accent-soft);
  padding: 5px 12px;
  border-radius: 100px;
  margin: 0 0 20px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  font-weight: 700;
  margin: 0 0 20px;
  line-height: 1.08;
}
.emph { color: var(--ps-accent); font-style: normal; }
.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ps-ink-soft);
  margin: 0 0 28px;
  max-width: 52ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.hero-foot {
  font-size: 14px;
  color: var(--ps-ink-muted);
  margin: 0;
}
.hero-figure { position: relative; }
.fig-caption {
  font-size: 13px;
  color: var(--ps-ink-muted);
  margin: 12px 4px 0;
  font-style: italic;
}

/* ---------- Concepto 1A: Command Deck Glassmorphism ---------- */
.deck-wrapper {
  position: relative;
  width: 100%;
  padding: 10px 0 20px;
  perspective: 1000px;
}

.deck-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.deck-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 12px 32px rgba(44, 82, 130, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
  cursor: pointer;
  text-align: left;
}

.deck-card:nth-child(1) {
  transform: translateY(0px) scale(1);
  z-index: 3;
  animation: floatDeck1 6s ease-in-out infinite;
}

.deck-card:nth-child(2) {
  transform: translateY(-8px) scale(0.98);
  margin-top: -10px;
  z-index: 2;
  animation: floatDeck2 6s ease-in-out infinite 1.5s;
  background: rgba(248, 250, 252, 0.96);
}

.deck-card:nth-child(3) {
  transform: translateY(-16px) scale(0.96);
  margin-top: -10px;
  z-index: 1;
  animation: floatDeck3 6s ease-in-out infinite 3s;
  background: rgba(241, 245, 249, 0.96);
}

.deck-card:hover {
  transform: translateY(-10px) scale(1.02) !important;
  z-index: 10 !important;
  border-color: var(--ps-accent);
  box-shadow: 0 20px 45px rgba(44, 82, 130, 0.18), 0 0 0 2px rgba(44, 82, 130, 0.15);
}

@keyframes floatDeck1 {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-6px) scale(1); }
}

@keyframes floatDeck2 {
  0%, 100% { transform: translateY(-8px) scale(0.98); }
  50% { transform: translateY(-14px) scale(0.98); }
}

@keyframes floatDeck3 {
  0%, 100% { transform: translateY(-16px) scale(0.96); }
  50% { transform: translateY(-22px) scale(0.96); }
}

.deck-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.deck-card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deck-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--ps-accent-soft);
  color: var(--ps-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.deck-card-title {
  font-family: var(--ps-font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.deck-card-sub {
  font-size: 11.5px;
  color: #64748b;
  margin: 2px 0 0;
}

.deck-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.deck-card-body {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.deck-pill {
  font-size: 11.5px;
  background: #f1f5f9;
  color: #334155;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.deck-pill.highlight {
  background: var(--ps-accent-soft);
  color: var(--ps-accent-deep);
  border-color: #bee3f8;
  font-weight: 600;
}

/* ---------- Banda legal (Drench del color de marca) ---------- */
.legal-band {
  background: var(--ps-accent);
  color: white;
  padding: clamp(36px, 5vw, 56px) 0;
}
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.legal-cell { position: relative; }
.legal-cell + .legal-cell::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: oklch(1 0 0 / 0.2);
}
@media (max-width: 760px) {
  .legal-cell + .legal-cell::before { display: none; }
}
.legal-num {
  display: block;
  font-family: var(--ps-font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.legal-cell p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: oklch(0.95 0.02 254);
}

/* ---------- Secciones genéricas ---------- */
.section {
  padding: clamp(56px, 9vw, 110px) 0;
}
.section-tinted { background: var(--ps-tint); }
.section-head { margin-bottom: 48px; }
.section-h {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 700;
  margin: 0 0 16px;
}
.section-standfirst {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ps-ink-soft);
  margin: 0;
  max-width: 62ch;
}
.section-h-light { color: white; }
.section-standfirst-light {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: oklch(0.92 0.02 254);
  margin: 0 auto 32px;
  max-width: 56ch;
}

.prose { margin-top: 36px; }
.prose p { margin: 0 0 1.2em; color: var(--ps-ink-soft); max-width: 70ch; }
.prose em { color: var(--ps-ink); font-style: italic; }

/* ---------- Capabilities (peso editorial variado, no grid de cards idénticas) ---------- */
.capabilities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ps-line);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  overflow: hidden;
}
.capability {
  background: var(--ps-surface);
  padding: clamp(28px, 3.5vw, 40px);
}
/* Módulo de descubrimiento (5º): a ancho completo, fondo tintado para diferenciarlo
   como la capa complementaria sin romper el grid (anti card-idéntica). */
.capability-wide {
  grid-column: 1 / -1;
  background: var(--ps-accent-soft);
}
.capability-wide .cap-label { color: var(--ps-accent-deep); }
.cap-label {
  display: inline-block;
  font-family: var(--ps-font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--ps-accent-deep);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.capability h3 {
  font-size: 1.4rem;
  margin: 0 0 12px;
}
.capability p {
  color: var(--ps-ink-soft);
  margin: 0 0 18px;
  font-size: 16px;
}
.tick-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tick-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  color: var(--ps-ink);
  font-size: 15px;
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  background: var(--ps-accent-soft);
  border-radius: 50%;
}
.tick-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 11px;
  width: 6px;
  height: 3px;
  border-left: 1.5px solid var(--ps-accent);
  border-bottom: 1.5px solid var(--ps-accent);
  transform: rotate(-45deg);
}

/* ---------- Secuencia (real, ordenada, justificada) ---------- */
.sequence {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  counter-reset: seq;
}
.seq-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--ps-line);
}
.seq-item:last-child { border-bottom: 1px solid var(--ps-line); }
.seq-step {
  font-family: var(--ps-font-display);
  font-weight: 600;
  color: var(--ps-accent-deep);
  font-size: 14px;
  letter-spacing: 0.02em;
  padding-top: 4px;
}
.seq-item h3 {
  font-size: 1.25rem;
  margin: 0 0 8px;
}
.seq-item p {
  margin: 0;
  color: var(--ps-ink-soft);
  max-width: 60ch;
}

/* ---------- Audiencia ---------- */
.audience {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.audience-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  background: var(--ps-surface);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  box-shadow: 0 6px 16px rgba(44, 82, 130, 0.05);
}
.audience-cell strong {
  font-family: var(--ps-font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ps-ink);
}
.audience-cell span {
  color: var(--ps-ink-soft);
  font-size: 15px;
  line-height: 1.45;
}

/* ---------- FAQ ---------- */
.qa {
  border-top: 1px solid var(--ps-line);
  padding: 20px 0;
}
.qa:last-of-type { border-bottom: 1px solid var(--ps-line); }
.qa summary {
  font-family: var(--ps-font-display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ps-ink);
  cursor: pointer;
  list-style: none;
  padding-right: 32px;
  position: relative;
  transition: color 0.2s;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 24px;
  font-weight: 400;
  color: var(--ps-accent);
  transition: transform 0.2s;
}
.qa[open] summary::after { content: "−"; }
.qa summary:hover { color: var(--ps-accent); }
.qa p {
  margin: 14px 0 0;
  color: var(--ps-ink-soft);
  max-width: 70ch;
}

/* ---------- Contacto (segundo momento Drench) ---------- */
.section-contact {
  background: var(--ps-accent-deep);
  color: white;
  text-align: center;
}
.contact-form-wrapper {
  max-width: 500px;
  margin: 0 auto 32px;
  background: white;
  padding: 32px;
  border-radius: var(--ps-radius);
  color: var(--ps-ink);
  text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.contact-form .form-group {
  margin-bottom: 20px;
}
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ps-ink-soft);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ps-line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ps-ink);
  box-sizing: border-box;
}
.contact-form input:focus {
  outline: none;
  border-color: var(--ps-accent);
  box-shadow: 0 0 0 3px var(--ps-accent-soft);
}
.contact-form .radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-form .radio-group label {
  font-weight: 400;
  color: var(--ps-ink);
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.contact-form .form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}
.contact-form .form-actions .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}
/* Revertir estilos del botón .btn-light dentro del form blanco */
.contact-form .form-actions .btn-light {
  background: var(--ps-accent);
  color: white;
}
.contact-form .form-actions .btn-light:hover {
  background: var(--ps-accent-deep);
}
.contact-form .form-actions .btn-light-ghost {
  color: var(--ps-accent);
}
.contact-foot {
  color: oklch(0.85 0.03 254);
  font-size: 14px;
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: oklch(0.18 0.02 250);
  color: oklch(0.72 0.02 250);
  padding: 56px 0 36px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px 48px;
  align-items: start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-name {
  font-family: var(--ps-font-display);
  font-weight: 600;
  color: white;
  margin: 0;
  font-size: 16px;
}
.footer-tag {
  font-size: 13px;
  margin: 2px 0 0;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-end;
}
.footer-nav a {
  color: oklch(0.85 0.02 250);
  font-size: 14px;
  text-decoration: none;
}
.footer-nav a:hover { color: white; }
.footer-legal {
  grid-column: 1 / -1;
  border-top: 1px solid oklch(0.3 0.02 250);
  padding-top: 24px;
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: oklch(0.68 0.02 250);
  max-width: 80ch;
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .hero-figure img { height: 280px; }
  .capabilities { grid-template-columns: 1fr; }
  .seq-item { grid-template-columns: 1fr; gap: 6px; }
  .seq-step { padding-top: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .header-inner .btn-sm { margin-left: auto; }
  .section-h { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
}
