/* TG3 SaaS — Design tokens v0.5
   Palette refit to user's reference: navy + bright cobalt + white + light cool surfaces.
*/

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

:root {
  /* ============ Surfaces ============ */
  --white:     #FFFFFF;
  --bone:      #E9EFF8;   /* cool off-white — deepened so section alternation actually reads against white */
  --bone-2:    #DAE4F1;   /* surface deep */
  --navy:      #0F2A4D;   /* sidebar, dark band, footer — replaces ink-black */
  --navy-deep: #08182E;
  --navy-2:    #1A3863;   /* hover/border on navy */
  --ink:       #0B1730;   /* primary text on white (very dark navy, not pure black) */

  /* ============ Cobalt — primary signal ============ */
  --cobalt:        #1A6FE3;   /* CTA, link, selected, highlight */
  --cobalt-deep:   #0F4FB8;
  --cobalt-bright: #4A93F0;   /* on-navy variant */
  --cobalt-soft:   #DCE9FA;   /* chip bg, hover band */
  --sky:           #5A95E5;   /* gradient mid */

  /* ============ Neutrals (cool) ============ */
  --slate:    #2A3548;     /* body text on white */
  --slate-2:  #5A6478;     /* secondary text */
  --slate-3:  #8893A7;     /* tertiary text, captions */
  --border:   #D9E2EC;     /* divider */
  --border-strong: #BFCDDE;
  --mist:     #E5ECF4;

  /* ============ Status (used sparingly) ============ */
  --success: #1FB372;
  --warn:    #E3A626;       /* desaturated amber for state dots only — NOT a brand color */
  --danger:  #C73838;

  /* ============ Tertiary — chart data only (brief-locked) ============ */
  --lime:    #C7F03D;       /* never on copy or CTAs */

  /* ============ Gradient (signature) ============
     Used once per page max. Hero backdrop or single section divider.
     Matches the reference: sky → cobalt → navy.
  */
  --grad-brand: linear-gradient(135deg, #5A95E5 0%, #1E5FCB 45%, #0F2A4D 100%);
  --grad-brand-soft: linear-gradient(180deg, #EAF0F7 0%, #D9E6F7 100%);

  /* ============ Type stack ============ */
  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --fs-display: clamp(56px, 7vw, 120px);
  --fs-h1:      clamp(40px, 5vw, 80px);
  --fs-h2:      clamp(32px, 3.5vw, 52px);
  --fs-h3:      clamp(24px, 2vw, 32px);
  --fs-h4:      20px;
  --fs-body-lg: 19px;
  --fs-body:    17px;
  --fs-sm:      15px;
  --fs-xs:      13px;
  --fs-eyebrow: 12px;

  --lh-display: 0.95;
  --lh-tight:   1.08;
  --lh-h:       1.12;
  --lh-body:    1.55;

  --ls-display: -0.025em;
  --ls-h:       -0.018em;
  --ls-eyebrow: 0.14em;

  /* ============ Spacing (4pt) ============ */
  --s-1:  4px;  --s-2:  8px;  --s-3:  12px; --s-4:  16px;
  --s-5:  24px; --s-6:  32px; --s-7:  48px; --s-8:  64px;
  --s-9:  96px; --s-10: 128px; --s-11: 192px;

  /* ============ Grid ============ */
  --container: 1280px;
  --container-tight: 1080px;
  --gutter: 88px;
  --pad-y:  96px;

  /* ============ Radii ============ */
  --r-xs: 2px;
  --r-sm: 6px;     /* slightly softer than v0.4 — matches reference */
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* ============ Motion ============ */
  --d-fast: 120ms;
  --d-base: 200ms;
  --d-slow: 320ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* ============ Shadows ============ */
  --shadow-1: 0 1px 2px rgba(15,42,77,0.04), 0 0 0 1px rgba(15,42,77,0.04);
  --shadow-2: 0 10px 30px rgba(15,42,77,0.10), 0 1px 2px rgba(15,42,77,0.05);
  --shadow-navy: 0 16px 40px rgba(8,24,46,0.28);
}

/* ============ Surface helpers ============ */
.on-bone, .on-white {
  background: var(--bone);
  color: var(--ink);
  --emphasis: var(--cobalt);
}
.on-white { background: var(--white); }

.on-navy {
  background: var(--navy);
  color: var(--white);
  --signal:        var(--cobalt-bright);
  --emphasis:      var(--cobalt-bright);
  --border:        rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.20);
  --slate:         #CFD6E2;
  --slate-2:       #9DA8BC;
  --slate-3:       #6F7B92;
}

.on-grad {
  background: var(--grad-brand);
  color: var(--white);
  --signal:        var(--white);
  --emphasis:      var(--white);
  --border:        rgba(255,255,255,0.16);
  --border-strong: rgba(255,255,255,0.28);
  --slate-2:       #D6DEEC;
  --slate-3:       #A8B4CC;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--ls-h);
  line-height: var(--lh-h);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--ls-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0; text-wrap: pretty; }

.mono { font-family: var(--font-mono); font-feature-settings: "ss01", "cv01"; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--slate-2);
  font-weight: 500;
}

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

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--d-fast) var(--ease-out),
              border-color var(--d-fast) var(--ease-out),
              color var(--d-fast) var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--cobalt);
  color: var(--white);
  border-color: var(--cobalt);
}
.btn-primary:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--cobalt); color: var(--cobalt); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn-on-grad {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn-on-grad:hover { background: #F0F4FA; }
.btn .arrow { display: inline-block; transition: transform var(--d-fast) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============ Chips ============ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: transparent;
  text-transform: uppercase;
  color: var(--slate-2);
}
.chip-active {
  background: var(--cobalt);
  color: var(--white);
  border-color: var(--cobalt);
}
.chip-outline {
  color: var(--cobalt);
  border-color: var(--cobalt);
}
.chip-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cobalt); display: inline-block;
}

/* ============ Utility ============ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.text-cobalt   { color: var(--cobalt); }
.text-emphasis { color: var(--emphasis, var(--cobalt)); }
.text-slate-2  { color: var(--slate-2); }
.text-slate-3  { color: var(--slate-3); }

/* ============ Announcement bar ============ */
:root { --announce-h: 44px; }

.tg3-announce {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--announce-h);
  background: var(--navy-deep);
  border-bottom: 1px solid var(--navy-2);
  display: flex; align-items: center;
}
.tg3-announce-inner {
  width: 100%; max-width: var(--container); margin: 0 auto;
  padding: 0 32px; display: flex; align-items: center; gap: 24px;
}
.tg3-announce .msg {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  font-size: 13px; color: rgba(255,255,255,0.82);
}
.tg3-announce .msg .tag {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--navy-deep); background: var(--cobalt-bright);
  padding: 3px 8px; border-radius: var(--r-xs); white-space: nowrap;
}
.tg3-announce .msg .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg3-announce .msg .txt b { color: #fff; font-weight: 600; }
.tg3-announce .links { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.tg3-announce .links a {
  font-size: 12px; font-weight: 500; white-space: nowrap;
  color: rgba(255,255,255,0.66);
  transition: color var(--d-fast) var(--ease-out);
}
.tg3-announce .links a:hover { color: #fff; }
.tg3-announce .links a.cta { color: var(--cobalt-bright); }
.tg3-announce .links a.cta:hover { color: #fff; }
.tg3-announce .dismiss {
  display: grid; place-items: center; flex: none;
  background: none; border: 0; cursor: pointer; padding: 6px; margin-left: 2px;
  color: rgba(255,255,255,0.5); transition: color var(--d-fast) var(--ease-out);
}
.tg3-announce .dismiss:hover { color: #fff; }
.tg3-announce .dismiss svg { width: 16px; height: 16px; display: block; }

/* offset the fixed nav + content while the bar is present */
body.has-announce { padding-top: var(--announce-h); }
body.has-announce .nav { top: var(--announce-h); }
html.announce-off body.has-announce { padding-top: 0; }
html.announce-off body.has-announce .nav { top: 0; }
html.announce-off .tg3-announce { display: none; }

@media (max-width: 820px) {
  .tg3-announce .links a:not(.cta) { display: none; }
}
@media (max-width: 560px) {
  .tg3-announce .msg .tag { display: none; }
  .tg3-announce-inner { padding: 0 20px; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
