/* Common Styles for Ruikang Electric Website */
:root {
  color-scheme: light;
  --paper: oklch(96% 0.012 82);       /* Tinted warm industrial paper #f5f4f0 */
  --paper-tint: oklch(94% 0.015 82);  /* Slightly darker paper */
  --ink: oklch(18% 0.018 38);         /* Deep graphite with red-brown cast #272221 */
  --ink-muted: oklch(43% 0.025 52);   /* Muted graphite #655e5b */
  --red: oklch(48% 0.19 27);          /* WUPP red #b81422 */
  --red-deep: oklch(31% 0.13 27);     /* Deep red #73050e */
  --copper: oklch(62% 0.12 58);       /* Copper accent #b5753b */
  --steel: oklch(24% 0.045 245);      /* Steel blue-black #222f3e */
  --line: oklch(82% 0.012 82);        /* Thin border line #ced1cd */
  --line-light: oklch(90% 0.008 82);  /* Soft divider line */
  --max-width: 1200px;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* Lang Switch System */
html[lang="en"] .lang-zh { display: none !important; }
html[lang="zh"] .lang-en { display: none !important; }

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

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

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.grid-track {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tech-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tech-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--red);
  border-radius: 50%;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(245, 244, 240, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.logo-divider {
  width: 1px;
  height: 24px;
  background-color: var(--line);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
}

.logo-subtitle {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-muted);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
  color: var(--ink);
  background-color: var(--paper-tint);
}

.lang-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-muted);
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 12px;
  transition: all 0.2s ease;
}

.lang-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
  background-color: var(--paper-tint);
}

.nav-cta {
  background-color: var(--red);
  color: #fff;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 4px;
  letter-spacing: 0.02em;
  margin-left: 12px;
  white-space: nowrap;
}

.nav-cta:hover {
  background-color: var(--red-deep);
}

/* Button UI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--red-deep);
}

.btn-secondary {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  background-color: var(--paper-tint);
  border-color: var(--ink);
}

/* Section Common */
.section-padding {
  padding: 80px 0;
}

.section-header {
  margin-bottom: 48px;
  max-width: 800px;
}

.section-eyebrow {
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-desc {
  font-size: 1.02rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-top: 14px;
}

/* Footer Section */
.site-footer {
  background-color: oklch(14% 0.015 38);
  color: oklch(65% 0.01 38);
  padding: 60px 0 40px 0;
  font-size: 0.85rem;
  border-top: 1px solid oklch(24% 0.015 38);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 420px;
}

.footer-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1) opacity(0.7);
  margin-bottom: 18px;
}

.footer-brand p {
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: oklch(85% 0.01 38);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid oklch(20% 0.015 38);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom p {
  font-size: 0.78rem;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .lang-toggle {
    margin-left: auto;
  }
  .site-header {
    position: relative;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
