/* ============================================
   Canada Shitonghang - Main Stylesheet
   Variables, Reset, Typography, Utilities
   ============================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Brand Colors */
  --color-gold: #F5A623;
  --color-gold-dark: #D98E12;
  --color-gold-light: #FBE0A6;
  --color-dark-blue: #1A3A6B;
  --color-navy: #0F2744;
  --color-navy-light: #1a3d5c;
  --color-light-blue: #7CB9E8;
  --color-sky-blue: #E8F4FC;

  /* Neutral Colors */
  --color-black: #1F1F1F;
  --color-dark-gray: #374151;
  --color-medium-gray: #6B7280;
  --color-light-gray: #F8FAFC;
  --color-white: #FFFFFF;
  --color-border: #E5E7EB;
  --color-border-light: #F3F4F6;

  /* Typography */
  --font-en: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Heiti SC", sans-serif;
  --font-base: var(--font-en), var(--font-zh), sans-serif;

  /* Type Scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3.5rem;    /* 56px */

  /* Spacing */
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */

  /* Layout */
  --container-max: 1200px;
  --nav-height: 72px;
  --nav-height-mobile: 64px;
  --top-bar-height: 40px;

  /* Borders & Shadows */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-button: 0 4px 12px rgba(245, 166, 35, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-dark-gray);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-black);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.25rem, 5vw, var(--text-5xl)); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: var(--text-xl); font-weight: 600; }
h4 { font-size: var(--text-lg); font-weight: 600; }

p {
  margin-bottom: var(--space-4);
}

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

/* --- Typography Utilities --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gold { color: var(--color-gold); }
.text-dark-blue { color: var(--color-dark-blue); }
.text-light-blue { color: var(--color-light-blue); }
.text-medium-gray { color: var(--color-medium-gray); }
.text-white { color: var(--color-white); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.lead {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--color-medium-gray);
}

.small-text {
  font-size: var(--text-sm);
  color: var(--color-medium-gray);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 640px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 48px;
    padding-right: 48px;
  }
}

/* --- Section Spacing --- */
.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section-sm {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section-lg {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

.section--gray {
  background-color: var(--color-light-gray);
}

.section--sky {
  background-color: var(--color-sky-blue);
}

.section--navy {
  background-color: var(--color-navy);
  color: var(--color-white);
}

/* --- Grid Utilities --- */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

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

/* --- Flexbox Utilities --- */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

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

@media (max-width: 639px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 640px) {
  .hide-desktop { display: none !important; }
}

/* --- Animation Utilities --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap');
