/* ===========================================================
   RelayAI — shared design system
   Marketing + Docs run light (warm paper, restrained premium).
   Console runs dark (see [data-theme="dark"] overrides).
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* warm paper light theme */
  --paper:      #F4F2EC;   /* page bg */
  --surface:    #FFFFFF;   /* cards */
  --surface-2:  #FAF8F3;   /* subtle raised */
  --ink:        #16171B;   /* near-black */
  --ink-2:      #565963;   /* muted body */
  --ink-3:      #8C8F99;   /* faint / captions */
  --line:       rgba(22,23,27,.09);
  --line-2:     rgba(22,23,27,.16);

  --accent:     #2454F0;   /* trust blue */
  --accent-700: #1B3FC4;
  --accent-300: #6E92FF;
  --accent-soft:rgba(36,84,240,.08);
  --accent-line:rgba(36,84,240,.22);

  --green:      #0F9D6B;   /* compliant */
  --green-soft: rgba(15,157,107,.10);
  --gold:       #B57A1F;   /* global / paid */
  --gold-soft:  rgba(181,122,31,.12);
  --rose:       #D6325A;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --sans: 'IBM Plex Sans', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --shadow-sm: 0 1px 2px rgba(22,23,27,.04), 0 1px 3px rgba(22,23,27,.06);
  --shadow:    0 2px 6px rgba(22,23,27,.05), 0 10px 30px rgba(22,23,27,.07);
  --shadow-lg: 0 8px 24px rgba(22,23,27,.08), 0 24px 60px rgba(22,23,27,.10);

  --maxw: 1160px;
}

* , *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display:block; }
::selection { background: var(--accent-soft); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---- type ---- */
.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
h1,h2,h3,h4 { letter-spacing: -.02em; line-height: 1.12; font-weight: 600; }

/* ---- buttons ---- */
.btn {
  display:inline-flex; align-items:center; gap:.5em;
  font: 600 15px/1 var(--sans);
  padding: 12px 20px; border-radius: 10px;
  cursor:pointer; border:1px solid transparent;
  transition: transform .16s cubic-bezier(.2,.7,.3,1), background .16s, box-shadow .16s, border-color .16s;
  white-space: nowrap;
}
.btn i { font-size: 1.15em; }
.btn-primary { background: var(--accent); color:#fff; box-shadow: 0 1px 2px rgba(36,84,240,.35), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { background: var(--accent-700); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(36,84,240,.30); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover { color: var(--ink); }
.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: 12px; }

/* ---- chips / badges ---- */
.chip {
  display:inline-flex; align-items:center; gap:.4em;
  font-size:12.5px; font-weight:500;
  padding: 5px 11px; border-radius: 100px;
  border:1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
}
.chip.compliant { color: var(--green); background: var(--green-soft); border-color: rgba(15,157,107,.22); }
.chip.global { color: var(--gold); background: var(--gold-soft); border-color: rgba(181,122,31,.24); }
.chip.brand { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }

/* ---- nav (shared, light) ---- */
.nav {
  position: sticky; top:0; z-index: 80;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav-in { display:flex; align-items:center; justify-content:space-between; height: 66px; max-width: var(--maxw); margin:0 auto; padding: 0 28px; }
.brand { display:flex; align-items:center; gap:9px; font-weight:600; font-size:18px; letter-spacing:-.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent);
  display:grid; place-items:center; color:#fff;
  font-family: var(--mono); font-weight:600; font-size:15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(36,84,240,.4);
}
.brand-mark-img { height: 30px; width:auto; flex:none; display:block; }
.brand-sub { font-size:11px; color:var(--ink-3); font-weight:500; margin-left:-3px; align-self:flex-end; padding-bottom:3px; white-space:nowrap; letter-spacing:.02em; }
.nav-links { display:flex; gap: 30px; align-items:center; font-size: 14.5px; color: var(--ink-2); }
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display:flex; gap: 10px; align-items:center; }
@media (max-width: 860px){ .nav-links { display:none; } }

/* ---- section scaffold ---- */
.section { padding: 96px 0; }
.section-head { max-width: 640px; }
.section-head.center { margin: 0 auto; text-align:center; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 14px 0 14px; }
.section-head p { font-size: 17px; color: var(--ink-2); }

/* ---- reveal on scroll: hiding is applied per-element by JS (inline), never by a blanket rule,
   so capture / no-JS always shows content. CSS only provides the easing. ---- */
html.reveal-ready [data-reveal] { transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
@media (prefers-reduced-motion: reduce){ html.reveal-ready [data-reveal]{ transition:none !important; } html{scroll-behavior:auto;} }

/* ========================== DARK (console) ========================== */
[data-theme="dark"] {
  --paper:     #0B0C10;
  --surface:   #14161D;
  --surface-2: #1B1E27;
  --ink:       #ECEEF4;
  --ink-2:     #9A9FB0;
  --ink-3:     #646A7C;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.15);
  --accent:    #4C7BFF;
  --accent-700:#3A66E8;
  --accent-soft: rgba(76,123,255,.12);
  --accent-line: rgba(76,123,255,.28);
  --green:     #2BD899;
  --green-soft: rgba(43,216,153,.12);
  --gold:      #F0B84A;
  --gold-soft: rgba(240,184,74,.13);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 2px 8px rgba(0,0,0,.4);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.5);
}
[data-theme="dark"] .brand-mark { box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
