/* Moriveda CSS Design System & Reset */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root, [data-theme="light"] {
  /* Design System Base Colors */
  --green-deep: hsl(140, 55%, 28%);   /* #2D5A27 */
  --green-mid: hsl(130, 45%, 55%);    /* #5FBF77 */
  --green-light: hsl(120, 35%, 92%);  /* #E2F5E1 */
  --gold-warm: hsl(45, 85%, 65%);     /* #F7CA53 */
  --cream: hsl(50, 60%, 96%);         /* #FAF8F3 */
  --cream-dark: hsl(50, 40%, 90%);
  --earth: hsl(30, 40%, 35%);         /* #7E5F43 */
  --text-dark: #1E231C;
  --text-light: #5A6354;
  --white: #FFFFFF;
  --black: #000000;

  /* Theme-Dependent Colors */
  --bg-primary: var(--cream);
  --bg-secondary: var(--white);
  --bg-tertiary: var(--green-light);
  --bg-navbar: rgba(250, 248, 243, 0.85);
  --text-primary: var(--text-dark);
  --text-secondary: var(--text-light);
  --border-color: rgba(45, 90, 39, 0.08);
  --gradient-hero: linear-gradient(135deg, hsl(50, 60%, 96%), hsl(120, 35%, 92%), hsl(85, 50%, 94%));
  --gradient-card: linear-gradient(145deg, #ffffff, hsl(120, 20%, 98%));
  --logo-display-light: block;
  --logo-display-dark: none;
  
  /* Footer Colors */
  --footer-bg: #1E231C;
  --footer-text-title: #FAF8F3;
  --footer-text-body: rgba(250, 248, 243, 0.6);
  --footer-text-link: rgba(250, 248, 243, 0.7);
  --footer-border: rgba(250, 248, 243, 0.05);

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Gradients constant */
  --gradient-cta: linear-gradient(135deg, var(--green-deep), var(--green-mid));

  /* Transitions */
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

[data-theme="dark"] {
  --bg-primary: #121610; /* Dark forest background */
  --bg-secondary: #1a2016; /* Darker leaf card background */
  --bg-tertiary: #1f271c; /* Deep forest green accent */
  --bg-navbar: rgba(18, 22, 16, 0.85);
  --text-primary: #f5f8f4; /* Light text */
  --text-secondary: #a3b09d; /* Soft sage subtext */
  --text-light: #a3b09d; /* Dynamic light theme text fallback */
  --text-dark: #f5f8f4; /* Dynamic dark theme text fallback */
  --border-color: rgba(95, 191, 119, 0.15);
  --gradient-hero: linear-gradient(135deg, #121610, #1f271c, #1a2016);
  --gradient-card: linear-gradient(145deg, #1a2016, #121610);
  --logo-display-light: none;
  --logo-display-dark: block;

  /* Footer Colors - Dark Mode */
  --footer-bg: #0e120d;
  --footer-text-title: #f5f8f4;
  --footer-text-body: rgba(245, 248, 244, 0.6);
  --footer-text-link: rgba(245, 248, 244, 0.7);
  --footer-border: rgba(245, 248, 244, 0.05);

  /* Redefine light branding colors to dark mode equivalents */
  --cream: #121610;
  --cream-dark: #2c3827;
  --green-light: #253321;
  --green-deep: #f5f8f4;
  --gradient-cta: linear-gradient(135deg, hsl(140, 55%, 28%), var(--green-mid));
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: initial; /* Managed by Lenis */
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--green-deep);
  font-weight: 500;
  line-height: 1.2;
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6 {
  color: var(--white);
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

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

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

ul {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }

/* Grid / Flex Layouts */
.grid {
  display: grid;
  gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
  display: flex;
  gap: 1rem;
}
.flex-center {
  align-items: center;
  justify-content: center;
}
.flex-between {
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 992px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 1.25rem; }
}
