/* Self-hosted Inter (latin subset, variable range) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-300-700.65850a373e25.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Self-hosted IBM Plex Mono (latin) — uppercase technical label face */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono/ibm-plex-mono-latin-400.79936b18df9f.woff2") format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono/ibm-plex-mono-latin-500.b1c8a895f5fd.woff2") format('woff2');
}

/**
 * core.css - Shared Design System
 * 
 * This file contains the foundational styles shared across all pages:
 * - CSS Reset
 * - Design Tokens (CSS Variables)
 * - Light Theme (Light mode only)
 * - Shared Components
 * - Accessibility Utilities
 */

/* ==========================================================================
   CSS RESET
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

input,
button,
select,
textarea {
  font: inherit;
}

a {
  text-decoration: none;
}

/* ==========================================================================
   DESIGN TOKENS - CSS VARIABLES
   ========================================================================== */

:root {
  /* Shared rectangular UI radius. Keep circles and joined edges explicit. */
  --radius-ui: 6px;

  /* Gradient Colors */
  --grad-a: #87CEEB;           /* Sky blue - Light theme */
  --grad-b: #F4A460;           /* Sandy orange - Light theme */
  
  /* Backgrounds */
  --bg: #fafafa;
  --bg-muted: #f5f6fa;
  --panel: #ffffff;
  --panel-muted: #f2f3f7;
  
  /* Text */
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  
  /* Borders & Shadows */
  --border: #e5e7eb;
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, .06);
  --shadow-glow: 0 2px 8px rgba(135, 206, 235, .2);
  
  /* Brand */
  --brand: #111827;
  --accent: #1E88E5;
  --accent-dark: #1565C0;
  --accent-bg: rgba(30, 136, 229, 0.1);
  
  /* Semantic accent: AI / purple */
  --accent-ai: #7B1FA2;
  --accent-ai-bg: rgba(123, 31, 162, 0.1);

  /* Semantic accent: cognitive (blue) & manual (orange) */
  --cognitive-accent: #0D47A1;
  --manual-accent: #BF360C;
  
  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, .8);
  --glass-border: rgba(255, 255, 255, .5);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, .06), 0 0 0 1px rgba(0, 0, 0, .02);
  
  /* Avatar */
  --avatar-ring: rgba(244, 164, 96, 0.45);
  
  /* Derived */
  --sidebar-bg: var(--panel-muted);
  --content-bg: var(--panel);
  --divider-contrast: var(--border);

  /* ── Typographic Scale ──────────────────────────────────── */
  --font-2xl:  1.85rem;   /* Page-level selectors / hero labels       */
  --font-xl:   1.75rem;   /* Stat hero values                         */
  --font-lg:   1.25rem;   /* Panel titles (info card headings)        */
  --font-md:   1.1rem;    /* Section titles, card titles, large values */
  --font-base: 0.85rem;   /* Body text, descriptions, subtitles       */
  --font-sm:   0.75rem;   /* Captions, legends, table headers, footer */
  --font-xs:   0.65rem;   /* Badges, rank pills, micro labels         */

  /* ── Cohere design system (additive — landing + case_study only) ────
     These tokens layer the Cohere editorial palette/scale on top of the
     existing brand tokens WITHOUT changing any value above, so the
     out-of-scope app/ dashboard renders unchanged. The blue→orange
     gradient (--grad-a/--grad-b) is retained as Plek's brand accent. */

  /* Palette */
  --canvas:      #ffffff;   /* pure white page/surface                     */
  --ink:         #17171c;   /* primary text + near-black pill              */
  --ink-2:       #212121;   /* secondary ink                              */
  --slate:       #93939f;   /* muted labels / metadata                    */
  --hairline:    #d9d9dd;   /* 1px rules / dividers                        */
  --coral:       #ff7759;   /* taxonomy chips / warm accent (sparingly)   */
  --coral-soft:  #ffad9b;   /* pale coral chip borders                    */
  --action-blue: #1863dc;   /* links / secondary emphasis (sparingly)     */
  --deep-green:  #003c33;   /* dark full-width bands                       */
  --navy:        #071829;   /* alt dark band                              */
  --soft-stone:  #eeece7;   /* warm neutral surface (product cards)       */
  --error:       #b30000;   /* form validation / destructive text         */

  /* Compatibility aliases: all rectangular UI uses the shared 6px radius. */
  --r-xs:   var(--radius-ui);
  --r-sm:   var(--radius-ui);
  --r-md:   var(--radius-ui);
  --r-lg:   var(--radius-ui);   /* media-card compatibility alias */
  --r-xl:   var(--radius-ui);
  --r-pill: var(--radius-ui);

  /* Mono label face */
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}


/* ==========================================================================
   BASE TYPOGRAPHY
   ========================================================================== */

html {
  color-scheme: light;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  transition: background-color .25s ease, color .25s ease;
}

/* ==========================================================================
   SHARED COMPONENTS
   ========================================================================== */

/* Glass Panel
   ========================================================================== */

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-ui, 6px);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.glass-panel h1 {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  transition: text-shadow 0.3s ease;
}

/* Gradient Text
   ========================================================================== */

.gradient-text {
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow Button
   ========================================================================== */

.glow-button {
  padding: .65rem 1.25rem;
  border-radius: var(--radius-ui, 6px);
  border: none;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  font-weight: 300;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: var(--shadow-glow);
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}

.glow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(135, 206, 235, .25);
}

/* Gradient Pill Button
   ========================================================================== */

.btn-gradient-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: none;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  border-radius: var(--r-pill);
  font-weight: 500; cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: opacity 0.2s ease;
}
.btn-gradient-pill:hover { opacity: 0.85; }
.btn-gradient-pill:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-gradient-pill:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }


/* The `breathe` keyframes lived here for the gradient dot beside the old text
   wordmark. Every surface now draws the shipped lockup instead, and nothing
   referenced the animation any more. */

/* ==========================================================================
   SEMANTIC TEXT UTILITIES (dashboard)
   Use these classes in HTML instead of per-component font-weight overrides.
   The content-area sets: font-weight 400, line-height 1.6, font-size --font-base.
   Everything inherits those defaults — only add a class when you need to differ.
   ========================================================================== */

/* Titles: card headings, section titles */
.text-title  { font-weight: 600; }

/* Key numeric values: costs, counts, stats */
.text-value  { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Labels above values / small captions */
.text-label  { font-size: var(--font-sm); color: var(--text-secondary); }

/* Muted body text / descriptions */
.text-muted  { color: var(--text-secondary); }

/* Accent-coloured text */
.text-accent { color: var(--accent-dark); }


/* ==========================================================================
   COHERE UTILITIES (additive — for landing + case_study)
   ========================================================================== */

/* Uppercase technical/eyebrow label rendered in the mono face. */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}

/* 1px hairline divider — flat depth cue in place of shadows. */
.hairline {
  border: 0;
  border-top: 1px solid var(--hairline);
}


/* ==========================================================================
   ACCESSIBILITY UTILITIES
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   MOTION PREFERENCES
   ========================================================================== */

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