/* ============================================================
   personality-test-hub, base.css
   CSS variables, reset, base typography
   Brand contract: PROJECTS/personality-test-hub/AURA_DESIGN_SYSTEM.md
   ============================================================ */

/* Brand fonts, Fraunces (display serif, brand/hero/insight moments only)
   + Plus Jakarta Sans (all UI/body; Inter kept in fallback stack) */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties (Design Tokens) ---------- */
:root {
  /* Backgrounds */
  --bg-primary:    #0f0f1a;
  --bg-secondary:  #1a1a2e;
  --bg-card:       #16213e;

  /* Text */
  --text-primary:   #e8e8f0;
  --text-secondary: #a0a0b8;

  /* Accents */
  --accent-primary:   #4a9eff;
  --accent-secondary: #6c5ce7;

  /* Brand spectrum (proportion rule: blue anchor · violet core · rose accent · gold authority-only) */
  --brand-blue:   #4D8EFF;
  --brand-violet: #8B5CF6;
  --brand-rose:   #F472B6;
  --brand-gold:   #F6C76A;
  --brand-mint:   #4EDEA3;

  /* Domain data-encoding (engine keys stay v8: Mind/Self/Talent/Relationship/Direction) */
  --dom-mind:         var(--brand-blue);   /* public: Identity */
  --dom-self:         var(--brand-rose);   /* public: Emotion */
  --dom-talent:       var(--brand-gold);   /* public: Strengths */
  --dom-relationship: var(--brand-mint);   /* public: Relationship */
  --dom-direction:    var(--brand-violet); /* public: Direction/Career */

  /* MBTI dimension colors */
  --color-E: #ff6b6b;
  --color-I: #4ecdc4;
  --color-S: #ffe66d;
  --color-N: #a29bfe;
  --color-T: #74b9ff;
  --color-F: #fd79a8;
  --color-J: #00b894;
  --color-P: #e17055;

  /* Spacing scale */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography, hybrid: sans for ALL UI, serif ONLY for brand/hero/insight moments */
  --font-primary: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  3rem;
  --text-display: 4rem;

  /* Radii */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-card:      0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-elevated:  0 8px 32px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

/* ---------- Base Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- Utility: visually hidden (a11y) ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Utility: text alignment ---------- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ---------- Utility: margin helpers ---------- */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ---------- Brand display type (AURA_DESIGN_SYSTEM.md §3) ----------
   Serif = Fraunces, ONLY on brand/hero/quote/big-insight moments.
   HARD RULE: never on buttons, nav, badges, inputs, labels, data. */
.hero__title,
.journey-statement__text,
.blueprint-signal__title,
.final-cta__title,
.dash-title,
.lib-hero__title,
.font-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}
