/* ============================================================
   Taktiks AI — brand tokens and shared primitives for kevin-web
   ------------------------------------------------------------
   ONE source of truth for both templates. Values match
   taktiks-ai-site/styles.css exactly, so somebody clicking
   "Open Kevin" on taktiks.ai does not land somewhere that looks
   like a different company.

   If a token changes here it must change there too, and in
   taktiks-ai-webapp/src/styles/globals.css, which is where the
   design language originates. Three copies is two too many, but
   they are three separate deployables; keeping them literally
   identical is the cheapest way to stop them diverging.
   ============================================================ */

:root {
  /* Brand */
  --navy:        #0E1B2C;
  --navy-deep:   #08111E;
  --navy-soft:   #1A2A40;
  --cream:       #F2EBDD;
  --bone:        #FAF6EC;
  --amber:       #C2691A;   /* brand accent — decorative use, larger type */
  --amber-warm:  #E89B3F;
  /* A darker amber for SMALL text and for button fills that carry bone text.
     The brand #C2691A gives only 3.65:1 on bone, which is fine for a landing
     page headline and not fine for an 10px label in a tool people read for
     work. #9A4F0C is the same hue at 5.56:1. Measured, not eyeballed. */
  --amber-text:  #9A4F0C;
  --slate:       #5C6877;
  --slate-light: #8A95A3;

  /* Semantic — what the app actually reaches for */
  --ink:    var(--navy);
  --muted:  var(--slate);
  --bg:     var(--bone);
  --panel:  #FFFFFF;
  --line:   rgba(14, 27, 44, 0.12);
  --accent: var(--amber-text);

  /* Roles specific to the chat surface */
  --user-bg:   #ECE4D4;   /* the client's own message: warm, recedes */
  --user-ink:  var(--navy);
  --guard-ok:  #556647;   /* verified citations — muted sage. 5.76:1 on bone;
                             the lighter #6B7F5B managed only 4.04:1 at 11px. */
  --guard-bad: #A33A28;
  --error:     #A33A28;
  --error-bg:  #F7EAE7;

  --font-display: 'Fraunces', Georgia, serif;
  --font-sans:    'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  --transition-fast: 0.12s ease;
}

/* Dark mode is kept — this is a working tool people use at night, and dropping
   it to match a landing page that has none would be a regression. Expressed in
   the same brand palette rather than a generic grey, so it still reads as
   Taktiks after dark. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:    var(--cream);
    --muted:  var(--slate-light);
    --bg:     var(--navy-deep);
    --panel:  var(--navy);
    --line:   rgba(242, 235, 221, 0.14);
    --accent: var(--amber-warm);

    --user-bg:   var(--navy-soft);
    --user-ink:  var(--cream);
    --guard-ok:  #9BB08A;
    --guard-bad: #E4867A;
    --error:     #E4867A;
    --error-bg:  rgba(163, 58, 40, 0.18);
  }
}

/* ---------- primitives shared by every page ---------- */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--amber); color: var(--bone); }

a { color: inherit; }

/* The wordmark, identical to the marketing site's. */
.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.wordmark .dot { color: var(--amber); }

/* Small uppercase mono label — used for tool progress, guard verdicts,
   metadata. Carried over from the marketing site's section labels. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

input, textarea, select {
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  width: 100%;
}
input:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}

button, .btn {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--bone);
  padding: 12px 20px;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}
button:hover, .btn:hover { opacity: 0.88; }
button:disabled { opacity: 0.45; cursor: default; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
