/* ============================================================
   RAJESH SANGLE TRADING ACADEMY — LIGHT THEME DESIGN SYSTEM
   Direction: Warm cream / burnt-orange — editorial, human-made
   Fonts: Outfit (display) + Space Grotesk (body)
   ============================================================ */

/* ── 1. GOOGLE FONTS ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── 2. DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* ── Canvas — warm cream editorial palette ── */
  --cream:         #FEFAF4;
  --cream-2:       #FFF7ED;
  --cream-3:       #FEF3C7;
  --cream-card:    #FFFFFF;
  --cream-deep:    #F5EDE0;

  /* ── Hairlines — warm, organic ── */
  --hairline:        rgba(26,17,8,0.08);
  --hairline-warm:   rgba(232,98,26,0.14);
  --hairline-strong: rgba(26,17,8,0.14);

  /* ── Primary — Burnt Orange ── */
  --orange:          #E8621A;
  --orange-deep:     #C4501A;
  --orange-light:    #F97316;
  --orange-soft:     rgba(232,98,26,0.10);
  --orange-glow:     rgba(232,98,26,0.18);
  --orange-bg:       #FFF1E8;

  /* ── Secondary — Amber warmth (replaces cyan) ── */
  --amber:           #D97706;
  --amber-soft:      rgba(217,119,6,0.12);
  --amber-bg:        #FEF3C7;

  /* ── Text — charcoal/brown spectrum, never pure black ── */
  --charcoal:        #1A1108;
  --ink:             #2D1F12;
  --ink-muted:       #6B4F3A;
  --ink-subtle:      #A08060;
  --ink-placeholder: #C4A882;

  /* ── Typography ── */
  --font-display: 'Outfit', 'SF Pro Display', system-ui, sans-serif;
  --font-body:    'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* ── Spacing (8-base scale) ── */
  --space-xs:   8px;
  --space-sm:   16px;
  --space-md:   24px;
  --space-lg:   32px;
  --space-xl:   48px;
  --space-2xl:  80px;
  --space-3xl:  120px;

  /* ── Border radius ── */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-xxl:  28px;
  --radius-pill: 9999px;

  /* ── Easing — organic, no bounce ── */
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:    cubic-bezier(0.45, 0, 0.55, 1);

  /* ── Shadows — warm amber-tinted, organic feel ── */
  --shadow-xs:   0 1px 2px rgba(26,17,8,0.06);
  --shadow-sm:   0 2px 8px rgba(26,17,8,0.08), 0 1px 2px rgba(26,17,8,0.04);
  --shadow-md:   0 8px 24px rgba(26,17,8,0.10), 0 2px 6px rgba(26,17,8,0.06);
  --shadow-lg:   0 20px 48px rgba(26,17,8,0.10), 0 4px 12px rgba(26,17,8,0.06);
  --shadow-orange: 0 8px 32px rgba(232,98,26,0.22), 0 2px 8px rgba(232,98,26,0.12);
  --shadow-card: 0 4px 20px rgba(26,17,8,0.07), 0 1px 4px rgba(26,17,8,0.05);

  /* ── Section rhythm ── */
  --section-py:  clamp(64px, 8vw, 120px);
  --content-max: 1280px;
  --prose-max:   68ch;
}

/* ── 2.5 DARK THEME (Deep Charcoal & Cyber Neon) ── */
[data-theme="dark"] {
  /* Canvas */
  --cream:         #0A0A0A;
  --cream-2:       #111111;
  --cream-3:       #1A1A1A;
  --cream-card:    #141414;
  --cream-deep:    #222222;

  /* Hairlines */
  --hairline:        rgba(255,255,255,0.08);
  --hairline-warm:   rgba(255,255,255,0.12);
  --hairline-strong: rgba(255,255,255,0.18);

  /* Primary */
  --orange:          #FF6B1A;
  --orange-deep:     #E8621A;
  --orange-light:    #FF8A4C;
  --orange-soft:     rgba(255, 107, 26, 0.15);
  --orange-glow:     rgba(255, 107, 26, 0.3);
  --orange-bg:       rgba(255, 107, 26, 0.05);

  /* Secondary */
  --amber:           #F59E0B;
  --amber-soft:      rgba(245, 158, 11, 0.15);
  --amber-bg:        rgba(245, 158, 11, 0.05);

  /* Text */
  --charcoal:        #FFFFFF;
  --ink:             #E2E8F0;
  --ink-muted:       #94A3B8;
  --ink-subtle:      #64748B;
  --ink-placeholder: #475569;

  /* Shadows */
  --shadow-xs:       0 1px 2px rgba(0,0,0,0.5);
  --shadow-sm:       0 2px 8px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:       0 8px 24px rgba(0,0,0,0.7), 0 2px 6px rgba(0,0,0,0.5);
  --shadow-lg:       0 20px 48px rgba(0,0,0,0.8), 0 4px 12px rgba(0,0,0,0.5);
  --shadow-orange:   0 8px 32px rgba(255, 107, 26, 0.15), 0 2px 8px rgba(255, 107, 26, 0.08);
  --shadow-card:     0 4px 20px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.4);
}

[data-theme="dark"] body::before {
  opacity: 0.035;
}


/* ── 3. RESET ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* ── 4. TYPOGRAPHY SCALE ──────────────────────────────────── */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--charcoal);
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--charcoal);
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--charcoal);
}

.body-lead {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: var(--prose-max);
}

/* Eyebrow — small label above section headings */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ── 5. LAYOUT UTILITIES ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.section-py { padding-block: var(--section-py); }

.grid-asymmetric {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-2xl);
  align-items: center;
}

/* ── 6. COLOUR UTILITIES ──────────────────────────────────── */
.text-orange  { color: var(--orange); }
.text-amber   { color: var(--amber); }
.text-muted   { color: var(--ink-muted); }
.text-subtle  { color: var(--ink-subtle); }

/* ── 7. SURFACE CARDS — warm white with organic borders ── */
.surface-card {
  background: var(--cream-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

/* ── 8. SECTION DIVIDER ───────────────────────────────────── */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline-strong), transparent);
}

/* ── 9. GRAIN TEXTURE OVERLAY (human-made feel) ──────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ── 10. PREFERS-REDUCED-MOTION ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 11. SCROLLBAR ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream-2); }
::-webkit-scrollbar-thumb { background: var(--cream-deep); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-placeholder); }

/* ── 12. SELECTION ───────────────────────────────────────── */
::selection { background: var(--orange-soft); color: var(--charcoal); }

/* ── 13. FOCUS RING ──────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── 14. BADGE VARIANTS ─────────────────────────────────── */
.badge-beginner    { background: #D1FAE5; color: #065F46; }
.badge-intermediate { background: #DBEAFE; color: #1E40AF; }
.badge-advanced    { background: #FEE2E2; color: #991B1B; }
.badge-global      { background: #EDE9FE; color: #5B21B6; }

/* ── 15. CUSTOM CURSOR ─────────────────────────────────── */
body.has-custom-cursor {
  cursor: none;
}
body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--orange);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, background-color 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.custom-cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--orange-glow);
  background-color: rgba(232, 98, 26, 0.05);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Cursor hover states */
.custom-cursor-dot.hover-active {
  transform: translate(-50%, -50%) scale(0.5);
  background-color: var(--cream);
}
.custom-cursor-outline.hover-active {
  width: 60px;
  height: 60px;
  background-color: var(--orange);
  border-color: var(--orange);
  mix-blend-mode: difference;
}

/* ── 16. DYNAMIC CARD GLOW ──────────────────────────────── */
.course-card {
  position: relative;
  overflow: hidden;
}

.course-card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--orange-soft) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.course-card:hover::before {
  opacity: 1;
}

/* Ensure content stays above the glow */
.course-card > * {
  position: relative;
  z-index: 1;
}
