/*
 * MOSME Design System - CSS Custom Properties
 * Nav/Footer 元件在 MVC 頁面所需的 CSS 變數定義
 * 從 main.css 提取，零副作用（僅包含 :root 自訂屬性）
 *
 * 此檔案由建置流程複製至 MOSME/mosme/Content/nav-footer-variables.css
 */

:root {
  /* ─── Color Palette ─── */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;

  --primary-color: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #6366f1;

  --accent-color: #f97316;
  --accent-light: #fb923c;
  --accent-dark: #ea580c;

  --secondary-color: #10b981;
  --secondary-light: #34d399;
  --secondary-dark: #059669;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --text-color: #1e293b;
  --text-secondary: #475569;
  --text-light: #64748b;
  --text-muted: #94a3b8;

  --bg-color: #ffffff;
  --bg-light: #f8fafc;
  --bg-subtle: #f1f5f9;

  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* ─── Gradient System ─── */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-primary-btn: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --gradient-primary-btn-hover: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  --gradient-yellow-btn: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-yellow-btn-hover: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --gradient-blue-btn: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --gradient-blue-btn-hover: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-hot: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  --gradient-dark: linear-gradient(135deg, #0f172a 0%, #475569 100%);

  /* ─── Spacing System ─── */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --section-padding: 3rem;

  /* ─── Border Radius ─── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* ─── Shadows ─── */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  --shadow-primary: 0 10px 40px -10px rgba(79, 70, 229, 0.3);
  --shadow-accent: 0 10px 40px -10px rgba(249, 115, 22, 0.3);
  --shadow-card-float: 0 20px 60px -15px rgba(79, 70, 229, 0.2);
  --shadow-glow-primary: 0 0 30px rgba(79, 70, 229, 0.25);
  --shadow-glow-accent: 0 0 30px rgba(249, 115, 22, 0.25);

  /* ─── Glass Morphism ─── */
  --glass-bg: rgba(255, 255, 255, 0.52);
  --glass-bg-subtle: rgba(255, 255, 255, 0.35);
  --glass-bg-medium: rgba(255, 255, 255, 0.58);
  --glass-bg-strong: rgba(255, 255, 255, 0.75);
  --glass-bg-level-1: rgba(255, 255, 255, 0.38);
  --glass-bg-level-2: rgba(255, 255, 255, 0.55);
  --glass-bg-level-3: rgba(255, 255, 255, 0.75);
  --glass-bg-nav: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.38) 0%,
    rgba(255, 255, 255, 0.32) 100%
  );
  --glass-bg-nav-scrolled: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.48) 0%,
    rgba(255, 255, 255, 0.42) 100%
  );
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-border-strong: rgba(255, 255, 255, 0.5);
  --glass-border-subtle: rgba(255, 255, 255, 0.2);
  --glass-blur: blur(24px) saturate(180%);
  --glass-blur-sm: blur(16px) saturate(160%);
  --glass-blur-md: blur(28px) saturate(185%);
  --glass-blur-lg: blur(44px) saturate(200%);

  --blur-decorative-md: 60px;
  --blur-decorative-lg: 80px;
  --blur-decorative-xl: 100px;
  --glass-shadow:
    0 1px 2px rgba(0, 0, 0, 0.02), 0 4px 16px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  --glass-shadow-hover:
    0 4px 12px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --glass-shadow-nav:
    0 1px 2px rgba(0, 0, 0, 0.02), 0 4px 16px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  --glass-shadow-nav-scrolled:
    0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);

  /* ─── Typography ─── */
  --font-body:
    system-ui, -apple-system, 'Segoe UI', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --font-display: var(--font-body);
  --font-serif: Georgia, 'Times New Roman', serif;

  --text-xs: clamp(0.7rem, 0.65rem + 0.2vw, 0.75rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.2vw, 0.875rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.2vw, 1rem);
  --text-lg: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-xl: clamp(1.1rem, 1rem + 0.3vw, 1.25rem);
  --text-2xl: clamp(1.3rem, 1.1rem + 0.5vw, 1.5rem);
  --text-3xl: clamp(1.6rem, 1.3rem + 0.8vw, 1.875rem);
  --text-4xl: clamp(2rem, 1.5rem + 1.2vw, 2.25rem);
  --text-5xl: clamp(2.5rem, 1.8rem + 1.8vw, 3rem);
  --text-6xl: clamp(3rem, 2rem + 2.5vw, 3.75rem);

  /* ─── Animation ─── */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce-subtle: cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-micro: 120ms;
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 500ms;
  --duration-slower: 700ms;

  /* ─── Z-Index Layers ─── */
  --z-base: 0;
  --z-content: 1;
  --z-elevated: 10;
  --z-floating: 50;
  --z-sticky: 100;
  --z-navbar: 1000;
  --z-dropdown: 1001;
  --z-mobile-menu: 1100;
  --z-overlay: 1200;
  --z-modal: 9999;
  --z-toast: 10000;

  /* ─── Layout ─── */
  --navbar-height: 64px;
  --nav-section-height: 48px;
  --container-max: 1280px;
  --container-padding: clamp(1rem, 5vw, 2rem);

  /* ─── Role Theme Colors ─── */
  --teacher-color: #892b00;
  --teacher-color-light: #a63500;
  --teacher-shadow: rgba(137, 43, 0, 0.3);
  --teacher-hover-bg: rgba(137, 43, 0, 0.06);

  --student-color: #002fa7;
  --student-color-light: #0040d6;
  --student-shadow: rgba(0, 47, 167, 0.3);
  --student-hover-bg: rgba(0, 47, 167, 0.06);

  /* ─── Footer Dark Theme ─── */
  --footer-bg: #0c1222;
  --footer-bg-dark: #0a0f1a;
  --footer-text: #94a3b8;
  --footer-text-muted: #64748b;
  --footer-text-light: #e2e8f0;
  --footer-border: rgba(255, 255, 255, 0.06);

  /* ─── About Page Theme ─── */
  --about-primary: #2d5f7e;
  --about-primary-dark: #1a4058;
  --about-secondary: #f4a261;
  --about-accent: #e76f51;
  --about-light-bg: #faf8f5;
  --about-dark-text: #1a2930;
  --about-mid-text: #4a5568;
  --about-shadow-soft: 0 8px 30px rgba(45, 95, 126, 0.08);
  --about-shadow-medium: 0 12px 40px rgba(45, 95, 126, 0.12);

  /* ─── Teaching Page Theme ─── */
  --teaching-primary: #f59e0b;
  --teaching-primary-dark: #d97706;
  --teaching-secondary: #fbbf24;
  --teaching-bg-light: #fffbeb;
  --teaching-bg-medium: #fef3c7;
  --teaching-bg-warm: #fff7ed;
  --teaching-text-dark: #78350f;

  /* ─── Resources Page Theme ─── */
  --resources-primary: #ff6b35;
  --resources-primary-dark: #ea580c;
  --resources-secondary: #f7931e;
  --resources-accent: #ff4757;
  --resources-text-light: #ffffff;
}

/* Responsive :root overrides */
@media (max-width: 768px) {
  :root {
    --navbar-height: 64px;
    --section-padding: 4rem;
  }
}

@media (max-width: 576px) {
  :root {
    --duration-slow: 400ms;
    --duration-slower: 500ms;
    --section-padding: 1rem;
  }
}

@media (max-width: 768px) {
  :root {
    --blur-decorative-md: 30px;
    --blur-decorative-lg: 40px;
    --blur-decorative-xl: 50px;
  }
}

@media (prefers-contrast: high) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.3);
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.98);
    --glass-bg-strong: rgba(255, 255, 255, 1);
    --glass-blur: blur(0);
  }
}
