/* ==========================================================================
   deeppage.kr - CSS Variables (Apple-Inspired Design System)
   Updated: 2026-02-03
   ========================================================================== */

:root {
  /* ========================================
     Apple System Colors (2025)
     ======================================== */

  /* Primary - Apple Blue */
  --apple-blue: #007AFF;
  --apple-blue-dark: #0056B3;
  --apple-blue-light: #5AC8FA;

  /* Semantic Colors */
  --apple-green: #34C759;
  --apple-orange: #FF9500;
  --apple-red: #FF3B30;
  --apple-purple: #AF52DE;
  --apple-pink: #FF2D55;
  --apple-teal: #5AC8FA;
  --apple-indigo: #5856D6;

  /* Neutral - Gray Scale (Apple HIG) */
  --apple-gray-1: #8E8E93;
  --apple-gray-2: #AEAEB2;
  --apple-gray-3: #C7C7CC;
  --apple-gray-4: #D1D1D6;
  --apple-gray-5: #E5E5EA;
  --apple-gray-6: #F2F2F7;

  /* ========================================
     Alias - Primary Colors (Apple Blue based)
     ======================================== */
  --color-primary: var(--apple-blue);
  --color-primary-dark: var(--apple-blue-dark);
  --color-primary-light: var(--apple-blue-light);

  /* ========================================
     Secondary Colors
     ======================================== */
  --color-secondary: var(--apple-purple);
  --color-secondary-dark: #9945B8;

  /* ========================================
     Accent Colors
     ======================================== */
  --color-accent: var(--apple-green);
  --color-accent-dark: #28A745;
  --color-warning: var(--apple-orange);
  --color-error: var(--apple-red);
  --color-info: var(--apple-teal);

  /* ========================================
     Background Colors
     ======================================== */
  --bg-primary: #FFFFFF;
  --bg-secondary: var(--apple-gray-6);
  --bg-tertiary: #FFFFFF;
  --bg-elevated: #FFFFFF;

  /* Legacy aliases */
  --color-bg-primary: var(--bg-primary);
  --color-bg-secondary: var(--bg-secondary);
  --color-bg-tertiary: var(--apple-gray-5);

  /* ========================================
     Text Colors
     ======================================== */
  --text-primary: #000000;
  --text-secondary: #3C3C43;
  --text-tertiary: var(--apple-gray-1);
  --text-quaternary: var(--apple-gray-3);

  /* Legacy aliases */
  --color-text-primary: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted: var(--text-tertiary);

  /* ========================================
     Liquid Glass Variables
     ======================================== */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-dark: rgba(0, 0, 0, 0.72);
  --glass-blur: 20px;
  --glass-saturation: 180%;
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-border-dark: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --glass-inset: inset 0 0 0 1px rgba(255, 255, 255, 0.4);

  /* ========================================
     Gradients
     ======================================== */
  --gradient-primary: linear-gradient(135deg, var(--apple-blue) 0%, var(--apple-purple) 100%);
  --gradient-hero: linear-gradient(180deg, var(--apple-gray-6) 0%, #FFFFFF 100%);
  --gradient-cta: linear-gradient(135deg, var(--apple-green) 0%, #28A745 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);

  /* ========================================
     Typography (Apple SF Pro Style)
     ======================================== */
  --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Pretendard', system-ui, sans-serif;
  --font-primary: var(--font-system);

  /* Apple Font Sizes */
  --text-caption2: 0.6875rem;   /* 11px */
  --text-caption1: 0.75rem;     /* 12px */
  --text-footnote: 0.8125rem;   /* 13px */
  --text-subhead: 0.9375rem;    /* 15px */
  --text-body: 1.0625rem;       /* 17px - Apple default */
  --text-headline: 1.0625rem;   /* 17px semibold */
  --text-title3: 1.25rem;       /* 20px */
  --text-title2: 1.375rem;      /* 22px */
  --text-title1: 1.75rem;       /* 28px */
  --text-largeTitle: 2.125rem;  /* 34px */
  --text-display: 3rem;         /* 48px */

  /* Legacy Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-black: 900;

  /* Line Heights */
  --leading-tight: 1.2;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* Letter Spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;

  /* ========================================
     Apple Animations & Easing
     ======================================== */
  --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  --duration-instant: 100ms;
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 500ms;

  /* Legacy Transitions */
  --transition-fast: 150ms var(--ease-apple);
  --transition-normal: 300ms var(--ease-apple);
  --transition-slow: 500ms var(--ease-apple);

  /* ========================================
     Spacing
     ======================================== */
  --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;

  /* ========================================
     Container
     ======================================== */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;

  /* ========================================
     Shadows (Apple-style)
     ======================================== */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-2xl: 0 24px 80px rgba(0, 0, 0, 0.15);

  /* Glass Shadows */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glass-hover: 0 12px 40px rgba(0, 0, 0, 0.12);

  /* ========================================
     Border Radius (Apple-style)
     ======================================== */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* ========================================
     Z-Index
     ======================================== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 500;
  --z-modal-backdrop: 900;
  --z-modal: 1000;
  --z-tooltip: 1100;

  /* ========================================
     plus.gov.kr Design System Variables
     ======================================== */

  /* Government Blue Colors */
  --gov-blue-primary: #256ef4;
  --gov-blue-dark: #033074;
  --gov-blue-secondary: #2d69c2;
  --gov-blue-accent: #4486d4;
  --gov-blue-light: rgba(37, 110, 244, 0.1);

  /* Government Text Colors */
  --gov-text-primary: #1f2123;
  --gov-text-secondary: #61666b;

  /* Government Button Sizes */
  --gov-btn-height: 3.5rem;
  --gov-btn-height-lg: 4rem;
  --gov-btn-radius: 0.75rem;

  /* Government Spacing */
  --gov-space-base: 1.5rem;
  --gov-space-lg: 2rem;

  /* Headline Bar */
  --gov-bar-height: 4px;
  --gov-bar-width: 60px;
}

/* ========================================
   Dark Mode Support (Optional)
   ======================================== */
@media (prefers-color-scheme: dark) {
  :root.auto-dark {
    --bg-primary: #000000;
    --bg-secondary: #1C1C1E;
    --bg-tertiary: #2C2C2E;
    --bg-elevated: #1C1C1E;

    --text-primary: #FFFFFF;
    --text-secondary: #EBEBF5;
    --text-tertiary: #8E8E93;

    --glass-bg: rgba(28, 28, 30, 0.72);
    --glass-border: rgba(255, 255, 255, 0.1);

    --apple-gray-1: #8E8E93;
    --apple-gray-2: #636366;
    --apple-gray-3: #48484A;
    --apple-gray-4: #3A3A3C;
    --apple-gray-5: #2C2C2E;
    --apple-gray-6: #1C1C1E;
  }
}

/* ========================================
   Backdrop Filter Fallback
   ======================================== */
@supports not (backdrop-filter: blur(20px)) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-bg-dark: rgba(0, 0, 0, 0.95);
  }
}
