/* THEME
---------------------------------------------------- */
/* Contains all global theme variables, typography settings, and basic theme elements */

/* Color Variables
---------------------------------------------------- */
:root {
  /* Primary colors */
  --color-primary: #B17A50;
  --color-primary-light: #C69C7B;
  --color-primary-dark: #8E5F3C;
  --color-primary-rgb: 177, 122, 80;
  
  /* Secondary colors */
  --color-secondary: #4A6D7C;
  --color-secondary-light: #6B8A98;
  --color-secondary-dark: #395561;
  --color-secondary-rgb: 74, 109, 124;
  
  /* Neutral colors */
  --color-dark: #2D2A26;
  --color-dark-rgb: 45, 42, 38;
  --color-light: #F5F3EF;
  --color-light-rgb: 245, 243, 239;
  
  /* Text colors */
  --color-text: #4D4A46;
  --color-text-light: #877F76;
  --color-text-lighter: #AAA39D;
  
  /* Background colors */
  --color-bg-body: #F8F6F2;
  --color-bg-card: #FFFFFF;
  --color-bg-alt: #EAE6DF;
  
  /* Border colors */
  --color-border: #E2DED6;
  --color-border-light: #EAE6DF;
  
  /* Status colors */
  --color-success: #28a745;
  --color-danger: #dc3545;
  --color-warning: #ffc107;
  --color-info: #17a2b8;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  
  /* Spacing */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 2rem;     /* 32px */
  --space-xl: 3rem;     /* 48px */
  --space-2xl: 4rem;    /* 64px */
  
  /* Border radius */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 1rem;     /* 16px */
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Z-index layers */
  --z-below: -1;
  --z-normal: 1;
  --z-above: 10;
  --z-fixed: 100;
  --z-modal: 1000;
  --z-tooltip: 1500;
  --z-max: 9999;
}

/* Dark Theme Variables
---------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    /* Dark theme adaptations */
    --color-bg-body: #2D2A26;
    --color-bg-card: #3C3832;
    --color-bg-alt: #4D4A46;
    
    --color-text: #E2DED6;
    --color-text-light: #AAA39D;
    --color-text-lighter: #877F76;
    
    --color-border: #4D4A46;
    --color-border-light: #5D5A56;
    
    /* Adjust primary and secondary for better contrast in dark mode */
    --color-primary-light: #D0AA8B;
    --color-secondary-light: #7B9AA8;
  }
}

/* Typography
---------------------------------------------------- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', Times, serif;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: var(--space-md);
  color: var(--color-dark);
}

@media (prefers-color-scheme: dark) {
  h1, h2, h3, h4, h5, h6 {
    color: var(--color-light);
  }
}

h1 {
  font-size: 2.5rem; /* 40px */
}

h2 {
  font-size: 2rem; /* 32px */
}

h3 {
  font-size: 1.75rem; /* 28px */
}

h4 {
  font-size: 1.5rem; /* 24px */
}

h5 {
  font-size: 1.25rem; /* 20px */
}

h6 {
  font-size: 1rem; /* 16px */
}

p {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover, a:focus {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Responsive typography */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2.25rem; /* 36px */
  }
  
  h2 {
    font-size: 1.75rem; /* 28px */
  }
  
  h3 {
    font-size: 1.5rem; /* 24px */
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: 2rem; /* 32px */
  }
  
  h2 {
    font-size: 1.625rem; /* 26px */
  }
}

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

img {
  max-width: 100%;
  height: auto;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
}

/* Selection styling */
::selection {
  background-color: var(--color-primary);
  color: white;
}

/* Lists */
ul, ol {
  padding-left: 1.5rem;
  margin-top: 0;
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: 0.5rem;
}

/* Code and pre */
code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-sm);
}

pre {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
  padding: 1rem;
  margin: 0 0 var(--space-md);
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

pre code {
  padding: 0;
  background-color: transparent;
  border-radius: 0;
}

/* Dividers */
hr {
  height: 1px;
  background-color: var(--color-border);
  border: none;
  margin: var(--space-lg) 0;
}

/* Blockquote */
blockquote {
  margin: var(--space-md) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 4px solid var(--color-primary);
  background-color: var(--color-bg-alt);
  color: var(--color-text);
  font-style: italic;
}

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

/* Form elements base styles */
input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-md);
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 600;
  background-color: var(--color-bg-alt);
}

/* Animation Utilities */
.anim-fade {
  animation: fade-in var(--transition-normal);
}

.anim-slide-up {
  animation: slide-up var(--transition-normal);
}

.anim-slide-down {
  animation: slide-down var(--transition-normal);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slide-down {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
} 