/* ARCTMIND — design tokens + base styles — dark-first v2 */

:root {
  --font-sans: "DM Sans", "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "DM Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* Superfícies dark */
  --bg: #0F1117;
  --surface: #1A1D27;
  --surface-2: #21242F;
  --surface-3: #2A2E3B;
  --elevated: #2F3342;

  /* Bordas */
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);

  /* Texto */
  --text: #E8EAF1;
  --text-2: #A0A6B8;
  --text-3: #6B7185;
  --text-4: #6B7185;

  /* Accent indigo */
  --accent: #818CF8;
  --accent-2: #818CF8;
  --accent-strong: #6366F1;
  --accent-deep: #4F46E5;
  --accent-soft: rgba(129,140,248,0.12);
  --accent-glow: 0 0 0 1px rgba(129,140,248,0.25), 0 8px 32px -8px rgba(99,102,241,0.45);
  --accent-hover: #6366F1;
  --accent-fg: #FFFFFF;

  /* Status */
  --critical: #FB7185;
  --critical-soft: rgba(251,113,133,0.14);
  --warning: #FBBF24;
  --warning-soft: rgba(251,191,36,0.14);
  --success: #2DD4BF;
  --success-soft: rgba(45,212,191,0.12);
  --info: #60A5FA;
  --info-soft: rgba(96,165,250,0.12);

  /* Raios */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 0 6px rgba(129,140,248,0.15);

  /* Layout */
  --container: 1200px;
  --container-wide: 1320px;
  --gutter: 24px;
  --nav-h: 64px;
}

/* App shell ambient gradient */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at 10% -5%, rgba(99,102,241,0.08), transparent 60%),
    radial-gradient(700px 400px at 95% 5%, rgba(13,148,136,0.05), transparent 60%);
}

/* Scrollbar dark */
::-webkit-scrollbar { width: 8px }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 8px }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16) }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; min-height: 100%; height: auto; }
body { padding-top: var(--nav-h, 64px); }
#root { min-height: calc(100vh - var(--nav-h, 64px)); display: flex; flex-direction: column; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01";
}

a { color: inherit; text-decoration: none; }

/* ── typography ─────────────────────────────── */
.h-display {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}
.h-1 { font-size: clamp(34px, 4vw, 52px); line-height: 1.06; letter-spacing: -0.028em; font-weight: 700; text-wrap: balance; margin: 0; }
.h-2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -0.022em; font-weight: 700; text-wrap: balance; margin: 0; }
.h-3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.012em; font-weight: 600; margin: 0; }
.h-4 { font-size: 17px; line-height: 1.35; letter-spacing: -0.005em; font-weight: 600; margin: 0; }

.body-lg { font-size: 18px; line-height: 1.65; color: var(--text-2); text-wrap: pretty; }
.body { font-size: 16px; line-height: 1.6; color: var(--text-2); }
.body-sm { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.caption { font-size: 12.5px; line-height: 1.4; color: var(--text-3); }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "zero", "ss01";
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}

.eyebrow-accent {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

/* ── layout ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { padding-block: clamp(64px, 9vw, 120px); }
section.tight { padding-block: clamp(48px, 6vw, 80px); }

.section-dark {
  background: var(--bg);
}
.section-tinted {
  background: var(--surface);
}

/* ── buttons ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 160ms cubic-bezier(.2,.8,.2,1);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}
.btn svg { transition: transform 200ms cubic-bezier(.2,.8,.2,1); }
.btn:hover svg.arr { transform: translateX(2px); }

.btn-primary {
  background: linear-gradient(180deg, #6366F1, #4F46E5);
  color: #fff;
  box-shadow: var(--accent-glow);
}
.btn-primary:hover { filter: brightness(1.12); }

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

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

.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: var(--radius-lg); }

/* ── pieces ──────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.card.hoverable:hover {
  border-color: rgba(129,140,248,0.25);
  box-shadow: 0 0 0 1px rgba(129,140,248,0.15), 0 8px 28px -12px rgba(99,102,241,0.3);
  transform: translateY(-2px);
}

.divider { height: 1px; background: var(--border); width: 100%; }

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: 0 1px 0 var(--border);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-3);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.tag-accent  { color: var(--accent);   border-color: rgba(129,140,248,0.30); background: var(--accent-soft); }
.tag.tag-success { color: var(--success);  border-color: rgba(45,212,191,0.30);  background: var(--success-soft); }
.tag.tag-warning { color: var(--warning);  border-color: rgba(251,191,36,0.30);  background: var(--warning-soft); }
.tag.tag-critical{ color: var(--critical); border-color: rgba(251,113,133,0.30); background: var(--critical-soft); }
.tag.tag-muted   { color: var(--text-3); }

/* Grid bg pattern sutil */
.grid-bg {
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
.grid-bg-light {
  background-image:
    linear-gradient(to right, rgba(15,18,33,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,18,33,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Glow sutil em elementos accent */
.glow {
  box-shadow: 0 0 0 1px rgba(129,140,248,0.20), 0 8px 28px -12px rgba(99,102,241,0.35);
  border-color: rgba(129,140,248,0.20) !important;
}

/* glow halo behind hero */
.halo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 65% 30%, rgba(99,102,241,0.15), transparent 70%),
    radial-gradient(400px 300px at 20% 70%, rgba(129,140,248,0.10), transparent 70%);
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* Focus states for inputs */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(129,140,248,0.5) !important;
  box-shadow: 0 0 0 3px rgba(129,140,248,0.1);
}

/* utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.gap-32 { gap: 32px; } .gap-40 { gap: 40px; } .gap-56 { gap: 56px; }
.text-center { text-align: center; }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.text-accent { color: var(--accent); }
.text-critical { color: var(--critical); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 980px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  :root { --gutter: 20px; }
}

/* live pulse */
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(45,212,191,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(45,212,191,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); }
}
.pulse { animation: pulse-dot 1.6s infinite; }

/* alert card slide-in */
@keyframes slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.slide-in { animation: slide-in 360ms cubic-bezier(.2,.8,.2,1) both; }

/* number tick */
@keyframes counter-pulse {
  0% { color: var(--accent); }
  100% { color: inherit; }
}
.counter-pulse { animation: counter-pulse 800ms ease-out; }

/* faint marquee for scrolling logos */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee { display: flex; animation: marquee 38s linear infinite; }

/* footer */
.footer {
  background: #0D0F17;
  color: var(--text-2);
  padding: 80px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer a { transition: color 150ms; }
.footer a:hover { color: #E8EAF1; }

/* nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav .nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav .nav-links { display: flex; gap: 28px; }
.nav .nav-links a {
  font-size: 14px;
  color: #A0A6B8;
  font-weight: 500;
  transition: color 150ms;
  position: relative;
}
.nav .nav-links a:hover { color: #E8EAF1; }
.nav .nav-links a.active { color: #E8EAF1; }
.nav .nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 1px; background: var(--accent);
}
@media (max-width: 880px) {
  .nav .nav-links { display: none; }
}

/* mobile nav drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(15,17,23,0.96);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 24px) 24px 32px;
  gap: 8px;
}
.nav-drawer a {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-2);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color 150ms;
}
.nav-drawer a:hover, .nav-drawer a.active { color: var(--text); }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all 200ms;
}
@media (max-width: 880px) {
  .nav-hamburger { display: flex; }
}

/* hide scrollbar */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* prose for blog/legal */
.prose { max-width: 720px; }
.prose p { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 28px; }
.prose ul { padding-left: 22px; color: var(--text-2); }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 18px;
  margin: 24px 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.5;
}

/* ── hero mobile responsive ──────────────────── */
@media (max-width: 768px) {
  .hero-cols { grid-template-columns: 1fr !important; gap: 0 !important; }
  .hero-dashboard { display: none !important; }
  .hero-dashboard-mobile { display: block !important; }
}
@media (min-width: 769px) {
  .hero-dashboard-mobile { display: none; }
}

/* Prevent connectors grid from overflowing on mobile */
@media (max-width: 640px) {
  .connector-card-text { min-width: 0; overflow: hidden; }
}
