/* ==========================================================================
   IntegriQuality · Hoja de estilos única
   Color de acento: el mismo verde azulado de la app (--accent y --accent-hover; modo oscuro más abajo).
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Acento (único color de marca) */
  --accent: #0f766e;
  --accent-hover: #115e59;
  --on-accent: #ffffff;
  --link: #0f766e;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-soft-2: color-mix(in srgb, var(--accent) 18%, transparent);

  /* Superficies y texto */
  --bg: #ffffff;
  --bg-alt: #f2f7f6;
  --surface: #ffffff;
  --surface-2: #f2f7f6;
  --surface-3: #e3ece9;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --border: rgba(0, 0, 0, 0.1);
  --header-bg: rgba(255, 255, 255, 0.78);

  /* Estados */
  --ok: #1a7f37;
  --ok-soft: rgba(26, 127, 55, 0.12);
  --warn: #9a5b00;
  --warn-soft: rgba(201, 120, 0, 0.14);
  --danger: #c4281c;
  --danger-soft: rgba(196, 40, 28, 0.1);
  --completar-bg: #fff4b8;
  --completar-text: #3d3200;
  --completar-border: #e8cf5a;

  /* Forma */
  --radius-sm: 12px;
  --radius: 22px;
  --radius-lg: 30px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.05), 0 30px 70px rgba(0, 0, 0, 0.12);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", Inter, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1120px;
  --gutter: 16px;
  --header-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #2ab3a6;
    --accent-hover: #4fd1c5;
    --on-accent: #04201d;
    --link: #2ab3a6;
    --accent-soft: color-mix(in srgb, #2ab3a6 16%, transparent);
    --accent-soft-2: color-mix(in srgb, #2ab3a6 26%, transparent);

    --bg: #0e1413;
    --bg-alt: #121a19;
    --surface: #171e1d;
    --surface-2: #1d2524;
    --surface-3: #2a3533;
    --text: #e8ecec;
    --text-2: #a6b0ae;
    --border: #3a4644;
    --header-bg: rgba(23, 30, 29, 0.78);

    --ok: #4cd16f;
    --ok-soft: rgba(76, 209, 111, 0.16);
    --warn: #ffb340;
    --warn-soft: rgba(255, 179, 64, 0.16);
    --danger: #ff6961;
    --danger-soft: rgba(255, 105, 97, 0.16);
    --completar-bg: rgba(255, 214, 10, 0.22);
    --completar-text: #ffe680;
    --completar-border: rgba(255, 214, 10, 0.45);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 4px 14px rgba(0, 0, 0, 0.5), 0 30px 70px rgba(0, 0, 0, 0.55);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

h1, h2, h3, h4 {
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.3rem, 7vw, 4.25rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.85rem, 4.6vw, 3rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.012em; line-height: 1.25; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 6px;
}

[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 10px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: calc(800px + var(--gutter) * 2); }

@media (min-width: 768px) {
  :root { --gutter: 28px; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn svg { width: 1.05em; height: 1.05em; }

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

.btn-secondary { background: var(--accent-soft); color: var(--link); }
.btn-secondary:hover { background: var(--accent-soft-2); }

.btn-outline { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { background: var(--surface-2); }

.btn-sm { min-height: 36px; padding: 0.45rem 0.95rem; font-size: 0.9rem; }
.btn-lg { min-height: 52px; padding: 0.9rem 1.7rem; font-size: 1.075rem; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-row.center { justify-content: center; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.3em;
  font-weight: 600; text-decoration: none; color: var(--link);
}
.text-link:hover { text-decoration: underline; }
.text-link svg { width: 0.95em; height: 0.95em; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}
.brand svg { width: 30px; height: 30px; }
.brand:hover { text-decoration: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-2); }
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 8px var(--gutter) 24px;
  display: none;
}
.site-nav.is-open { display: block; }

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block;
  padding: 14px 4px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.nav-list a[aria-current="page"] { color: var(--link); }

.nav-actions { display: grid; gap: 10px; margin-top: 20px; }
.nav-actions .btn { width: 100%; }

@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: flex !important;
    align-items: center;
    gap: 22px;
    max-height: none;
    overflow: visible;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .nav-list { display: flex; gap: 2px; }
  .nav-list a {
    padding: 8px 11px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 0;
    border-radius: 999px;
    color: var(--text-2);
  }
  .nav-list a:hover { color: var(--text); background: var(--surface-2); }
  .nav-list a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
  .nav-actions { display: flex; margin: 0; gap: 8px; }
  .nav-actions .btn { width: auto; min-height: 36px; padding: 0.45rem 0.95rem; font-size: 0.875rem; }
}

/* ---------- Secciones ---------- */
.section { padding-block: 72px; }
.section-alt { background: var(--bg-alt); }
.section-tight { padding-block: 48px; }
@media (min-width: 768px) {
  .section { padding-block: 112px; }
  .section-tight { padding-block: 64px; }
}

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-2); font-size: 1.15rem; }

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--link);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.lead { font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--text-2); line-height: 1.45; }
.muted { color: var(--text-2); }
.small { font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero { padding-top: 56px; padding-bottom: 72px; overflow: hidden; }
.hero-inner { text-align: center; max-width: 860px; margin-inline: auto; }
.hero h1 { margin-bottom: 0.35em; }
.hero h1 .accent { color: var(--link); }
.hero .lead { max-width: 640px; margin-inline: auto; margin-bottom: 30px; }
.hero .btn-row { justify-content: center; }
.hero-visual { margin-top: 56px; }

@media (min-width: 768px) {
  .hero { padding-top: 96px; padding-bottom: 112px; }
}

.page-hero { padding-top: 56px; padding-bottom: 40px; }
.page-hero .lead { max-width: 720px; }
.page-hero.center { text-align: center; }
.page-hero.center .lead { margin-inline: auto; }
@media (min-width: 768px) {
  .page-hero { padding-top: 88px; padding-bottom: 56px; }
}

/* ---------- Rejillas y tarjetas ---------- */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid { gap: 20px; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.section-alt .card { border-color: transparent; }
@media (prefers-color-scheme: dark) {
  .section-alt .card { border-color: var(--border); }
}
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--text-2); margin-bottom: 0; }
.card p + p { margin-top: 0.75em; }

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--link);
  margin-bottom: 16px;
}
.icon-badge svg { width: 24px; height: 24px; }

a.card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
a.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
a.card-link .text-link { margin-top: auto; padding-top: 14px; }

.module-card h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Ventajas */
.features { display: grid; gap: 28px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .features { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.feature { text-align: center; }
.feature .icon-badge { margin-inline: auto; margin-bottom: 12px; }
.feature h3 { font-size: 1rem; margin-bottom: 0.25em; }
.feature p { font-size: 0.9rem; color: var(--text-2); margin: 0; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 16px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .steps.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.steps li {
  counter-increment: step;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  border: 1px solid var(--border);
}
.section-alt .steps li { border-color: transparent; box-shadow: var(--shadow-sm); }
.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  margin-bottom: 16px;
}
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--text-2); margin: 0; }

/* Bloque dividido texto + visual */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split.reverse > :first-child { order: 2; }
}

/* Listas con marca */
.checklist { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.2em;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.2l2.6 2.6L14 7.4' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .checklist li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.2l2.6 2.6L14 7.4' fill='none' stroke='%232ab3a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

/* Etiquetas de estado */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  vertical-align: middle;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-dev { background: var(--warn-soft); color: var(--warn); }
.badge-custom { background: var(--accent-soft); color: var(--link); }

/* Roles */
.role-card h3 { display: flex; align-items: center; gap: 12px; }
.role-card h3 .icon-badge { margin: 0; }
.role-card .checklist { margin-top: 18px; color: var(--text); }

/* Aviso / nota */
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}
.notice svg { width: 22px; height: 22px; color: var(--warn); margin-top: 1px; }
.notice p { margin: 0; }
.notice strong { display: block; margin-bottom: 2px; }
.notice-info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--link) 25%, transparent); }
.notice-info svg { color: var(--link); }

/* Marcadores pendientes de completar */
.completar {
  background: var(--completar-bg);
  color: var(--completar-text);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 600;
}
a.completar { text-decoration: underline; }
.completar-aviso {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--completar-border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  margin-bottom: 32px;
}

/* CTA final */
.cta {
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.cta h2 { max-width: 680px; margin-inline: auto; }
.cta p { color: var(--text-2); max-width: 600px; margin: 0 auto 28px; font-size: 1.12rem; }
@media (min-width: 768px) { .cta { padding: 80px 48px; } }

/* ---------- Maquetas de la aplicación (CSS) ---------- */
.mock {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
}
.mock-window {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3); }
.mock-bar i:nth-child(1) { background: #ff5f57; }
.mock-bar i:nth-child(2) { background: #febc2e; }
.mock-bar i:nth-child(3) { background: #28c840; }
.mock-bar .mock-url {
  flex: 1;
  max-width: 300px;
  margin-inline: auto;
  height: 22px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; white-space: nowrap;
}
.mock-body { display: grid; grid-template-columns: 1fr; min-height: 300px; }
@media (min-width: 720px) { .mock-body { grid-template-columns: 190px 1fr; } }
.mock-side {
  display: none;
  padding: 16px 12px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
}
@media (min-width: 720px) { .mock-side { display: block; } }
.mock-side .mock-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 6px 16px; }
.mock-side .mock-brand svg { width: 20px; height: 20px; }
.mock-nav { display: grid; gap: 2px; }
.mock-nav span {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--text-2);
}
.mock-nav span svg { width: 15px; height: 15px; }
.mock-nav span.on { background: var(--accent); color: var(--on-accent); }
.mock-main { padding: 18px; min-width: 0; }
@media (min-width: 720px) { .mock-main { padding: 22px 24px; } }
.mock-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.mock-h strong { font-size: 17px; letter-spacing: -0.01em; }
.mock-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 12px;
}
.mock-chip svg { width: 14px; height: 14px; }
.mock-chip.soft { background: var(--accent-soft); color: var(--link); }
.mock-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.mock-stat { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.mock-stat small { display: block; color: var(--text-2); font-size: 11px; }
.mock-stat b { font-size: 17px; letter-spacing: -0.01em; }
.mock-table { width: 100%; border-collapse: collapse; }
.mock-table th, .mock-table td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mock-table th { color: var(--text-2); font-weight: 500; font-size: 11.5px; }
.mock-table tr:last-child td { border-bottom: 0; }
.mock-table .hide-sm { display: none; }
@media (min-width: 520px) { .mock-table .hide-sm { display: table-cell; } }
.mock-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.mock-pill.ok { background: var(--ok-soft); color: var(--ok); }
.mock-pill.warn { background: var(--warn-soft); color: var(--warn); }
.mock-pill.info { background: var(--accent-soft); color: var(--link); }
.mock-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--link);
  font-size: 10px; font-weight: 700; margin-right: 7px; vertical-align: middle;
}

/* Calendario */
.mock-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mock-cal span {
  aspect-ratio: 1 / 0.82;
  border-radius: 8px;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 4px 6px;
  font-size: 11px;
  color: var(--text-2);
  background: var(--surface-2);
}
.mock-cal span.hd { background: none; aspect-ratio: auto; justify-content: center; padding: 0 0 4px; font-weight: 600; font-size: 10.5px; }
.mock-cal span.out { opacity: 0.35; }
.mock-cal span.vac { background: var(--accent-soft-2); color: var(--link); font-weight: 600; }
.mock-cal span.oth { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.mock-cal span.clash { background: var(--warn-soft); color: var(--warn); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--warn); }
.mock-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; color: var(--text-2); font-size: 11.5px; }
.mock-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mock-legend i { width: 10px; height: 10px; border-radius: 3px; }
.mock-alert {
  display: flex; gap: 8px; align-items: center;
  margin-top: 12px; padding: 8px 10px; border-radius: 10px;
  background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 12px;
}
.mock-alert svg { width: 15px; height: 15px; }

/* Tarjetas de módulos (maqueta) */
.mock-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .mock-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mock-tile {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px;
  display: grid; gap: 8px;
}
.mock-tile svg { width: 22px; height: 22px; color: var(--link); }
.mock-tile b { font-size: 12.5px; }
.mock-tile .mock-pill { justify-self: start; }
.mock-toggle { width: 30px; height: 18px; border-radius: 999px; background: var(--surface-3); position: relative; }
.mock-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.mock-toggle.on { background: var(--ok); }
.mock-toggle.on::after { left: 14px; }
.mock-tile-row { display: flex; align-items: center; justify-content: space-between; }

/* Teléfono */
.mock-phone {
  width: 250px;
  max-width: 100%;
  margin-inline: auto;
  border-radius: 40px;
  padding: 10px;
  background: #1d1d1f;
  box-shadow: var(--shadow-lg);
}
.mock-phone-screen { border-radius: 31px; background: var(--bg); padding: 34px 16px 20px; min-height: 440px; position: relative; }
.mock-phone-screen::before { content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 76px; height: 20px; border-radius: 999px; background: #1d1d1f; }
.mock-clock { text-align: center; margin: 18px 0 18px; }
.mock-clock b { display: block; font-size: 40px; letter-spacing: -0.03em; font-weight: 600; }
.mock-clock small { color: var(--text-2); }
.mock-big-btn {
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  width: 140px; height: 140px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 15px; text-align: center;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 40%, transparent);
}
.mock-list { display: grid; gap: 6px; }
.mock-list div { display: flex; justify-content: space-between; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 12px; }
.mock-list span { color: var(--text-2); }

/* Notificaciones */
.mock-notifs { display: grid; gap: 8px; }
.mock-notif { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.mock-notif svg { width: 18px; height: 18px; color: var(--link); margin-top: 1px; }
.mock-notif small { display: block; color: var(--text-2); }

/* Esquema de instancias independientes */
.inst-grid { display: grid; gap: 12px; }
@media (min-width: 560px) { .inst-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.inst {
  display: grid;
  gap: 10px;
  align-content: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}
.inst b { font-size: 1.05rem; }
.inst svg { width: 16px; height: 16px; }
.inst-domain { display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-weight: 600; font-size: 0.82rem; word-break: break-all; }
.inst-mods { display: flex; flex-wrap: wrap; gap: 5px; }
.inst-mods i { font-style: normal; font-size: 0.78rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.inst-db { display: inline-flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--border); color: var(--text-2); font-size: 0.82rem; }

/* ---------- Módulos (página) ---------- */
.anchor-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.anchor-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.anchor-nav a:hover { background: var(--accent-soft); color: var(--link); }

.anchor-groups { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
.anchor-groups .index-group { margin-top: 0; }
.index-group .anchor-nav { padding: 0 14px 14px; }
.index-group .count { font-weight: 500; font-size: 0.85rem; color: var(--text-2); }
.modules-list { display: grid; gap: 20px; }
@media (min-width: 900px) { .modules-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.module {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.module-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.module-head .icon-badge { margin: 0; }
.module-head h2 { font-size: 1.4rem; margin: 0 0 6px; }
.module-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.module > p { color: var(--text-2); }
.module .checklist { font-size: 0.98rem; }
.module-wide { grid-column: 1 / -1; }
.module-wide .module-cols { display: grid; gap: 28px; }
@media (min-width: 900px) { .module-wide .module-cols { grid-template-columns: 1.1fr 1fr; align-items: start; } }

/* ---------- Demo ---------- */
.demo-top { padding-block: 24px 40px; }
@media (min-width: 768px) { .demo-top { padding-block: 44px 56px; } }
.demo-layout { display: grid; gap: 36px; align-items: start; }
.demo-top .notice { margin-top: 20px; }
@media (min-width: 960px) { .demo-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 56px; align-items: start; } }
.demo-copy, .demo-side { min-width: 0; }
.demo-side .demo-creds { margin-top: 0; }
.demo-side .demo-creds h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-shot { min-width: 0; }
.demo-top + .section { padding-top: 40px; }
@media (min-width: 768px) { .demo-top { padding-bottom: 8px; } .demo-top + .section { padding-top: 56px; } }
.demo-shot figcaption { text-align: center; }
.demo-shot-link { display: block; cursor: zoom-in; }
.demo-shot-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }
.demo-shot { grid-column: 1 / -1; width: 100%; }
.demo-top .cred-grid { grid-template-columns: 1fr; }
.demo-top .cred { border-radius: var(--radius); border-top: 3px solid var(--accent); box-shadow: var(--shadow); padding: 18px 20px; }
.demo-top .cred dl { margin-top: 14px; gap: 10px; }
.demo-top .cred dl div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; }
.demo-top .cred dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.demo-top .cred dd { font-size: 1.05rem; font-weight: 600; }
.demo-top h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin-bottom: 0.25em; }
.demo-top .lead { font-size: clamp(1.02rem, 2vw, 1.2rem); margin-bottom: 18px; }
.demo-creds { margin-top: 18px; }
.demo-creds h2 { font-size: 1.1rem; letter-spacing: -0.01em; margin-bottom: 10px; }
.demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; }
.demo-actions p { margin: 0; flex: 1 1 220px; }
.demo-top .demo-mobile { margin: 12px 0 0; }
@media (max-width: 599px) {
  .demo-top .notice { padding: 12px 14px; font-size: 0.93rem; line-height: 1.45; }
  .demo-top .notice svg { width: 20px; height: 20px; }
  .demo-actions .btn { width: 100%; white-space: normal; }
}

.cred-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .cred-grid { gap: 16px; } }
.cred {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
  min-width: 0;
}
@media (min-width: 720px) { .cred { padding: 20px 22px; border-radius: var(--radius); } }
.cred h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin: 0; }
.cred h3 .icon-badge { width: 32px; height: 32px; border-radius: 10px; margin: 0; flex-shrink: 0; }
.cred h3 .icon-badge svg { width: 18px; height: 18px; }
.cred dl { margin: 12px 0 0; display: grid; gap: 8px; }
.cred dl div { display: grid; gap: 2px; }
.cred dt { font-size: 0.85rem; color: var(--text-2); }
.cred dd { margin: 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.95rem; word-break: break-word; }
.cred dd .completar { font-family: var(--font); }

.demo-frame-wrap { display: none; padding-bottom: 32px; }
.demo-mobile { display: block; }
@media (min-width: 900px) {
  .demo-frame-wrap { display: block; }
  .demo-mobile { display: none; }
}
.demo-window { position: relative; }
.demo-window .mock-bar { justify-content: flex-start; }
.demo-window .mock-url { font-size: 12px; }
.demo-stage { position: relative; height: min(78vh, 820px); min-height: 560px; background: var(--bg-alt); }
.demo-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }
.demo-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: var(--bg-alt);
  color: var(--text-2);
}
.demo-overlay[hidden] { display: none; }
.demo-overlay p { max-width: 460px; margin: 0; }
.demo-overlay strong { color: var(--text); font-size: 1.1rem; }
.spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid var(--surface-3);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.demo-help { margin-top: 14px; text-align: center; color: var(--text-2); font-size: 0.92rem; }

/* ---------- Formulario ---------- */
.contact-layout { display: grid; gap: 32px; }
@media (min-width: 960px) { .contact-layout { grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; } }

.form-card { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--border); box-shadow: var(--shadow); }
@media (min-width: 768px) { .form-card { padding: 36px; } }

.form-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }

.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.95rem; }
.field .opt { font-weight: 400; color: var(--text-2); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft-2);
}
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.88rem; font-weight: 500; min-height: 0; }
.field-error:empty { display: none; }

fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { padding: 0; margin-bottom: 8px; }
.checks { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .checks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.93rem;
  cursor: pointer;
  font-weight: 400 !important;
}
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.check.plain { background: none; padding: 0; }
.check-help { margin: 0 0 10px; font-size: 0.9rem; }
.check-group { margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.check-group summary {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; list-style: none;
}
.check-group summary::-webkit-details-marker { display: none; }
.check-group summary::after { content: "+"; margin-left: auto; font-size: 1.2rem; line-height: 1; color: var(--text-2); }
.check-group[open] summary::after { content: "\2212"; }
.check-group:has(input:checked) summary::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.check-group .checks { padding: 0 12px 12px; }
.check-extra { margin-top: 8px; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 18px; }
.form-status:empty { display: none; }
.form-status .msg { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 500; }
.form-status .msg-ok { background: var(--ok-soft); color: var(--ok); }
.form-status .msg-error { background: var(--danger-soft); color: var(--danger); }
.form-status .msg-info { background: var(--accent-soft); color: var(--link); }
.form-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.form-legal { margin-top: 20px; font-size: 0.85rem; color: var(--text-2); }
.form-legal p { margin: 0 0 0.4em; }

.aside-card { background: var(--bg-alt); border-radius: var(--radius); padding: 26px; }
.aside-card + .aside-card { margin-top: 16px; }
.aside-card h2 { font-size: 1.2rem; }
.aside-card p { color: var(--text-2); }

/* ---------- Documentos legales ---------- */
.legal { padding-block: 48px 88px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.legal h3 { font-size: 1.1rem; margin-top: 1.5em; }
.legal p, .legal li { color: var(--text); }
.legal ul, .legal ol { padding-left: 1.3em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal .updated { color: var(--text-2); font-size: 0.95rem; }
.legal-table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.95rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.legal-table th { width: 34%; color: var(--text-2); font-weight: 600; }
@media (max-width: 560px) {
  .legal-table th, .legal-table td { display: block; width: 100%; padding: 6px 0; }
  .legal-table th { border-bottom: 0; padding-top: 12px; }
}

/* ---------- 404 ---------- */
.not-found { text-align: center; padding-block: 96px; }
.not-found .code { font-size: clamp(4rem, 18vw, 8rem); font-weight: 800; letter-spacing: -0.05em; color: var(--link); line-height: 1; margin-bottom: 12px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--bg-alt); color: var(--text-2); font-size: 0.9rem; padding-block: 56px 32px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; max-width: 340px; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { margin: 0; }
.site-footer h2 { font-size: 0.85rem; font-weight: 600; color: var(--text); letter-spacing: 0; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { color: var(--text-2); text-decoration: none; display: inline-block; padding: 4px 0; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-bottom p { margin: 0; }

/* ---------- Animaciones de aparición ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .reveal-delay-1 { transition-delay: 0.08s; }
  .js .reveal-delay-2 { transition-delay: 0.16s; }
  .js .reveal-delay-3 { transition-delay: 0.24s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .spinner { animation: none; border-top-color: var(--accent); }
}

/* ---------- Impresión ---------- */
@media print {
  .site-header, .site-footer, .skip-link, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .completar { background: #fff4b8; color: #000; }
}

/* ---------- Capturas reales de la app ---------- */
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow-sm); background: #fff; }
.shot figcaption { margin-top: 12px; color: var(--text-2); font-size: 0.95rem; }
.hero-visual .shot { max-width: 1080px; margin-inline: auto; }
.shots-grid { display: grid; gap: 48px; max-width: 1000px; margin-inline: auto; }
.shots-note { margin-top: 28px; text-align: center; }
.split-shot { display: grid; gap: 32px; align-items: center; }
@media (min-width: 768px) { .split-shot { grid-template-columns: minmax(0, 1fr) auto; gap: 56px; } }
.shot-phone { max-width: 250px; margin-inline: auto; }
.shot-phone img { border-radius: 18px; }
