/* =========================================================
   Freedom Trading School — Core tokens + semantic element styles
   Load this file FIRST in any page that uses the brand system.
   ========================================================= */

/* ---------- Fonts (Google Fonts; swap for real brand fonts if provided) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ----- Brand colors (sampled directly from the logo) ----- */
  --navy-900:  #071834;   /* "Freedom" wordmark, primary text */
  --navy-800:  #0F2447;   /* soft body navy */
  --navy-700:  #1B3260;
  --blue-600:  #1778A5;   /* deep brand blue (left side of mark) */
  --blue-500:  #2A8FBC;
  --teal-500:  #38B3B3;   /* primary teal (right side of mark, "TRADING SCHOOL") */
  --teal-400:  #5AC6C3;   /* hover teal */
  --teal-300:  #8BD8D5;
  --teal-200:  #BDEBE8;
  --mist-100:  #EAF6F6;   /* teal-tinted surface */
  --mist-50:   #F5FAFA;

  /* ----- Neutrals ----- */
  --paper:     #FFFFFF;
  --ink-900:   #0B1B36;
  --ink-700:   #2A3A55;
  --ink-500:   #4A5B72;   /* secondary text */
  --ink-300:   #9AA7BA;   /* tertiary / captions */
  --ink-200:   #C7CFDB;
  --line:      #E2E8F0;   /* borders, dividers */
  --line-soft: #EEF2F7;

  /* ----- Semantic (markets) ----- */
  --up:        #16A37B;   /* gain / positive PnL */
  --up-bg:     #E7F6EF;
  --down:      #D94A4A;   /* loss / negative PnL */
  --down-bg:   #FBECEC;
  --warn:      #E0A93B;
  --warn-bg:   #FBF2DE;

  /* ----- Signature gradient (logo mark) ----- */
  --grad-brand: linear-gradient(90deg, #1778A5 0%, #38B3B3 100%);
  --grad-brand-135: linear-gradient(135deg, #1778A5 0%, #38B3B3 100%);

  /* ----- Type families ----- */
  --font-display: 'Manrope', ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ----- Type scale (base 16, ratio 1.25) ----- */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   20px;
  --fs-xl:   24px;
  --fs-2xl:  30px;
  --fs-3xl:  38px;
  --fs-4xl:  48px;
  --fs-5xl:  60px;
  --fs-6xl:  76px;

  /* ----- Line heights ----- */
  --lh-tight: 1.1;
  --lh-snug:  1.25;
  --lh-base:  1.55;
  --lh-loose: 1.75;

  /* ----- Tracking ----- */
  --ls-tight:   -0.02em;
  --ls-normal:  0;
  --ls-wide:    0.08em;
  --ls-caps:    0.14em;

  /* ----- Spacing (4px base) ----- */
  --s-0: 0;
  --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;

  /* ----- Radii ----- */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 999px;

  /* ----- Shadows (navy-tinted, never pure black) ----- */
  --shadow-xs: 0 1px 1px rgba(7,24,52,0.04);
  --shadow-sm: 0 1px 2px rgba(7,24,52,0.06), 0 1px 2px rgba(7,24,52,0.04);
  --shadow-md: 0 6px 20px rgba(7,24,52,0.08), 0 2px 6px rgba(7,24,52,0.05);
  --shadow-lg: 0 20px 48px rgba(7,24,52,0.12), 0 6px 16px rgba(7,24,52,0.06);
  --shadow-ring-teal: 0 0 0 3px rgba(56,179,179,0.35);

  /* ----- Motion ----- */
  --ease-out:  cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-micro: 180ms;
  --dur-base:  320ms;
  --dur-slow:  600ms;

  /* ----- Layout ----- */
  --container: 1200px;
  --container-app: 1320px;
  --gutter: 24px;
}

/* =========================================================
   Semantic element styles — use by adding classes, OR these
   read as sensible defaults on bare tags inside .fts-scope.
   ========================================================= */

.fts-scope,
body.fts {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--ink-700);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.fts-scope h1, h1.fts-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(var(--fs-4xl), 6vw, var(--fs-6xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--navy-900);
  margin: 0 0 var(--s-5);
  text-wrap: balance;
}
.fts-scope h2, h2.fts-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(var(--fs-2xl), 3.6vw, var(--fs-4xl));
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--navy-900);
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}
.fts-scope h3, h3.fts-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  color: var(--navy-900);
  margin: 0 0 var(--s-3);
}
.fts-scope h4, h4.fts-h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  color: var(--navy-900);
  margin: 0 0 var(--s-2);
}
.fts-scope p, p.fts-p {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: var(--ink-700);
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
}

.fts-eyebrow, .fts-scope .eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--teal-500);
}

.fts-lead {
  font-size: var(--fs-lg);
  color: var(--ink-500);
  line-height: var(--lh-base);
}

.fts-mono, code.fts-code {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "ss01" 1;
}

.fts-scope a, a.fts-link {
  color: var(--blue-600);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out);
}
.fts-scope a:hover, a.fts-link:hover {
  color: var(--teal-500);
  border-bottom-color: var(--teal-500);
}

/* Buttons --------------------------------------------------- */
.fts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 44px;
  padding: 0 var(--s-5);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-base);
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-micro) var(--ease-out),
              color var(--dur-micro) var(--ease-out),
              transform var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-micro) var(--ease-out);
  white-space: nowrap;
  user-select: none;
}
.fts-btn:active { transform: scale(0.98); }
.fts-btn:focus-visible { outline: none; box-shadow: var(--shadow-ring-teal); }

.fts-btn--primary,
.fts-scope a.fts-btn--primary {
  background: var(--navy-900);
  color: #fff;
}
.fts-btn--primary:hover,
.fts-scope a.fts-btn--primary:hover { background: var(--navy-800); color: #fff; }

.fts-btn--teal,
.fts-scope a.fts-btn--teal {
  background: var(--teal-500);
  color: #fff;
}
.fts-btn--teal:hover,
.fts-scope a.fts-btn--teal:hover { background: var(--teal-400); color: #fff; }

.fts-btn--gradient,
.fts-scope a.fts-btn--gradient {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.fts-btn--gradient:hover { filter: brightness(1.05); box-shadow: var(--shadow-md); }

.fts-btn--ghost,
.fts-scope a.fts-btn--ghost {
  background: rgba(255,255,255,0.6);
  color: var(--navy-900);
  border-color: var(--line);
}
.fts-btn--ghost:hover,
.fts-scope a.fts-btn--ghost:hover { background: #fff; border-color: var(--teal-500); color: var(--teal-500); }
.fts-btn--ghost.on-dark,
.fts-scope a.fts-btn--ghost.on-dark { background: rgba(255,255,255,0.10); color: #fff; border-color: rgba(255,255,255,0.55); }
.fts-btn--ghost.on-dark:hover,
.fts-scope a.fts-btn--ghost.on-dark:hover { background: #fff; border-color: #fff; color: var(--navy-900); }

/* High-contrast inverse button for dark backgrounds */
.fts-btn--inverse,
.fts-scope a.fts-btn--inverse { background: #fff; color: var(--navy-900); }
.fts-btn--inverse:hover,
.fts-scope a.fts-btn--inverse:hover { background: var(--teal-200); color: var(--navy-900); }

.fts-btn--sm { height: 36px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
.fts-btn--lg { height: 52px; padding: 0 var(--s-6); font-size: var(--fs-md); }

/* Cards --------------------------------------------------- */
.fts-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s-5);
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
}
.fts-card--hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.fts-card--feature {
  border: none;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: var(--s-6);
}

/* Badges / pills --------------------------------------------------- */
.fts-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xs);
  letter-spacing: 0.01em;
  background: var(--mist-100);
  color: var(--blue-600);
}
.fts-badge--up   { background: var(--up-bg);   color: var(--up); }
.fts-badge--down { background: var(--down-bg); color: var(--down); }
.fts-badge--solid { background: var(--navy-900); color: #fff; }

/* Inputs --------------------------------------------------- */
.fts-input {
  width: 100%;
  height: 44px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--ink-900);
  transition: border-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
}
.fts-input:focus { outline: none; border-color: var(--teal-500); box-shadow: var(--shadow-ring-teal); }
.fts-input::placeholder { color: var(--ink-300); }

/* Utility --------------------------------------------------- */
.fts-gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fts-divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: var(--s-6) 0;
}
.fts-divider--gradient {
  height: 2px;
  background: var(--grad-brand);
  border: 0;
}
