/* ═══════════════════════════════════════════════════════════
   CK Global Academy — Design Tokens
   ═══════════════════════════════════════════════════════════
   Central source of truth for every visual primitive.
   All component styles reference these tokens — never hard-
   code hex codes, pixel values or font stacks outside this
   file.

   Sections:
     1. Core Brand Surfaces
     2. Brand Accents
     3. Semantic Text Colors
     4. Gradients
     5. Typography — Font Stacks
     6. Typography — Type Scale (fluid, clamp-based)
     7. Typography — Line Heights & Letter Spacing
     8. Spacing System (8 px grid)
     9. Radii & Shadows
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── 0. Brand Heritage Colors ─── */
  --ck-plum:          #4E2247;   /* Lighter, vibrant Plum (Hero Brand Tone)    */
  --ck-milk:          #FFF3E5;   /* Warm Milk (Canvas & Light Accent Tone)    */
  --ck-cream:         #FFF8F0;   /* Luscious Warm Cream                       */
  --ck-cloud-white:   #F8FAFC;   /* Crisp Editorial Cloud White               */
  --ck-punchy-pink:   #DD3A44;   /* Energetic Punchy Pink Accent              */
  --ck-punchy-pink-hover:  #C52833;
  --ck-punchy-pink-subtle: rgba(221, 58, 68, 0.12);
  --ck-gradient-pink: linear-gradient(135deg, #DD3A44 0%, #FF5A67 100%);

  /* ── 1. Core Brand Surfaces (Dark Mode — Midnight Blue Canvas) */
  --ck-dark:          #1A0B18;   /* Primary canvas — deep velvety plum        */
  --ck-surface-1:     #27112A;   /* Card backgrounds — rich plum tone         */
  --ck-surface-2:     #381838;   /* Elevated card / modal — pure Plum token   */
  --ck-surface-3:     #4A2248;   /* Highlight / interactive surface           */
  --ck-border:        rgba(230, 115, 150, 0.14); /* Subtle plum dividers                      */
  --ck-border-strong: rgba(230, 115, 150, 0.28); /* Defined plum borders                       */

  /* ── 2. Brand Accents ───────────────────────────────── */
  --ck-accent:        #E67396;   /* Radiant Plum Rose (primary dark accent)   */
  --ck-accent-hover:  #F28BA9;   /* Hover state                               */
  --ck-accent-subtle: rgba(230, 115, 150, 0.16); /* Backgrounds, highlights   */
  --ck-accent-rgb:    230, 115, 150;
  --ck-gold:          #F28BA9;   /* Plum Rose tone — headlines/stars          */
  --ck-gold-subtle:   rgba(242, 139, 169, 0.16);
  --ck-green:         #22C55E;   /* Success states, checkmarks                */
  --ck-red:           #EF4444;   /* Error states, alerts                      */

  /* ── 3. Semantic Text Colors (Dark Mode) ────────────── */
  --ck-text:          #F8FAFC;   /* Primary body text                         */
  --ck-text-2:        #E2E8F0;   /* Secondary / meta text                     */
  --ck-text-3:        #94A3B8;   /* Placeholder / muted text                  */
  --ck-text-inverse:  #1A0B18;   /* Text on buttons                           */

  /* ── 4. Gradients ───────────────────────────────────── */
  --ck-gradient-hero:   linear-gradient(125deg, #040A18 0%, #050811 36%, #08060D 60%, #10040B 84%, #18040F 100%);
  --ck-gradient-card:   linear-gradient(150deg, #381838 0%, #25102A 100%);
  --ck-gradient-accent: linear-gradient(135deg, #E67396 0%, #BF4B75 100%);
  --ck-gradient-gold:   linear-gradient(135deg, #F28BA9 0%, #E67396 50%, #C24B75 100%);
  --ck-gradient-glass:  linear-gradient(135deg, rgba(255,243,229,0.10) 0%, rgba(255,243,229,0.02) 100%);
  --ck-gradient-milk:   linear-gradient(135deg, #FFF3E5 0%, #F5E0CB 100%);

  /* ── 5. Typography — Font Stacks (Geist Exclusive) ── */
  --ck-font-display: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ck-font-body:    'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ck-font-mono:    'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* ── 6. Typography — Type Scale (fluid, clamp-based) ── */
  --ck-text-xs:   0.75rem;                          /* 12 px — captions, labels  */
  --ck-text-sm:   0.875rem;                         /* 14 px — small body        */
  --ck-text-base: 1rem;                             /* 16 px — base body         */
  --ck-text-lg:   1.125rem;                         /* 18 px — large body        */
  --ck-text-xl:   clamp(1.25rem,  1.5vw, 1.5rem);  /* 20–24 px                  */
  --ck-text-2xl:  clamp(1.5rem,   2vw,   1.875rem);/* 24–30 px                  */
  --ck-text-3xl:  clamp(1.875rem, 3vw,   2.5rem);  /* 30–40 px                  */
  --ck-text-4xl:  clamp(2.25rem,  4vw,   3.5rem);  /* 36–56 px                  */
  --ck-text-5xl:  clamp(3rem,     6vw,   5rem);    /* 48–80 px — hero headlines  */
  --ck-text-6xl:  clamp(3.5rem,   8vw,   7rem);    /* 56–112 px — display heads  */

  /* ── 7. Typography — Line Heights & Letter Spacing ──── */
  --ck-leading-tight:    1.1;
  --ck-leading-snug:     1.25;
  --ck-leading-normal:   1.5;
  --ck-leading-relaxed:  1.75;

  --ck-tracking-tight:   -0.03em;
  --ck-tracking-normal:   0;
  --ck-tracking-wide:     0.06em;
  --ck-tracking-wider:    0.1em;

  /* ── 8. Spacing System (8 px grid) ──────────────────── */
  --ck-space-1:   0.25rem;   /*   4 px */
  --ck-space-2:   0.5rem;    /*   8 px */
  --ck-space-3:   0.75rem;   /*  12 px */
  --ck-space-4:   1rem;      /*  16 px */
  --ck-space-5:   1.25rem;   /*  20 px */
  --ck-space-6:   1.5rem;    /*  24 px */
  --ck-space-8:   2rem;      /*  32 px */
  --ck-space-10:  2.5rem;    /*  40 px */
  --ck-space-12:  3rem;      /*  48 px */
  --ck-space-16:  4rem;      /*  64 px */
  --ck-space-20:  5rem;      /*  80 px */
  --ck-space-24:  6rem;      /*  96 px */
  --ck-space-32:  8rem;      /* 128 px */
  --ck-space-40:  10rem;     /* 160 px */

  /* ── 9. Radii & Shadows ─────────────────────────────── */
  --ck-radius-sm:   0.375rem;   /*  6 px  */
  --ck-radius-md:   0.5rem;     /*  8 px  */
  --ck-radius-lg:   1rem;       /* 16 px  */
  --ck-radius-xl:   1.5rem;     /* 24 px  */
  --ck-radius-full: 100px;      /* pill    */

  --ck-shadow-sm:   0 1px 3px rgba(18, 6, 17, 0.35);
  --ck-shadow-md:   0 4px 16px rgba(18, 6, 17, 0.45);
  --ck-shadow-lg:   0 10px 32px rgba(18, 6, 17, 0.55);
  --ck-shadow-glow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --ck-shadow-plum: 0 12px 36px rgba(55, 25, 49, 0.45);
}

/* ═══════════════════════════════════════════════════════════
   Global Base / Accessibility Utilities
   ═══════════════════════════════════════════════════════════ */

/* ── Skip-to-content link (keyboard / screenreader) ─── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--ck-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0 0 var(--ck-radius-md) 0;
  transition: top 200ms ease;
}
.skip-to-content:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ── Visible focus rings (WCAG AA 2.4.7) ──────────────── */
:focus-visible {
  outline: 2px solid var(--ck-accent);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Remove outline for mouse users (keeps it for keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}

/* ── Buttons & Links default focus ─────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ck-gold);
  outline-offset: 3px;
  border-radius: var(--ck-radius-sm);
}

/* ── Visually hidden utility (screenreader only) ────────── */
.visually-hidden,
.visually-hidden-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Horizontal scroll for mobile filter tabs ───────────── */
.course-filter-tabs,
.faculty-filter-tabs,
.ck-scroll-tabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
  flex-wrap: nowrap !important;   /* prevent wrap when scrollable */
  padding-bottom: 4px;            /* space for scrollbar on older browsers */
}
.course-filter-tabs::-webkit-scrollbar,
.faculty-filter-tabs::-webkit-scrollbar,
.ck-scroll-tabs::-webkit-scrollbar {
  display: none;
}

/* ── Smooth scroll — respects prefers-reduced-motion ───── */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ── Image defaults — prevent layout shift ──────────────── */
img {
  max-width: 100%;
  height: auto;
}

/* ── 360px safety net — max section padding on small phones */
@media (max-width: 400px) {
  .ck-container {
    padding-left: var(--ck-space-4);
    padding-right: var(--ck-space-4);
  }
  .ck-section {
    padding-top: var(--ck-space-10);
    padding-bottom: var(--ck-space-10);
  }
  /* Problem grid: 2-col at 360px */
  .problems-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--ck-space-3) !important;
  }
  /* Faculty grid: single-col at 360px */
  .faculty-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── 768px (tablet) tweaks ───────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Typography Utilities (Geist) ─────────────────────────── */
.font-display {
  font-family: var(--ck-font-display), 'Geist', system-ui, sans-serif !important;
}
.font-body {
  font-family: var(--ck-font-body), 'Geist', system-ui, sans-serif !important;
}
.font-mono {
  font-family: var(--ck-font-mono), 'Geist Mono', monospace !important;
}
body {
  font-family: var(--ck-font-body), 'Geist', system-ui, sans-serif;
}


