/* Exacto — sitio público. Tokens copiados de apps/frontend/src/styles/index.css (app). */

:root {
  --canvas: oklch(0.962 0.002 286);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.978 0.001 286);
  --ink: oklch(0.2 0.005 286);
  --ink-2: oklch(0.52 0.01 286);
  --ink-3: oklch(0.7 0.008 286);
  --line: oklch(0.922 0.003 286);
  --line-strong: oklch(0.87 0.004 286);
  --lime: oklch(0.88 0.2 141);
  --lime-soft: oklch(0.95 0.07 141);
  --lime-ink: oklch(0.42 0.12 145);
  --positive: oklch(0.56 0.15 148);
  --negative: oklch(0.58 0.19 25);
  --amber: oklch(0.78 0.15 75);
  --amber-soft: oklch(0.96 0.04 85);
  --amber-ink: oklch(0.5 0.12 60);

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-card: 24px;
  --r-table: 16px;
  --r-control: 12px;
  --r-full: 999px;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: oklch(0.145 0.004 286);
    --surface: oklch(0.195 0.004 286);
    --surface-2: oklch(0.225 0.004 286);
    --ink: oklch(0.97 0 0);
    --ink-2: oklch(0.72 0.008 286);
    --ink-3: oklch(0.52 0.008 286);
    --line: oklch(0.27 0.005 286);
    --line-strong: oklch(0.34 0.006 286);
    --lime-soft: oklch(0.3 0.07 141);
    --lime-ink: oklch(0.85 0.17 141);
    --positive: oklch(0.75 0.17 148);
    --negative: oklch(0.7 0.17 25);
    --amber-soft: oklch(0.3 0.06 75);
    --amber-ink: oklch(0.85 0.13 80);
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r-control);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--r-control);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in oklch, var(--canvas) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.04em;
}

.brand svg {
  width: 28px;
  height: 28px;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a:not(.btn) {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--r-control);
}

.nav a:not(.btn):hover {
  color: var(--ink);
  background: color-mix(in oklch, var(--ink) 5%, transparent);
}

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

/* ---------- Buttons & chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-lg {
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
}

.btn-primary {
  background: var(--ink);
  color: var(--canvas);
}
.btn-primary:hover {
  background: color-mix(in oklch, var(--ink) 85%, var(--canvas));
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  background: var(--surface-2);
}

.btn-lime {
  background: var(--lime);
  color: oklch(0.2 0.005 286);
}
.btn-lime:hover {
  background: color-mix(in oklch, var(--lime) 88%, black);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
  flex: none;
}
.dot-lime {
  background: var(--lime);
}
.dot-amber {
  background: var(--amber);
}
.dot-ink {
  background: var(--ink);
}

.chip-lime {
  background: var(--lime-soft);
  color: var(--lime-ink);
  border-color: transparent;
}
.chip-amber {
  background: var(--amber-soft);
  color: var(--amber-ink);
  border-color: transparent;
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- Sections ---------- */

section {
  padding-block: clamp(56px, 9vw, 112px);
}

.section-head {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 300;
}

.section-head p {
  color: var(--ink-2);
  font-size: 17px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(20px, 3vw, 28px);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.card h3 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.card p {
  color: var(--ink-2);
  font-size: 15px;
}

.icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-control);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.hero {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(48px, 8vw, 96px);
}

.hero-grid {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.hero h1 {
  font-size: clamp(40px, 7.5vw, 72px);
  font-weight: 300;
  letter-spacing: -0.045em;
  margin: 20px 0 20px;
}

.hero h1 mark {
  background: linear-gradient(transparent 62%, var(--lime) 62%, var(--lime) 92%, transparent 92%);
  color: inherit;
  padding: 0 0.04em;
}

.hero .lead {
  font-size: clamp(17px, 2.2vw, 19px);
  color: var(--ink-2);
  max-width: 560px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-3);
}

/* Product preview (pure HTML/CSS) */

.preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.04), 0 24px 48px -24px oklch(0 0 0 / 0.12);
  min-width: 0;
}

.preview-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.figure {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 300;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-top: 10px;
}

.figure-sub {
  color: var(--ink-2);
  font-size: 13px;
  margin-top: 8px;
}

.progress {
  height: 8px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
  margin: 20px 0 20px;
}
.progress span {
  display: block;
  height: 100%;
  width: 82%;
  background: var(--lime);
  border-radius: var(--r-full);
}

.rows {
  border: 1px solid var(--line);
  border-radius: var(--r-table);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.row:first-child {
  border-top: 0;
}

.row-desc {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-amount {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.row-amount.in {
  color: var(--positive);
}

.row-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.row-meta .chip {
  font-size: 12px;
  padding: 2px 10px;
}

/* ---------- Problem ---------- */

.problem {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.stat {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 300;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}

.problem .card {
  background: var(--surface-2);
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 40px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink-3);
  margin-bottom: 24px;
  font-variant-numeric: tabular-nums;
}

.steps li:last-child::before {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}

.steps h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.steps p {
  color: var(--ink-2);
  font-size: 15px;
}

/* ---------- Soon ---------- */

.soon .card {
  display: grid;
  gap: 8px;
  align-content: start;
}
.soon .card .chip {
  justify-self: start;
  margin-bottom: 12px;
}

/* ---------- Security ---------- */

.security {
  background: var(--ink);
  color: var(--canvas);
}

@media (prefers-color-scheme: dark) {
  .security {
    background: var(--surface);
    color: var(--ink);
    border-block: 1px solid var(--line);
  }
}

.security .section-head p,
.security .card p {
  color: color-mix(in oklch, currentColor 68%, transparent);
}

.security .eyebrow {
  color: color-mix(in oklch, currentColor 60%, transparent);
}

.security .card {
  background: color-mix(in oklch, currentColor 6%, transparent);
  border-color: color-mix(in oklch, currentColor 14%, transparent);
}

.security .icon {
  background: transparent;
  border-color: color-mix(in oklch, currentColor 20%, transparent);
}
.security .icon svg {
  stroke: var(--lime);
}

.security .more {
  margin-top: 32px;
  font-size: 15px;
}

/* ---------- CTA ---------- */

.cta-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(28px, 6vw, 64px);
  display: grid;
  gap: 16px;
  justify-items: start;
}

.cta-card h2 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 300;
  max-width: 720px;
}

.cta-card p {
  color: var(--ink-2);
  max-width: 600px;
  font-size: 17px;
}

/* ---------- Legal pages ---------- */

.legal {
  padding-top: clamp(40px, 6vw, 72px);
}

.legal-head {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.legal-head h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 300;
  letter-spacing: -0.045em;
}

.legal-head .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--ink-2);
  font-size: 14px;
}

.doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(20px, 5vw, 56px);
  max-width: 820px;
  overflow-wrap: anywhere;
}

.doc h2 {
  font-size: clamp(22px, 3vw, 26px);
  font-weight: 400;
  letter-spacing: -0.025em;
  margin: 48px 0 16px;
  scroll-margin-top: 88px;
}
.doc h2:first-of-type {
  margin-top: 32px;
}

.doc h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 28px 0 8px;
}

.doc p,
.doc li {
  color: color-mix(in oklch, var(--ink) 82%, var(--ink-2));
  font-size: 16px;
}

.doc p + p {
  margin-top: 12px;
}

.doc ul,
.doc ol {
  padding-left: 22px;
  margin: 12px 0;
}

.doc li + li {
  margin-top: 6px;
}

.doc li::marker {
  color: var(--ink-3);
}

.doc code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}

.callout {
  border-left: 4px solid var(--lime);
  background: var(--lime-soft);
  color: var(--ink);
  border-radius: 0 var(--r-control) var(--r-control) 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.callout p {
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  .callout,
  .callout p {
    color: var(--ink);
  }
}

.toc {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-table);
  padding: 16px 20px;
}
.toc p {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.toc ol {
  margin: 8px 0 0;
  columns: 2 220px;
  column-gap: 32px;
}
.toc li {
  font-size: 15px;
  break-inside: avoid;
}
.toc a {
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

.table-scroll {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-table);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 520px;
}
.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.doc th + th,
.doc td + td {
  border-left: 1px solid var(--line);
}
.doc thead th {
  border-top: 0;
  background: var(--surface-2);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-2);
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 16px;
}
.notfound .figure {
  font-size: clamp(72px, 16vw, 140px);
}
.notfound .actions {
  justify-content: center;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px 48px;
  margin-top: clamp(56px, 8vw, 96px);
  font-size: 14px;
  color: var(--ink-2);
}

.site-footer .wrap {
  display: grid;
  gap: 24px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  color: var(--ink-3);
  font-size: 13px;
}

.site-footer .brand {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* ---------- Logo mark ---------- */

.mark-bg {
  fill: var(--ink);
}
.mark-a {
  fill: var(--canvas);
}
.mark-b {
  fill: var(--lime);
}
