/* ============================================
   CLF (China Local Friends) - Common Styles
   CSS Variables + Reset + Base Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Brand Colors */
  --color-primary: #FF6B54;
  --color-primary-light: #FFF0EE;
  --color-primary-hover: #E85A45;

  /* CTA Colors (WhatsApp Green - WCAG AA compliant) */
  --color-cta: #1EAD52;
  --color-cta-hover: #1A9A48;
  --color-cta-light: #E8F9EF;

  /* Functional Colors */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-trust: #3B82F6;
  --color-star: #F59E0B;

  /* Neutral Colors */
  --color-text-dark: #1A1A2E;
  --color-text-body: #374151;
  --color-text-secondary: #64748B;
  --color-text-muted: #94A3B8;
  --color-border: #E2E8F0;
  --color-bg-light: #F8FAFC;
  --color-bg-white: #FFFFFF;
  --color-bg-dark: #1A1A2E;

  /* Typography */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 80px;
  --space-4xl: 120px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.16);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --container-text: 720px;
  --nav-height: 72px;
  --nav-height-mobile: 60px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-body);
  background-color: var(--color-bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--text {
  max-width: var(--container-text);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

/* --- Typography Base --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
  line-height: 1.2;
}

h1 { font-size: 36px; font-weight: 700; }
h2 { font-size: 28px; font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }

@media (min-width: 768px) {
  h1 { font-size: 44px; }
  h2 { font-size: 36px; }
  h3 { font-size: 24px; }
}

@media (min-width: 1024px) {
  h1 { font-size: 56px; }
  h2 { font-size: 40px; }
}

p {
  margin-bottom: var(--space-sm);
}

/* --- Section Base --- */
.section {
  padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-2xl) 0;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: var(--space-3xl) 0;
  }
}

.section--light {
  background-color: var(--color-bg-light);
}

.section--coral {
  background-color: var(--color-primary-light);
}

.section--dark {
  background-color: var(--color-bg-dark);
}

.section__title {
  text-align: center;
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .section__title {
    margin-bottom: var(--space-xl);
  }
}

.section__subtitle {
  text-align: center;
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

/* --- Scroll Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .fade-in {
    transform: translateY(30px);
  }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-muted); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
