/* ===========================================================
   Xinference + Xagent — shared design tokens
   Lifted in spirit from Baseten: warm cream, tight Inter Tight,
   one accent blue family across both products.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Brand */
  --blue-50:  #EFF4FF;
  --blue-100: #DBE7FF;
  --blue-200: #BFD3FE;
  --blue-300: #93B4FD;
  --blue-400: #6090FA;
  --blue-500: #2563EB; /* primary brand */
  --blue-600: #1D4ED8;
  --blue-700: #1E40AF;
  --blue-800: #1E3A8A;
  --blue-900: #172554;

  /* Surfaces — warm Baseten cream */
  --cream-50:  #FBF8F3;  /* page bg */
  --cream-100: #F5EFE5;  /* section bg */
  --cream-200: #E9E1D2;  /* divider/strip */
  --cream-300: #D8CDB6;
  --ink-900: #0A0A0A;
  --ink-800: #1A1A1A;
  --ink-700: #2A2A2A;
  --ink-600: #4A4A4A;
  --ink-500: #6B6B6B;
  --ink-400: #8C8C8C;
  --ink-300: #BABABA;
  --ink-200: #E0E0E0;
  --ink-100: #EFEFEF;
  --white: #FFFFFF;

  /* Status */
  --green: #1F8A5B;
  --amber: #C58A0A;
  --red:   #C03D2E;

  /* Type scale */
  --font-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --t-display-xl: clamp(56px, 8.5vw, 132px);
  --t-display-lg: clamp(44px, 6vw, 88px);
  --t-display-md: clamp(36px, 4.5vw, 64px);
  --t-h1: clamp(32px, 3.5vw, 48px);
  --t-h2: clamp(26px, 2.6vw, 36px);
  --t-h3: 22px;
  --t-h4: 18px;
  --t-body-lg: 18px;
  --t-body: 16px;
  --t-body-sm: 14px;
  --t-caption: 12px;
  --t-overline: 12px;

  /* Spacing — 4px base */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;
  --s-40: 160px;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --r-pill: 999px;

  /* Borders & shadows */
  --border-hairline: 1px solid rgba(10, 10, 10, 0.08);
  --border-strong:   1px solid rgba(10, 10, 10, 0.16);
  --border-blue:     1px solid var(--blue-500);
  --shadow-sm:  0 1px 2px rgba(10,10,10,0.05);
  --shadow-md:  0 4px 14px rgba(10,10,10,0.06);
  --shadow-lg:  0 18px 48px rgba(10,10,10,0.10);
  --shadow-xl:  0 32px 84px rgba(10,10,10,0.14);

  /* Layout */
  --container: 1240px;
  --container-narrow: 960px;
  --nav-h: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-io:  cubic-bezier(0.4, 0, 0.2, 1);
  --dur-micro: 140ms;
  --dur-state: 240ms;
  --dur-page:  420ms;

  /* Tracking */
  --tracking-tight: -0.02em;
  --tracking-snug:  -0.01em;
  --tracking-wide:   0.04em;
  --tracking-over:   0.12em;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--cream-50); color: var(--ink-900); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
body { font-size: var(--t-body); line-height: 1.55; letter-spacing: var(--tracking-snug); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* Selection */
::selection { background: var(--blue-500); color: white; }

/* ----------------- Type utilities ----------------- */
.display-xl { font-size: var(--t-display-xl); line-height: 0.92; letter-spacing: -0.035em; font-weight: 500; }
.display-lg { font-size: var(--t-display-lg); line-height: 0.96; letter-spacing: -0.03em; font-weight: 500; }
.display-md { font-size: var(--t-display-md); line-height: 1.02; letter-spacing: -0.025em; font-weight: 500; }
.h1 { font-size: var(--t-h1); line-height: 1.08; letter-spacing: var(--tracking-tight); font-weight: 500; }
.h2 { font-size: var(--t-h2); line-height: 1.15; letter-spacing: var(--tracking-tight); font-weight: 500; }
.h3 { font-size: var(--t-h3); line-height: 1.25; letter-spacing: var(--tracking-snug); font-weight: 600; }
.h4 { font-size: var(--t-h4); line-height: 1.4; letter-spacing: var(--tracking-snug); font-weight: 600; }
.overline { font-size: var(--t-overline); text-transform: uppercase; letter-spacing: var(--tracking-over); font-weight: 600; color: var(--ink-600); }
.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; }
.muted { color: var(--ink-500); }

/* ----------------- Buttons ----------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-pill);
  font-weight: 500; font-size: 15px; letter-spacing: -0.005em;
  transition: all var(--dur-micro) var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--ink-900); color: var(--cream-50); }
.btn-primary:hover { background: var(--blue-500); }
.btn-primary.is-blue { background: var(--blue-500); color: white; }
.btn-primary.is-blue:hover { background: var(--blue-600); }
.btn-ghost { background: transparent; color: var(--ink-900); border: 1px solid rgba(10,10,10,0.16); }
.btn-ghost:hover { background: rgba(10,10,10,0.04); }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-arrow::after { content: "→"; transition: transform var(--dur-micro) var(--ease-out); }
.btn-arrow:hover::after { transform: translateX(3px); }

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

/* ----------------- Section ----------------- */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-tight { padding: clamp(40px, 6vw, 80px) 0; }

/* ----------------- Misc ----------------- */
.hairline { border-top: var(--border-hairline); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(10,10,10,0.12);
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500;
  letter-spacing: -0.005em;
  background: rgba(255,255,255,0.6);
  color: var(--ink-700);
}
.tag-blue { color: var(--blue-600); border-color: rgba(37, 99, 235, 0.25); background: var(--blue-50); }
.tag-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Accessibility */
:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; border-radius: 4px; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(10,10,10,0.18); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(10,10,10,0.28); }

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee { display: flex; gap: 0; overflow: hidden; }
.marquee-inner {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 64px;
  flex-shrink: 0;
  padding-right: 64px;
}

/* Subtle blink */
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.blink { animation: blink 1s steps(1) infinite; }

/* Live pulse */
@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 138, 91, 0.5); }
  100% { box-shadow: 0 0 0 8px rgba(31, 138, 91, 0); }
}
.live-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: livepulse 1.6s infinite; }

/* Floaty animations */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Fade up */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fadeUp { /* entry animation removed — screenshot tools pause animations */ }

/* ====================================================================
   Baseten-inspired UI polish layer
   Tighter type, richer shadows, refined hover states, dense layouts.
   ==================================================================== */

/* ----- Typography polish ----- */
.display-xl, .display-lg, .display-md, .h1, .h2 { text-wrap: balance; }
h1, h2, h3 { font-feature-settings: "ss01", "cv01", "kern"; }

/* ----- Buttons (Baseten-style: tight, lifted, scale on hover) ----- */
.btn {
  border: 1px solid transparent;
  font-feature-settings: "ss01";
  letter-spacing: -0.01em;
  position: relative;
}
.btn::after { content: none; }
.btn-arrow > span:last-child::after,
.btn-arrow:not(:has(>span))::after {
  content: "→";
  margin-left: 4px;
  transition: transform var(--dur-micro) var(--ease-out);
  display: inline-block;
}
.btn-arrow:hover > span:last-child::after,
.btn-arrow:not(:has(>span)):hover::after { transform: translateX(3px); }

.btn-primary {
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 6px 18px rgba(10,10,10,0.10);
}
.btn-primary:hover {
  background: var(--blue-500);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.10) inset, 0 10px 28px rgba(37,99,235,0.22);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.is-blue:hover {
  background: var(--blue-600);
  box-shadow: 0 1px 0 rgba(255,255,255,0.10) inset, 0 10px 28px rgba(37,99,235,0.30);
}

.btn-ghost {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
  border-color: rgba(10,10,10,0.12);
}
.btn-ghost:hover { background: white; border-color: rgba(10,10,10,0.20); transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(0); }

/* ----- Section transitions: alternating subtle surfaces ----- */
.section--surface  { background: #FFFFFF; }
.section--cream    { background: var(--cream-50); }
.section--cream-2  { background: var(--cream-100); }
.section--dark     { background: var(--ink-900); color: var(--cream-50); }

/* "Boxed" wrapper — a card-like container around a section's content */
.boxed {
  background: white;
  border: 1px solid rgba(10,10,10,0.06);
  border-radius: var(--r-2xl);
  padding: clamp(32px, 5vw, 64px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 18px 48px rgba(10,10,10,0.04);
}
.boxed--dark { background: var(--ink-900); color: var(--cream-50); border-color: var(--ink-900); }

/* ----- Card polish (subtle border + lifted hover) ----- */
.card-polish {
  background: white;
  border: 1px solid rgba(10,10,10,0.06);
  border-radius: var(--r-xl);
  transition: all var(--dur-state) var(--ease-out);
  position: relative;
}
.card-polish::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset;
  opacity: 0; transition: opacity var(--dur-state) var(--ease-out);
}
.card-polish:hover {
  border-color: rgba(37,99,235,0.20);
  transform: translateY(-3px);
  box-shadow: 0 24px 64px rgba(10,10,10,0.07);
}
.card-polish:hover::before { opacity: 1; }

/* Apply polish to ANY card-like element we already have */
.product-card,
.deploy-card,
.usecase-card,
.quote-card,
.feat-card,
.tpl-card,
.howto-card,
.trust-card,
.ind-card,
.res-card,
.plan-card {
  border-radius: var(--r-xl);
  transition: transform var(--dur-state) var(--ease-out),
              box-shadow var(--dur-state) var(--ease-out),
              border-color var(--dur-state) var(--ease-out);
}
.product-card:hover:not(.is-feature),
.deploy-card:hover:not(.is-highlight),
.usecase-card:hover,
.quote-card:hover:not(.is-metric):not(.is-dark),
.feat-card:hover:not(.is-dark):not(.is-blue):not(.is-wide),
.tpl-card:hover,
.howto-card:hover,
.ind-card:hover,
.res-card:hover,
.plan-card:hover:not(.plan-card--highlight) {
  transform: translateY(-3px);
  box-shadow: 0 24px 64px rgba(10,10,10,0.08);
  border-color: rgba(37,99,235,0.22);
}

/* ----- Section heading polish ----- */
.sec-head h2 { text-wrap: balance; }
.sec-head__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--blue-600);
  margin-bottom: 14px;
}
.sec-head__eyebrow::before {
  content: ""; width: 18px; height: 1px; background: var(--blue-500);
}

/* ----- Hairline section divider ----- */
.hairline-band {
  border-top: 1px solid rgba(10,10,10,0.06);
  border-bottom: 1px solid rgba(10,10,10,0.06);
  background: rgba(245,239,229,0.4);
}

/* ----- Big-number tile (Baseten signature) ----- */
.big-num {
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.big-num + .big-num-sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-500);
  letter-spacing: 0;
}

/* ----- Tag/chip refinements ----- */
.tag, .tag-blue {
  font-feature-settings: "ss01";
  transition: all var(--dur-micro) var(--ease-out);
}
.tag:hover { border-color: rgba(10,10,10,0.20); }

/* ----- Refined overline (used heavily across pages) ----- */
.overline {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.10em;
  display: block;
}

/* ----- Inputs (the prompt hero, contact form) ----- */
input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  font-family: var(--font-sans);
  transition: border-color var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-micro) var(--ease-out);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue-500) !important;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

/* ----- Code blocks (Baseten uses these heavily) ----- */
pre {
  font-feature-settings: "ss01";
  font-variant-ligatures: none;
  -webkit-font-smoothing: subpixel-antialiased;
}

/* ----- Subtle background dot grid for hero / dark sections ----- */
.dotgrid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(10,10,10,0.06) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 75%);
}
.dotgrid--dark {
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
}

/* ----- Subtle text shimmer for stat numbers ----- */
.stat-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* ----- "All systems" status pill ----- */
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 8px;
  font-size: 12px; color: var(--ink-600);
  border: 1px solid rgba(10,10,10,0.10);
  border-radius: var(--r-pill);
  background: white;
}

/* ----- Smooth-scroll anchor offset for sticky nav ----- */
html { scroll-behavior: smooth; }
:target { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* ----- Nav: tighter dropdown ----- */
.site-nav__menu { animation: dropdown 180ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes dropdown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----- Section "spacer" decoration ----- */
.section-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--blue-50); color: var(--blue-600);
  border: 1px solid rgba(37,99,235,0.18);
  margin-bottom: 18px;
}

/* ----- Image / video placeholder treatment ----- */
.placeholder {
  background: linear-gradient(135deg, var(--cream-100), white);
  border: 1px dashed rgba(10,10,10,0.10);
  border-radius: var(--r-lg);
  color: var(--ink-400);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
