/* AI Platform Engineering — design tokens
   Modern SaaS aesthetic: dark-first, mono-accent, engineering-technical */

:root {
  /* Base palette — LIGHT, warm paper */
  --bg:        #f2f1ee;  /* Cloud.10 — warm paper */
  --bg-1:      #ffffff;  /* card */
  --bg-2:      #f8f9f9;  /* Cool Gray.7 */
  --bg-3:      #edf1f2;  /* Cool Gray.10 */
  --bg-4:      #e1e5e7;  /* Cool Gray.15 */

  --fg:        #121415;  /* Cool Gray.100 */
  --fg-2:      #222527;  /* Cool Gray.90 */
  --fg-3:      #4b5357;  /* Cool Gray.70 */
  --fg-4:      #79858b;  /* Cool Gray.50 */
  --fg-5:      #b6bdc0;  /* Cool Gray.30 */

  --rule:      #e1e5e7;  /* Cool Gray.15 */
  --rule-2:    #d5d9db;  /* Cool Gray.20 */

  /* Brand accent — Warm Red brand */
  --accent:     #ff462d;  /* Warm Red.50-brand */
  --accent-2:   #ff6b57;  /* Warm Red.40 */
  --accent-dim: #cc1800;  /* Warm Red.70 */
  --accent-ink: #ffffff;

  /* Semantic signal colors */
  --ok:        #00af41;  /* Misc.Green.Dark */
  --warn:      #ffcd03;  /* Misc.Yellow.15 */
  --err:       #ff462d;  /* Warm Red brand */
  --info:      #569aff;  /* Misc.Blue.110 */

  /* Type */
  --font-sans:    "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Fluid scale */
  --fs-xs:  12px;
  --fs-sm:  13px;
  --fs-md:  15px;
  --fs-lg:  17px;
  --fs-xl:  20px;
  --fs-2xl: 24px;
  --fs-3xl: 32px;

  --h1: clamp(44px, 6.5vw, 96px);
  --h2: clamp(32px, 4vw, 56px);
  --h3: clamp(22px, 2.4vw, 32px);

  /* Layout */
  --page-pad: 40px;
  --max:       1280px;

  /* Radii */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}

/* Subtle ambient grid on body */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 85%);
}

main { position: relative; z-index: 1; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  font-weight: 500;
  color: var(--fg);
}

p { margin: 0; }

a {
  color: var(--fg);
  text-decoration: none;
  transition: color 160ms var(--ease);
}
a:hover { color: var(--accent); }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01", "ss02";
  letter-spacing: 0;
}
.num-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

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

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

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

/* ====== Nav ====== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--page-pad);
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  width: 18px;
  height: 18px;
  background: var(--accent);
  display: inline-block;
  position: relative;
  border-radius: 2px;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--bg-1);
  border-radius: 1px;
}
.brand-name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
}
.nav-links a {
  color: var(--fg-3);
  padding: 6px 0;
  font-weight: 400;
  transition: color 160ms var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--fg); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  color: var(--fg-2);
  transition: all 160ms var(--ease);
  white-space: nowrap;
}
.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 160ms var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost {
  border-color: var(--rule-2);
  color: var(--fg-2);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--fg-4);
  color: var(--fg);
}
.btn .arrow {
  display: inline-block;
  transition: transform 160ms var(--ease);
}
.btn:hover .arrow { transform: translateX(2px); }

/* ====== Cards ====== */
.card {
  background: var(--bg-1);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0;
  white-space: nowrap;
}
.chip-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ====== Footer ====== */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding: 72px var(--page-pad) 32px;
  margin-top: 120px;
  position: relative;
  z-index: 1;
}
.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
}
.site-footer h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: var(--fg-4);
  font-weight: 500;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.site-footer ul a { color: var(--fg-3); }
.site-footer ul a:hover { color: var(--fg); }
.site-footer-bottom {
  max-width: var(--max);
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-4);
  text-transform: uppercase;
}
