/* ==========================================================================
   Atlas — design tokens & base styles
   ========================================================================== */

:root {
  /* Color — steel on black */
  --color-bg: #060708;
  --color-bg-alt: #0c1016;
  --color-card: #0d1016;
  --color-card-hover: #11151d;
  --color-line: rgba(200, 210, 224, 0.14);
  --color-line-strong: rgba(200, 210, 224, 0.3);
  --color-text: #eceff5;
  --color-muted: #99a2b0;
  --color-steel-100: #d6dde8;
  --color-steel-300: #a9b3c3;
  --color-steel-500: #5f6c80;
  --color-ink: #0a0c10;

  /* Gradient */
  --gradient-primary: linear-gradient(120deg, #c2ccda 0%, #8b98ab 50%, #5f6c80 100%);
  --gradient-divider: linear-gradient(90deg, transparent, rgba(200, 210, 224, 0.55) 50%, transparent);
  --gradient-dot: linear-gradient(135deg, #c2ccda, #5f6c80);
  --gradient-card: linear-gradient(180deg, rgba(200, 210, 224, 0.07), var(--color-card) 45%);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Radius */
  --radius-btn: 8px;
  --radius-card: 14px;
  --radius-banner: 20px;
  --radius-pill: 999px;

  /* Spacing scale */
  --space-xs: 0.375rem;
  --space-sm: 0.625rem;
  --space-md: 0.875rem;
  --space-lg: 1.375rem;
  --space-xl: 1.75rem;
  --space-section: 7rem;
  --space-hero: 9.5rem;

  /* Motion */
  --duration-fast: 0.2s;
  --duration-base: 0.25s;
  --duration-slow: 0.35s;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Layout */
  --container-width: 1160px;

  /* Glass */
  --glass-bg: rgba(200, 210, 224, 0.06);
  --glass-bg-strong: rgba(200, 210, 224, 0.12);
  --glass-border: rgba(200, 210, 224, 0.18);
  --glass-border-strong: rgba(200, 210, 224, 0.32);
  --glass-highlight: inset 0 1px 0 rgba(214, 221, 232, 0.12), inset 1px 0 0 rgba(214, 221, 232, 0.04);
  --glass-blur: blur(22px) saturate(140%);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

input, select, textarea { user-select: text; -webkit-user-select: text; }

img { user-select: none; -webkit-user-drag: none; pointer-events: none; }

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

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; font-weight: 600; }

ul { list-style: none; }

::selection { background: rgba(200, 210, 224, 0.25); color: var(--color-text); }

/* ---------- Utilities ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--color-steel-100);
  outline-offset: 3px;
  border-radius: var(--radius-card);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 13px 26px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition:
    transform var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease),
    background var(--duration-fast) ease,
    border-color var(--duration-fast) ease;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-ink);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -12px rgba(150, 165, 185, 0.45);
}

.btn-ghost {
  background: transparent;
  border-color: var(--color-line-strong);
  color: var(--color-text);
}
.btn-ghost:hover {
  border-color: var(--color-steel-100);
  background: rgba(200, 210, 224, 0.05);
  transform: translateY(-2px);
}

.btn-block { width: 100%; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-steel-300);
  margin-bottom: 18px;
}

/* ---------- Reveal animation system ----------
   Hide only when JS is active so a page without JS stays visible. */
.js .reveal {
  opacity: 0;
  visibility: hidden;
  transform: translateY(40px) scale(0.98);
  filter: blur(5px);
  transition:
    opacity 0.85s var(--ease) var(--reveal-stagger, 0s),
    transform 0.85s var(--ease) var(--reveal-stagger, 0s),
    filter 0.85s var(--ease) var(--reveal-stagger, 0s),
    visibility 0s linear var(--reveal-stagger, 0s);
}
.js .reveal.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition-delay: var(--reveal-stagger, 0s);
}

/* Variants */
.js [data-reveal="left"] { transform: translateX(-30px); }
.js [data-reveal="left"].visible { transform: translateX(0); }

.js [data-reveal="right"] { transform: translateX(30px); }
.js [data-reveal="right"].visible { transform: translateX(0); }

.js [data-reveal="scale"] { transform: scale(0.92); }
.js [data-reveal="scale"].visible { transform: scale(1); }

.js [data-reveal="fade"] { transform: none; }

/* Hero cascade: faster, tighter */
.js .hero-text .eyebrow      { --reveal-stagger: 0.1s; }
.js .hero-text h1            { --reveal-stagger: 0.3s; }
.js .hero-sub                { --reveal-stagger: 0.5s; }
.js .hero-actions            { --reveal-stagger: 0.7s; }
.js .hero-visual             { --reveal-stagger: 0.4s; transition-duration: 1s; }

/* Ensure revealed state wins over cascade rules on hover/timing quirks */
.js .reveal.visible {
  --reveal-stagger: 0s;
  transition-duration: 0.7s;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
