/* ─────────────────────────────────────────────────────────────
   Crime Solution — Sistema visual
   ───────────────────────────────────────────────────────────── */

:root {
  /* Brand */
  --brand-navy: #0D326D;
  --brand-navy-deep: #07193a;

  /* Dark tokens (default) */
  --bg-0: oklch(0.135 0.012 250);
  --bg-1: oklch(0.165 0.014 250);
  --bg-2: oklch(0.20 0.016 250);
  --bg-3: oklch(0.245 0.018 250);
  --line: oklch(0.30 0.018 250);
  --line-strong: oklch(0.42 0.022 250);
  --fg-0: oklch(0.97 0.006 240);
  --fg-1: oklch(0.82 0.008 240);
  --fg-2: oklch(0.62 0.010 240);
  --fg-3: oklch(0.46 0.012 240);

  /* Accent — overridable via Tweaks */
  --accent: oklch(0.86 0.16 200);            /* cyan neon */
  --accent-soft: oklch(0.86 0.16 200 / 0.14);
  --accent-line: oklch(0.86 0.16 200 / 0.32);
  --accent-fg: oklch(0.15 0.020 230);

  /* Status */
  --danger: oklch(0.68 0.21 25);
  --warning: oklch(0.80 0.16 75);
  --success: oklch(0.74 0.17 150);

  /* Type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, monospace;

  /* Geometry */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;

  /* Layout */
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1320px;
}

/* Light theme overrides */
[data-theme="light"] {
  --bg-0: oklch(0.985 0.002 240);
  --bg-1: oklch(0.965 0.004 240);
  --bg-2: oklch(0.94 0.005 240);
  --bg-3: oklch(0.91 0.006 240);
  --line: oklch(0.85 0.008 240);
  --line-strong: oklch(0.72 0.010 240);
  --fg-0: oklch(0.18 0.020 250);
  --fg-1: oklch(0.30 0.018 250);
  --fg-2: oklch(0.46 0.014 250);
  --fg-3: oklch(0.60 0.012 240);
  --accent-fg: oklch(0.98 0.005 240);
}

* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; min-height: 100%; background: var(--bg-0); color: var(--fg-0); }
body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11", "cv05";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: var(--accent-fg); }

/* ─── Utility ─── */
.mono { font-family: var(--font-mono); font-feature-settings: "ss01", "zero", "cv05"; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent); }
  50%      { box-shadow: 0 0 0 8px color-mix(in oklch, var(--accent) 0%, transparent); }
}

.container { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.h-display {
  font-size: clamp(44px, 7.6vw, 108px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}
.h-section {
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.0;
  letter-spacing: -0.028em;
  font-weight: 600;
  text-wrap: balance;
}
.h-card {
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.018em;
  font-weight: 500;
}
.lead {
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.55;
  color: var(--fg-1);
  max-width: 60ch;
}
.muted { color: var(--fg-2); }

/* ─── Background atmosphere ─── */
.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  opacity: 0.35;
}
.scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    color-mix(in oklch, var(--fg-0) 2.5%, transparent) 3px 4px
  );
  mix-blend-mode: overlay;
  opacity: 0.55;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--line-strong);
  background: var(--bg-1);
  color: var(--fg-0);
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-2); border-color: var(--fg-2); }
.btn:active { transform: translateY(1px); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: transparent;
  font-weight: 600;
}
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 90%, white); border-color: transparent; }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--fg-1); }
.btn-ghost:hover { color: var(--fg-0); }

/* ─── Card ─── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}
.card-pad { padding: clamp(20px, 2vw, 32px); }
.card-hover { transition: border-color .25s ease, transform .25s ease, background .25s ease; }
.card-hover:hover { border-color: var(--line-strong); }

/* ─── Section ─── */
section { position: relative; }
.section-pad { padding-block: clamp(72px, 9vw, 140px); }

/* ─── Misc ─── */
.divider-line {
  height: 1px; background: var(--line); border: 0;
}

/* Corner ticks (frame for tech cards) */
.tick {
  position: absolute; width: 10px; height: 10px;
  border-color: var(--accent); border-style: solid; border-width: 0;
  pointer-events: none;
}
.tick.tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.tick.tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.tick.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.tick.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

/* Reveal */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
