/* ═══════════════════════════════════════════════════════════════════════════
 * COMPONENT PRIMITIVES — DO NOT OVERWRITE
 *
 * Base styles, animations, layout utilities, and component classes.
 * Theme tokens live in tokens.css (overwritten by generate_theme).
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
 * DEFENSIVE ALIASES
 * Safety net — resolved by tokens.css if it defines the canonical names.
 * These ensure components work regardless of which naming convention
 * tokens.css uses (template placeholders vs generateTheme output).
 * ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Color aliases (component names → canonical names) */
  --color-text: var(--color-foreground);
  --color-text-secondary: var(--color-muted-foreground);
  --color-surface-elevated: color-mix(in oklch, var(--color-surface, oklch(0.97 0 0)), white 5%);
  --color-accent: var(--color-primary);
  --color-accent-foreground: var(--color-primary-foreground);
  --color-warning: var(--color-cta);
  --color-primary-light: color-mix(in oklch, var(--color-primary) 60%, white);
  --color-primary-dark: color-mix(in oklch, var(--color-primary) 80%, black);

  /* Static tokens (theme-independent) */
  --shadow-xl: 0 20px 25px -5px oklch(0.2 0 0 / 0.1), 0 8px 10px -6px oklch(0.2 0 0 / 0.05);
  --duration-slower: 1s;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * BASE STYLES
 * ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

::selection {
  background: var(--color-primary);
  color: white;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * ANIMATION KEYFRAMES
 * ═══════════════════════════════════════════════════════════════════════════ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes successRing {
  from { opacity: 0.6; transform: scale(0.8); }
  to { opacity: 0; transform: scale(1.6); }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * ANIMATION UTILITIES
 * Use these classes on elements for entrance animations
 * ═══════════════════════════════════════════════════════════════════════════ */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp var(--duration-slow) var(--ease-out) forwards;
}

.fade-in {
  opacity: 0;
  animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-40px);
  animation: slideInLeft var(--duration-slow) var(--ease-out) forwards;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(40px);
  animation: slideInRight var(--duration-slow) var(--ease-out) forwards;
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  animation: scaleIn var(--duration-slow) var(--ease-spring) forwards;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.success-ring {
  animation: successRing 0.8s var(--ease-out) forwards;
}

/* Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* Hover Effects */
.hover-lift {
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.hover-scale {
  transition: transform var(--duration-normal) var(--ease-spring);
}
.hover-scale:hover {
  transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * LAYOUT UTILITIES
 * ═══════════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 4rem; }
}

.section {
  padding: 5rem 0;
}

.section-sm {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .section { padding: 8rem 0; }
  .section-sm { padding: 4rem 0; }
}

.section-accent {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

.section-accent h1,
.section-accent h2,
.section-accent h3,
.section-accent h4 {
  color: var(--color-accent-text);
}

.section-overlay {
  color: white;
}

.section-overlay h1,
.section-overlay h2,
.section-overlay h3,
.section-overlay h4 {
  color: white;
}

.section-alt {
  background: var(--color-surface);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * COMPONENT BASES
 * Minimal styles for common elements - extend as needed
 * ═══════════════════════════════════════════════════════════════════════════ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-primary {
  background: var(--color-cta);
  color: var(--color-cta-foreground);
  box-shadow: var(--shadow-cta-glow);
}

.btn-primary:hover {
  background: var(--color-cta-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-lg {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* Inputs */
.input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface-elevated);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--color-primary) 10%, transparent);
}

.input::placeholder {
  color: var(--color-muted-foreground);
}

.input-accent {
  background: var(--color-accent-surface);
  border-color: var(--color-accent-border);
  color: var(--color-accent-text);
}

.input-accent:focus {
  border-color: var(--color-primary);
}

/* Cards */
.card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-accent {
  background: var(--color-accent-surface);
  border-color: var(--color-accent-border);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * SPECIAL EFFECTS
 * ═══════════════════════════════════════════════════════════════════════════ */

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

.noise-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.02;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════════════════════════════════════
 * RESPONSIVE UTILITIES
 * ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * ACCESSIBILITY — REDUCED MOTION
 * ═══════════════════════════════════════════════════════════════════════════ */

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

/* ═══════════════════════════════════════════════════════════════════════════
 * THEME — KM Global Academy
 * Brand Color: #0B2E43 (deep navy)
 * Algorithm: Monochromatic navy — CTA IS the brand color. Buttons are the
 *            single most-clicked element; making them = brand color means the
 *            brand is visible on every screen. Depth comes from shadow/hover
 *            scale, not from a separate CTA hue. Accent surfaces, ring, and
 *            primary all share the exact brand OKLCH.
 * Updated: 2026-04-22
 * ═══════════════════════════════════════════════════════════════════════════ */



:root {
  /* ─────────────────────────────────────────────────────────────────────────
   * Primary — Deep Navy #0B2E43 → oklch(0.288 0.055 238)
   * ───────────────────────────────────────────────────────────────────────── */
  --color-primary: oklch(0.288 0.055 238);
  --color-primary-foreground: oklch(0.985 0.004 240);
  --color-primary-light: oklch(0.46 0.072 238);
  --color-primary-dark: oklch(0.19 0.042 240);

  /* CTA: brand navy itself. Every "Enquire" button is the brand color —
   * which means the brand is on every viewport. Hover goes to primary-light
   * for a subtle warming. */
  --color-cta: oklch(0.288 0.055 238);
  --color-cta-foreground: oklch(0.985 0.004 240);
  --color-cta-hover: oklch(0.42 0.082 236);

  /* ─────────────────────────────────────────────────────────────────────────
   * Backgrounds — warm cream/ivory (contrast against cool navy)
   * ───────────────────────────────────────────────────────────────────────── */
  --color-background: oklch(0.985 0.007 80);
  --color-foreground: oklch(0.175 0.038 245);
  --color-muted: oklch(0.96 0.01 75);
  --color-muted-foreground: oklch(0.508 0.016 235);
  --color-surface: oklch(0.998 0.004 75);
  --color-border: oklch(0.868 0.012 220);
  --color-ring: oklch(0.288 0.055 238);
  --color-success: oklch(0.673 0.176 150.8);
  --color-error: oklch(0.536 0.204 27.7);
  --color-warning: oklch(0.791 0.157 87.2);

  /* ─────────────────────────────────────────────────────────────────────────
   * Accent Section Tokens
   * Use for navy hero, CTA blocks, footer (.section-accent)
   * ───────────────────────────────────────────────────────────────────────── */
  --color-accent-bg: oklch(0.288 0.055 238);
  --color-accent-text: oklch(0.985 0.004 240);
  --color-accent-muted: oklch(0.62 0.04 235);
  --color-accent-surface: oklch(0.22 0.048 240);
  --color-accent-border: oklch(0.38 0.058 238);

  /* ─────────────────────────────────────────────────────────────────────────
   * Typography
   * ───────────────────────────────────────────────────────────────────────── */
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;

  /* ─────────────────────────────────────────────────────────────────────────
   * Animation Timing
   * ───────────────────────────────────────────────────────────────────────── */
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.6s;
  --duration-slower: 1s;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ─────────────────────────────────────────────────────────────────────────
   * Spacing Scale
   * ───────────────────────────────────────────────────────────────────────── */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* ─────────────────────────────────────────────────────────────────────────
   * Border Radius
   * ───────────────────────────────────────────────────────────────────────── */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* ─────────────────────────────────────────────────────────────────────────
   * Shadows — navy undertone
   * ───────────────────────────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px oklch(0.2 0.04 238 / 0.07);
  --shadow-md:
    0 4px 6px -1px oklch(0.2 0.04 238 / 0.1),
    0 2px 4px -2px oklch(0.2 0.04 238 / 0.08);
  --shadow-lg:
    0 10px 20px -3px oklch(0.2 0.04 238 / 0.12),
    0 4px 8px -4px oklch(0.2 0.04 238 / 0.08);
  --shadow-xl:
    0 20px 40px -5px oklch(0.2 0.04 238 / 0.14),
    0 8px 12px -6px oklch(0.2 0.04 238 / 0.07);
  --shadow-glow: 0 0 40px
    color-mix(in oklch, var(--color-primary) 25%, transparent);
  --shadow-cta-glow: 0 0 30px
    color-mix(in oklch, var(--color-cta) 35%, transparent);
}

/* Logo marquee animation */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

/* Featured audience card — pulsing glow ring */
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 0 oklch(0.46 0.072 238 / 0.45),
      0 16px 48px oklch(0.2 0.08 238 / 0.35);
  }
  50% {
    box-shadow:
      0 0 0 10px oklch(0.46 0.072 238 / 0),
      0 16px 48px oklch(0.2 0.08 238 / 0.5);
  }
}

.audience-featured {
  animation: pulse-glow 2.8s ease-in-out infinite;
}


html {
  font-size: 18px;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}
