/* Atempa — sitio institucional. Sistema de diseño alineado con la app (capa UX de app.html):
   "precisión serena" — neutro frío + acento índigo, tipografía compacta, hairlines. */

:root {
  --bg: #fbfbfc;
  --card: #fff;
  --ink: #16161a;
  --ink-soft: #45454e;
  --muted: #63636d;
  --faint: #8a8a95;
  --line: #e8e8ec;
  --line-2: #dcdce1;
  --line-subtle: #eef0f2;
  --surface: #f2f2f5;
  --sink: #f6f6f8;
  --brand: #5b53e8;
  --brand-hover: #4b43d6;
  --brand-ink: #3d34c0;
  --brand-tint: #eeedfc;
  --brand-tint-2: #f7f6ff;
  --ok: #1f7a4d;
  --ok-tint: #e7f3ec;
  --warn: #94600f;
  --warn-tint: #f7efda;
  --danger: #bf352b;
  --danger-tint: #f9e8e6;
  --danger-line: #f0d9d6;
  --dark: #16161a;
  --dark-2: #1c1c22;
  --dark-3: #201f3a;
  --dark-line: #2c2c34;
  --dark-brand: #9a93ff;
  --radius-sm: 7px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(18, 18, 26, 0.05);
  --shadow-lg: 0 24px 60px -28px rgba(18, 18, 26, 0.28);
  --wrap: 1120px;
  --font: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { 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);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; font-weight: 800; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.25rem); letter-spacing: -0.035em; line-height: 1.05; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.06rem); letter-spacing: -0.028em; }
h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--brand-hover); text-decoration: none; }
a:hover { color: var(--brand-ink); }
img, svg { max-width: 100%; }
strong { font-weight: 700; }
.mono { font-family: var(--mono); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
  font-size: 13px; font-weight: 700;
}
.skip:focus { left: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 14px;
}
.lead { font-size: 17px; color: var(--muted); margin-top: 14px; max-width: 62ch; }
.section { padding: 76px 0; }
.section.tight { padding: 56px 0; }
.section.sink { background: var(--sink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.dark { background: var(--dark); color: #fff; }
.section.dark .eyebrow { color: var(--dark-brand); }
.section.dark h1, .section.dark h2, .section.dark h3 { color: #fff; }
.section.dark .lead { color: #a0a0aa; }
@media (max-width: 640px) { .section { padding: 48px 0; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border-radius: 8px; padding: 12px 18px; font-weight: 700; font-size: 14px;
  font-family: inherit; border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  cursor: pointer; transition: background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { background: var(--surface); color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(91, 83, 232, 0.28); }
.btn.primary:hover { background: var(--brand-hover); color: #fff; }
.btn.lg { padding: 13px 22px; font-size: 15px; }
.btn.on-dark { background: #fff; border-color: #fff; color: var(--ink); }
.btn.on-dark:hover { background: var(--brand-tint); }

.cta-note { font-size: 12px; color: var(--faint); margin-top: 16px; letter-spacing: 0.01em; }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 16px; }
.card p { font-size: 13.5px; color: var(--muted); margin-top: 8px; line-height: 1.55; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* badges / chips */
.badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 5px;
  font-size: 11px; font-weight: 700; padding: 3px 8px; background: var(--surface); color: var(--muted);
}
.badge.ok { background: var(--ok-tint); color: var(--ok); }
.badge.warn { background: var(--warn-tint); color: var(--warn); }
.badge.danger { background: var(--danger-tint); color: var(--danger); }
.badge.brand { background: var(--brand-tint); color: var(--brand-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips .badge { font-size: 13px; padding: 8px 14px; }

.ico { width: 18px; height: 18px; flex: 0 0 auto; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 251, 252, 0.86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px;
}
.brand-lockup { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; letter-spacing: -0.03em; color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.site-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--faint); }
.lang-switch a { color: var(--faint); }
.lang-switch a[aria-current] { color: var(--ink); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--ink); }
@media (max-width: 860px) {
  .site-nav, .header-actions .desktop-only { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; left: 0; right: 0; top: 64px; background: var(--bg);
    border-bottom: 1px solid var(--line); padding: 12px 20px 18px;
    box-shadow: 0 12px 20px -12px rgba(18, 18, 26, 0.14);
  }
  .site-nav.open a { padding: 10px 0; width: 100%; }
}

/* hero */
.hero { padding: 72px 0 56px; }
.hero .grid-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 56px; align-items: center; }
.hero h1 { max-width: 15ch; }
.hero p.sub { font-size: 18px; color: var(--ink-soft); margin-top: 22px; max-width: 46ch; line-height: 1.62; }
.hero .actions { display: flex; align-items: center; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero .grid-hero { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { max-width: none; }
}

/* faux-UI panel */
.panel { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; }
.panel .panel-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line-subtle); background: var(--sink); }
.panel .panel-top b { font-size: 13px; }
.syncpill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 3px 9px 3px 7px; font-size: 11px; font-weight: 600; color: var(--muted); }
.syncpill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1f9d57; }
.metric-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-subtle); border-bottom: 1px solid var(--line-subtle); }
.metric-strip > div { background: #fff; padding: 12px 14px; }
.metric-strip .k { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.metric-strip .n { font-family: var(--mono); font-size: 20px; font-weight: 700; margin-top: 3px; letter-spacing: -0.02em; }
.qrow { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); }
.qrow.risk { border-color: var(--danger-line); background: #fdf7f6; }
.qrow .t { font-weight: 700; font-size: 13.5px; }
.qrow .s { font-size: 12px; color: var(--muted); }
.qrow .r { text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.qrow .r .when { font-family: var(--mono); font-size: 12px; font-weight: 600; }

/* steps / numbered */
.steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }
.step { border: 1px solid var(--dark-line); border-radius: 10px; padding: 16px 13px; background: var(--dark-2); }
.step .n { font-family: var(--mono); font-size: 11px; color: var(--dark-brand); font-weight: 600; }
.step .h { font-size: 13px; font-weight: 700; margin-top: 8px; color: #fff; }
.step .d { font-size: 11.5px; color: #a0a0aa; margin-top: 5px; line-height: 1.45; }
.step.hi { border-color: #3a3a80; background: var(--dark-3); }
.step.hi .n { color: #b8b2ff; }
.step.hi .d { color: #c3bff0; }

.dark-card { border: 1px solid var(--dark-line); border-radius: 12px; padding: 22px; background: var(--dark-2); }
.dark-card p { font-size: 15.5px; font-weight: 600; line-height: 1.5; margin-top: 14px; }

/* comparison table */
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .cmp { grid-template-columns: 1fr; } }
.cmp .row { display: flex; gap: 10px; font-size: 13.5px; color: var(--ink-soft); }
.cmp .row .ico { margin-top: 3px; width: 15px; height: 15px; }

/* two-date compare */
.datecard { padding: 0; overflow: hidden; }
.datecard .hd { padding: 12px 18px; border-bottom: 1px solid var(--line-subtle); font-size: 12px; font-weight: 700; color: var(--muted); }
.datecard .cols { display: grid; grid-template-columns: 1fr 1fr; }
.datecard .cols > div { padding: 18px; }
.datecard .cols > div:first-child { border-right: 1px solid var(--line-subtle); }
.datecard .cols .lab { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.datecard .cols .val { font-family: var(--mono); font-size: 22px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }
.datecard .foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-subtle); font-size: 12.5px; font-weight: 700; }
.datecard.late .cols > div:last-child { background: #fdf7f6; }
.datecard.late .cols > div:last-child .lab { color: #b06a60; }
.datecard.late .cols > div:last-child .val { color: var(--danger); }
.datecard.late .foot { border-top-color: var(--danger-line); background: #fdf7f6; color: var(--danger); }
.datecard.good .cols > div:last-child { background: #f4faf6; }
.datecard.good .cols > div:last-child .lab { color: #5a8a70; }
.datecard.good .cols > div:last-child .val { color: var(--ok); }
.datecard.good .foot { border-top-color: var(--ok-tint); background: #f4faf6; color: var(--ok); }

/* FAQ */
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.faq-item summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { flex: 0 0 auto; color: var(--faint); transition: transform 0.15s ease; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item .body { padding: 0 18px 16px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.faq-item .body p + p { margin-top: 10px; }

/* prose (long-form pages) */
.prose { max-width: 68ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 44px; }
.prose h3 { margin-top: 28px; font-size: 17px; }
.prose p { margin-top: 14px; color: var(--ink-soft); }
.prose ul { margin-top: 14px; padding-left: 20px; color: var(--ink-soft); }
.prose li { margin-top: 6px; }
.prose .q { font-weight: 700; color: var(--ink); font-size: 17px; margin-top: 34px; }
.prose .q + p { margin-top: 8px; }

/* forms */
.field { display: grid; gap: 6px; margin-top: 14px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; padding: 10px 12px; color: var(--ink); min-height: 40px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 83, 232, 0.18);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: 13px; margin-top: 12px; min-height: 20px; font-weight: 600; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }

/* footer */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding: 44px 0; }
.site-footer .cols { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 24px; } }
.site-footer h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.site-footer .lk { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; font-size: 13px; }
.site-footer .lk a { color: var(--ink-soft); }
.site-footer .fine { display: flex; justify-content: space-between; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.site-footer .about { font-size: 12.5px; color: var(--faint); margin-top: 12px; max-width: 34ch; }

/* consent banner */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; margin: 0 auto; max-width: 640px;
  background: var(--ink); color: #fff; border-radius: var(--radius); padding: 16px 18px;
  box-shadow: 0 16px 40px -12px rgba(18, 18, 26, 0.4); display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.consent[hidden] { display: none; }
.consent p { font-size: 12.5px; color: #c9c9d0; flex: 1 1 260px; line-height: 1.5; }
.consent p a { color: #fff; text-decoration: underline; }
.consent .acts { display: flex; gap: 8px; }
.consent button {
  font: inherit; font-size: 13px; font-weight: 700; border-radius: var(--radius-sm); padding: 8px 14px;
  cursor: pointer; border: 1px solid #3a3a42; background: transparent; color: #fff;
}
.consent button.accept { background: #fff; color: var(--ink); border-color: #fff; }

/* demo "simular urgente" */
#sim { margin-top: 34px; max-width: 620px; }
.sim-panel { border: 1px solid var(--brand-tint); border-radius: var(--radius-lg); background: #fff; overflow: hidden; box-shadow: 0 12px 32px -18px rgba(91, 83, 232, 0.4); }
.sim-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-subtle); background: var(--sink); }
.sim-head b { font-size: 13px; }
.sim-head .btn { padding: 8px 13px; }
.sim-body { display: flex; flex-direction: column; }
.sim-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line-subtle); }
.sim-row:last-child { border-bottom: 0; }
.sim-row.is-urgent { background: var(--brand-tint-2); }
.sim-row.is-late { background: #fdf7f6; }
.sim-who { font-size: 13px; font-weight: 600; }
.sim-end { font-size: 12px; font-weight: 600; }
.sim-row.is-late .sim-end { color: var(--danger); }
.sim-tag { font-size: 11px; text-align: right; min-width: 72px; }
.sim-fallback { display: grid; grid-template-columns: 1fr 44px 1fr; gap: 18px; align-items: center; }
@media (max-width: 640px) { .sim-fallback { grid-template-columns: 1fr; } .sim-fallback .arrow { transform: rotate(90deg); justify-self: center; } }

.center { text-align: center; }
.mt-s { margin-top: 14px; }
.mt-m { margin-top: 22px; }
.mt-l { margin-top: 34px; }
.stack-sm { display: grid; gap: 10px; }
