/* ============================================
   Base Styles - Reset & Typography
   ============================================ */

:root {
  --color-primary: #2E7D6E;
  --color-primary-dark: #1F5C50;
  --color-primary-light: #3A9B89;
  --color-secondary: #F0F7F4;
  --color-bg: #FAFCFB;
  --color-text: #1A1A2E;
  --color-text-light: #4A4A6A;
  --color-accent: #FF8C42;
  --color-accent-hover: #E67A35;
  --color-card-bg: #FFFFFF;
  --color-card-border: #E0EDE8;
  --color-light-accent: #E8F5F0;
  --color-footer-bg: #1A1A2E;
  --color-footer-text: #C8D6E5;
  --color-white: #FFFFFF;
  --color-success: #4CAF50;
  --color-info: #2196F3;
  --color-danger: #ef4444;
  --font-main: 'Nunito', sans-serif;
  --font-heading: 'Poppins', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.3s ease;
  --transition-fast: 0.15s ease;
  --transition-slow: 0.5s ease;
  --max-width: 1200px;
  --font-size-base: 16px;
}

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

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

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--font-size-base);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

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

a:hover {
  color: var(--color-accent);
}

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

ul {
  list-style: none;
}

/* --- Utility Classes --- */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 5rem 0;
}

.bg-secondary {
  background: var(--color-secondary);
}

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

.section-title {
  text-align: center;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 3rem;
  font-size: 1.1rem;
  text-wrap: balance;
}

/* Scroll reveal animations */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal {
  transform: translateY(30px);
}

.reveal-left {
  transform: translateX(-30px);
}

.reveal-right {
  transform: translateX(30px);
}

.reveal-scale {
  transform: scale(0.95);
}

.reveal.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
  opacity: 1;
  transform: translate(0) scale(1);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Image outline polish */
img {
  outline: 1px solid rgba(0, 0, 0, 0.06);
  outline-offset: -1px;
}

.article-card img,
.gallery-item img,
.mini-article-card img,
.related-card img {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Tabular numbers for stats */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* Text balance */
h1, h2, h3, .section-title, .section-subtitle, .card h3 {
  text-wrap: balance;
}

/* --- Headings --- */
.heading-primary {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.heading-secondary {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--color-text);
  margin-bottom: 1rem;
}

.heading-tertiary {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

/* --- Form Elements --- */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}
