/* ============================================================
   Aris AI Docs — Shared UI / components
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px; line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(109,92,255,.32); }

/* Ambient gradient mesh background */
.mesh {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.mesh::before, .mesh::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: .5;
}
.mesh::before {
  width: 600px; height: 600px; top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(109,92,255,.45), transparent 70%);
}
.mesh::after {
  width: 700px; height: 700px; top: -100px; right: -200px;
  background: radial-gradient(circle, rgba(59,130,246,.35), transparent 70%);
}

/* Typography helpers */
.display { font-size: clamp(40px, 6vw, 64px); line-height: 1.06; letter-spacing: -.03em; font-weight: 600; }
.h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.08; letter-spacing: -.02em; font-weight: 600; }
.h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.18; letter-spacing: -.01em; font-weight: 600; }
.h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
.lead { font-size: 20px; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.grad-text {
  background: var(--brand-grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted);
}

/* Layout */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(72px, 12vw, 144px) 0; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 32px; }

/* Pills & badges */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--bg-glass);
  font-size: 13px; color: var(--text-muted); backdrop-filter: blur(12px);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-1); box-shadow: 0 0 8px var(--brand-1); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  background: var(--bg-glass); border: 1px solid var(--border); color: var(--text-muted);
}
.badge.brand { background: var(--brand-grad-soft); border-color: rgba(109,92,255,.4); color: var(--text); }
.badge.soon { color: var(--brand-1); }
.badge.ok { color: var(--success); } .badge.warn { color: var(--warning); } .badge.crit { color: var(--danger); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--r-md);
  font-family: inherit; font-size: 15px; font-weight: 550; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-glass); color: var(--text);
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-base);
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-strong); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn.primary {
  background: var(--brand-grad); border-color: transparent; color: #fff;
  box-shadow: 0 4px 16px rgba(109,92,255,.28);
}
.btn.primary:hover { box-shadow: var(--glow-brand); transform: translateY(-2px); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-hover); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn.lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn.block { width: 100%; }

/* Cards / glass */
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-5);
  transition: transform var(--t-base) var(--ease-out), border-color var(--t-base), box-shadow var(--t-base);
}
.card.glass {
  background: var(--bg-glass); backdrop-filter: blur(20px) saturate(120%);
  box-shadow: var(--shadow-glass);
}
.card.lift:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }

/* Icon chip */
.ic {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--r-md); background: var(--brand-grad-soft);
  border: 1px solid var(--border); font-size: 20px;
}

/* Inputs */
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 12px; font: inherit;
  color: var(--text); background: var(--bg-elev-2);
  border: 1px solid var(--border); border-radius: var(--r-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(59,130,246,.20);
}
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }

/* Divider */
.hr { height: 1px; background: var(--border); border: 0; margin: var(--s-6) 0; }

/* Skeleton shimmer */
.skel {
  background: linear-gradient(90deg, var(--bg-elev) 25%, var(--bg-hover) 37%, var(--bg-elev) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* Grids */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Brand logo glyph inside .mark tiles */
.mark svg { width: 64%; height: 64%; display: block; }

/* Language switcher */
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--bg-glass); }
.lang-btn { border: 0; background: transparent; color: var(--text-muted); padding: 5px 10px; border-radius: var(--r-pill); cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 550; line-height: 1; transition: all var(--t-fast); }
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--brand-grad); color: #fff; }

/* Theme toggle */
.theme-toggle {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--bg-glass); cursor: pointer; font-size: 15px;
}
.theme-toggle:hover { background: var(--bg-hover); }
