/* ═══════════════════════════════════════════════════════════════
   ZHUOWEI TECHNOLOGY — Design System
   科技工业风设计系统
   ═══════════════════════════════════════════════════════════════ */

/* ═══ CSS CUSTOM PROPERTIES ═══ */
:root {
  /* ─── Color Palette: Tech-Industrial ─── */

  /* Dark backgrounds (hero, products, footer) */
  --color-bg-primary:     #0d1117;
  --color-bg-secondary:   #161b22;
  --color-bg-tertiary:    #1c2128;
  --color-bg-elevated:    #21262d;

  /* Light content backgrounds */
  --color-surface:        #ffffff;
  --color-surface-alt:    #f6f8fa;
  --color-surface-hover:  #eaeef2;

  /* Brand Accent — Steel Blue */
  --color-accent:         #4a7c9b;
  --color-accent-hover:   #5b9ab8;
  --color-accent-dark:    #3a6278;
  --color-accent-subtle:  rgba(74, 124, 155, 0.08);

  /* CTA Accent — Warm Copper */
  --color-cta:            #c17f3e;
  --color-cta-hover:      #d4944f;
  --color-cta-dark:       #a66b30;

  /* Text colors */
  --color-text-primary:   #1f2328;
  --color-text-secondary: #656d76;
  --color-text-tertiary:  #8b949e;
  --color-text-inverse:       #f0f6fc;
  --color-text-inverse-muted: #8b949e;

  /* Borders */
  --color-border:        #d0d7de;
  --color-border-subtle: #e8ecf0;
  --color-border-dark:   #30363d;

  /* ─── Typography ─── */
  --font-sans:    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-display: "DIN", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono:    "SF Mono", "Fira Code", "Consolas", monospace;

  --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:     3rem;      /* 48px */
  --text-6xl:     3.75rem;   /* 60px */
  --text-display: 4.5rem;    /* 72px */

  --leading-tight:   1.2;
  --leading-normal:  1.6;
  --leading-relaxed: 1.8;

  --tracking-tight:  -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.04em;
  --tracking-wider:   0.1em;

  /* ─── Spacing (8px base grid) ─── */
  --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 */
  --space-32:  8rem;     /* 128px */
  --space-40:  10rem;    /* 160px */

  /* Section padding */
  --section-py:    var(--space-20);
  --section-py-lg: var(--space-24);

  /* ─── Layout ─── */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1200px;
  --container-2xl: 1400px;
  --container-px:  var(--space-6);

  /* ─── Borders & Radii (sharp = industrial) ─── */
  --radius-none: 0;
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   8px;

  --border-thin:   1px solid var(--color-border);
  --border-accent: 1px solid var(--color-accent);
  --border-dark:   1px solid var(--color-border-dark);

  /* ─── Shadows ─── */
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:   0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-dark: 0 4px 12px rgba(0, 0, 0, 0.3);

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

  /* ─── Z-index Scale ─── */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-header:   300;
  --z-overlay:  400;
  --z-modal:    500;
}


/* ═══ DIN FONT FACE ═══ */
@font-face {
  font-family: 'DIN';
  src: url('../fonts/DIN-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DIN';
  src: url('../fonts/DIN-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background: var(--color-surface);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ═══ TYPOGRAPHY ═══ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-5xl); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover { color: var(--color-accent-hover); }

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

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}


/* ═══ UTILITY CLASSES ═══ */

/* DIN display font */
.font-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
}

/* Uppercase industrial label */
.label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

/* Text colors */
.text-primary    { color: var(--color-text-primary); }
.text-secondary  { color: var(--color-text-secondary); }
.text-tertiary   { color: var(--color-text-tertiary); }
.text-inverse    { color: var(--color-text-inverse); }
.text-accent     { color: var(--color-accent); }

/* Screen reader only */
.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;
}
