/* Base Typografi Import (WAJIB di baris paling atas agar di-render oleh browser) */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Fira+Code:wght@400;500&display=swap');

/* ==========================================================================
   Design System: Luxee Theme Variables & Color Schemes
   ========================================================================== */

/* VARIABEL DEFAULT (Tema Gelap sebagai Bawaan / Fallback di :root) */
:root {
  /* Typography (Space Grotesk & Plus Jakarta Sans untuk visual premium & clean) */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-title: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Fira Code', Consolas, Monaco, monospace;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;

  /* ==========================================
     WARNA TEMA GELAP (DEFAULT)
     ========================================== */
  /* Warna Brand Utama (Luxee Gold) */
  --color-gold: #c29b6f;        
  --color-gold-light: #e5cfb3;  
  --color-gold-dark: #a1784c;   

  /* Warna Brand Alternatif (Aksen) */
  --color-accent-blue: #60a5fa; 
  --color-accent-orange: #fb923c;

  /* Background & Surface */
  --color-bg: #0d0d0c;          
  --color-bg-white: #141412;    
  
  --color-surface: #141412;     
  --color-surface-2: #1c1c1a;   
  --color-surface-3: #262624;   

  /* Text & Border */
  --color-text-main: #a3a39e;   
  --color-text-bold: #f5f5f0;   
  --color-text-muted: #5c5c56;  
  
  --color-border: #222220;      
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.4);

  /* Semantic Colors */
  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-danger:  #f87171;

  /* Dynamic Custom Elements Backgrounds */
  --color-header-bg: rgba(13, 13, 12, 0.85);
  --color-card-hover-bg: rgba(28, 28, 26, 0.4);
  --color-hero-overlay: rgba(13, 13, 12, 0.82);
}

/* ==========================================================================
   OVERRIDE WARNA UNTUK TEMA TERANG (LIGHT THEME)
   ========================================================================== */
[data-theme="light"] {
  /* Warna Brand Utama (Luxee Gold) */
  --color-gold: #b08451;        
  --color-gold-light: #c29b6f;  
  --color-gold-dark: #8c6336;   

  /* Warna Brand Alternatif (Aksen) */
  --color-accent-blue: #2563eb; 
  --color-accent-orange: #ea580c;

  /* Background & Surface */
  --color-bg: #f8fafc;          
  --color-bg-white: #ffffff;    
  
  --color-surface: #ffffff;     
  --color-surface-2: #f1f5f9;   
  --color-surface-3: #e2e8f0;   

  /* Text & Border */
  --color-text-main: #334155;   /* Slate 700 */
  --color-text-bold: #0f172a;   /* Slate 900 */
  --color-text-muted: #64748b;  /* Slate 500 */
  
  --color-border: #e2e8f0;      
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);

  /* Semantic Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger:  #ef4444;

  /* Dynamic Custom Elements Backgrounds */
  --color-header-bg: rgba(255, 255, 255, 0.85);
  --color-card-hover-bg: rgba(194, 155, 111, 0.05);
  --color-hero-overlay: rgba(248, 250, 252, 0.72);
}

/* PENEGASAN KEMBALI WARNA TEMA GELAP (DARK THEME) */
[data-theme="dark"] {
  --color-gold: #c29b6f;        
  --color-gold-light: #e5cfb3;  
  --color-gold-dark: #a1784c;   
  --color-accent-blue: #60a5fa; 
  --color-accent-orange: #fb923c;
  --color-bg: #0d0d0c;          
  --color-bg-white: #141412;    
  --color-surface: #141412;     
  --color-surface-2: #1c1c1a;   
  --color-surface-3: #262624;   
  --color-text-main: #a3a39e;   
  --color-text-bold: #f5f5f0;   
  --color-text-muted: #5c5c56;  
  --color-border: #222220;      
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-danger:  #f87171;
  --color-header-bg: rgba(13, 13, 12, 0.85);
  --color-card-hover-bg: rgba(28, 28, 26, 0.4);
  --color-hero-overlay: rgba(13, 13, 12, 0.82);
}

/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-size: 14.5px; /* Sedikit lebih kecil agar lebih sleek */
  font-weight: 400;  /* Memastikan body font regular */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

img, picture {
  max-width: 100%;
  display: block;
}

input, button, textarea, select {
  font: inherit;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold-light);
}

strong, b {
  font-weight: 550; /* Tidak terlalu tebal kasar */
  color: var(--color-text-bold);
}

/* ==========================================================================
   Typography Rules
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text-bold);
  line-height: 1.25;
  transition: color var(--transition-normal);
  letter-spacing: -0.025em; /* Khas Inter modern yang ramping rapat */
}

h1 {
  font-size: 26px;
  font-weight: 600; /* Dari 700 diturunkan ke 600 agar tipis premium */
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: 19px;
  font-weight: 600;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-xs);
  border-bottom: 1px solid var(--color-border);
  transition: border-color var(--transition-normal);
}

h3 {
  font-size: 15.5px;
  font-weight: 550; /* Sangat elegan dan sedang (Medium-SemiBold) */
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-main);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.7;
  transition: color var(--transition-normal);
}

/* List Styles */
ul, ol {
  margin-bottom: var(--spacing-lg);
  padding-left: var(--spacing-xl);
}

li {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-main);
  font-weight: 400;
  transition: color var(--transition-normal);
}

/* Blockquote (Notes/Alerts) */
blockquote {
  border-left: 3px solid var(--color-gold);
  background-color: var(--color-surface-2);
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-normal);
}

blockquote p {
  color: var(--color-text-main);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Inline Code */
code {
  font-family: var(--font-mono);
  background-color: var(--color-surface-2);
  color: var(--color-gold-light);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  border: 1px solid var(--color-border);
  transition: background-color var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal);
}

/* Code Blocks (Pre & Code) */
pre {
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--spacing-md) 0 var(--spacing-lg) 0;
}

pre code {
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 0.9em;
  color: var(--color-text-bold) !important;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Utilities */
.text-center { text-align: center !important; }
.text-gold { color: var(--color-gold) !important; }
.text-bold { color: var(--color-text-bold) !important; }
.text-muted { color: var(--color-text-muted) !important; }
.font-heading { font-family: var(--font-heading) !important; }

/* Premium Gold Gradient for LAXY */
.brand-laxy {
  font-weight: 800;
  background: linear-gradient(135deg, #ffe5c4 0%, #d8ae74 35%, #b58b4c 70%, #90662a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
  letter-spacing: 0.03em;
}
