/* AI CFO by J.E.G Technologies - shared brand tokens and building blocks */
:root {
  --navy: #0B1F33;
  --navy-2: #12304B;      /* raised surface on navy */
  --navy-3: #1C3D5C;      /* hairlines on navy */
  --emerald: #12A67A;
  --emerald-dark: #0E8A65; /* hover / text on ivory */
  --emerald-on-dark: #2BC48F;
  --ivory: #F6F4EE;
  --paper: #FFFFFF;
  --slate: #3C4A58;
  --mist: #AFC0CF;        /* secondary text on navy */
  --rule: #D9D5CB;
  --rule-soft: #E8E5DD;
  --loss: #B4372A;
  --loss-soft: #F6E3DF;
  --gain-soft: #DDF2EA;

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-figure: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-control: 10px;
  --r-sheet: 4px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --focus: 0 0 0 3px var(--ivory), 0 0 0 5px var(--emerald);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.fig { font-family: var(--font-figure); font-feature-settings: "tnum" 1, "zero" 0; letter-spacing: -0.01em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Brand lockup ---------- */
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lockup img { width: 34px; height: 34px; }
.lockup-text { display: grid; line-height: 1; gap: 4px; }
.lockup-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: 0.01em; }
.lockup-by { font-family: var(--font-figure); font-size: 10.5px; color: var(--slate); }
.on-navy .lockup-by { color: var(--mist); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--navy); --fg: var(--ivory); --bd: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1.5px solid var(--bd); border-radius: var(--r-control);
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: 15.5px; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { --bg: var(--navy-2); --bd: var(--navy-2); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-emerald { --bg: var(--emerald); --fg: #fff; --bd: var(--emerald); }
.btn-emerald:hover { --bg: var(--emerald-dark); --bd: var(--emerald-dark); }
.btn-line { --bg: transparent; --fg: var(--navy); --bd: var(--navy); }
.btn-line:hover { --bg: var(--navy); --fg: var(--ivory); }
.on-navy .btn-line { --fg: var(--ivory); --bd: rgba(246,244,238,.45); }
.on-navy .btn-line:hover { --bg: var(--ivory); --fg: var(--navy); --bd: var(--ivory); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Form controls ---------- */
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 14.5px; }
.field .hint { font-size: 13.5px; color: var(--slate); }
.input {
  width: 100%; min-height: 52px; padding: 0 16px;
  border: 1.5px solid var(--rule); border-radius: var(--r-control);
  background: var(--paper); font-size: 17px;
}
.input:hover { border-color: #BEB9AD; }
.input:focus-visible { border-color: var(--emerald); }
.input[aria-invalid="true"] { border-color: var(--loss); }

.msg { font-size: 14.5px; border-radius: var(--r-control); padding: 12px 14px; }
.msg-error { background: var(--loss-soft); color: #7A2218; }
.msg-ok { background: var(--gain-soft); color: #0B5A42; }
.msg[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
