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

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

/* VARIABEL DEFAULT (Tema Gelap sebagai Bawaan / Fallback di :root) */
:root {
  /* Typography (Inria Serif untuk judul premium & Outfit untuk body text) */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Inria Serif', Georgia, serif;
  --font-title: 'Inria Serif', Georgia, 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 (WDP Gold/Bronze dari wdp-icon.png) */
  --color-gold: #c59b6c;        
  --color-gold-light: #f5cf9e;  
  --color-gold-dark: #9e7547;   

  /* Warna Brand Alternatif (Aksen) */
  --color-accent-blue: #3b82f6; 
  --color-accent-orange: #f97316;

  /* Background & Surface (Kehitaman hangat tapi bukan hitam pekat) */
  --color-bg: #130f0a;          
  --color-bg-white: #1c1712;    
  
  --color-surface: #1c1712;     
  --color-surface-2: #26201a;   
  --color-surface-3: #2d261f;   

  /* Text & Border */
  --color-text-main: #a69e96;   
  --color-text-bold: #fdfcfb;   
  --color-text-muted: #6e645a;  
  
  --color-border: #26201a;      
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);

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

  /* Dynamic Custom Elements Backgrounds */
  --color-header-bg: rgba(19, 15, 10, 0.85);
  --color-card-hover-bg: rgba(38, 32, 26, 0.4);
}

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

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

  /* Background & Surface */
  --color-bg: #fdfcfb;          
  --color-bg-white: #ffffff;    
  
  --color-surface: #ffffff;     
  --color-surface-2: #f7f5f2;   
  --color-surface-3: #eeeae4;   

  /* Text & Border */
  --color-text-main: #4a443e;   
  --color-text-bold: #1f1a16;   
  --color-text-muted: #8c8278;  
  
  --color-border: #eeeae4;      
  
  --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(197, 155, 108, 0.05);
}

/* PENEGASAN KEMBALI WARNA TEMA GELAP (DARK THEME) */
[data-theme="dark"] {
  --color-gold: #c59b6c;        
  --color-gold-light: #f5cf9e;  
  --color-gold-dark: #9e7547;   
  --color-accent-blue: #3b82f6; 
  --color-accent-orange: #f97316;
  --color-bg: #130f0a;          
  --color-bg-white: #1c1712;    
  --color-surface: #1c1712;     
  --color-surface-2: #26201a;   
  --color-surface-3: #2d261f;   
  --color-text-main: #a69e96;   
  --color-text-bold: #fdfcfb;   
  --color-text-muted: #6e645a;  
  --color-border: #26201a;      
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger:  #ef4444;
  --color-header-bg: rgba(19, 15, 10, 0.85);
  --color-card-hover-bg: rgba(38, 32, 26, 0.4);
}

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