/* ============================================
   GLORITEC Website — Design System
   Colors: Navy #0F172A + Teal #0D9488
   Mobile-first | Bilingual ZH/EN
   ============================================ */

:root {
  --navy: #0F172A;
  --navy-light: #1E293B;
  --navy-mid: #334155;
  --teal: #0D9488;
  --teal-light: #CCFBF1;
  --teal-glow: #5EEAD4;
  --white: #FFFFFF;
  --bg: #F8FAFC;
  --bg-alt: #F1F5F9;
  --card: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --red: #EF4444;
  --amber: #F59E0B;
  --green: #10B981;

  --max-w: 1200px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ===== Typography ===== */
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 600; line-height: 1.4; }
h4 { font-size: 1.1rem; font-weight: 600; }

.en { font-size: 0.85em; color: var(--text-muted); display: block; font-weight: 400; }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,23,42,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 108px;
}
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo img { height: 100px; width: auto; }
.header-logo .brand { color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: 1px; display: none; }
.header-logo .brand .en { color: rgba(255,255,255,0.5); font-size: 0.65rem; letter-spacing: 2px; }

/* Nav */
.nav-links { display: flex; gap: 24px; list-style: none; align-items: center; }
.nav-links a { color: rgba(255,255,255,0.75); font-size: 0.875rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--teal-glow); text-decoration: none; }
.nav-cta a {
  background: var(--teal); color: #fff; padding: 8px 18px; border-radius: 6px;
  font-size: 0.85rem; font-weight: 600; transition: background 0.2s;
}
.nav-cta a:hover { background: #0F766E; text-decoration: none; }

/* Language Switch */
.nav-lang a {
  color: rgba(255,255,255,0.55) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}
.nav-lang a:hover {
  color: var(--teal-glow) !important;
  border-color: var(--teal-glow);
  background: rgba(13,148,136,0.1);
  text-decoration: none !important;
}

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ===== Sections ===== */
.section { padding: 80px 20px; }
.section-dark { background: var(--navy); color: #fff; }
.section-dark .en { color: rgba(255,255,255,0.55); }
.section-alt { background: var(--bg-alt); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { color: var(--navy); margin-bottom: 8px; }
.section-dark .section-header h2 { color: #fff; }
.section-header .subtitle { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.section-dark .section-header .subtitle { color: rgba(255,255,255,0.6); }

/* ===== Hero ===== */
.hero {
  background: var(--navy); color: #fff; min-height: 100vh;
  display: flex; align-items: center; text-align: center;
  padding: 120px 20px 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(13,148,136,0.15), transparent);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: var(--max-w); margin: 0 auto; }
.hero h1 { margin-bottom: 16px; }
.hero h1 .hl { color: var(--teal-glow); }
.hero .hero-sub { font-size: 1.15rem; color: rgba(255,255,255,0.7); margin-bottom: 40px; line-height: 1.7; }
.hero .hero-sub .en { font-size: 0.95rem; color: rgba(255,255,255,0.45); }

/* Hero Visuals — 3-column AI scene cards */
.hero-visuals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.hero-visual-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.hero-visual-card:hover {
  transform: translateY(-4px);
  border-color: rgba(94,234,212,0.35);
  box-shadow: 0 8px 32px rgba(13,148,136,0.15);
}
.hv-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.hv-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.hero-visual-card:hover .hv-img-wrap img {
  transform: scale(1.04);
}
.hv-img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.5) 0%, transparent 35%);
  pointer-events: none;
}
.hv-label {
  padding: 14px 16px 16px;
  text-align: center;
}
.hv-icon { font-size: 1.2rem; display: block; margin-bottom: 4px; }
.hv-title {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--teal-glow);
  margin-bottom: 4px;
}
.hv-desc {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; transition: all 0.2s; cursor: pointer; border: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #0F766E; text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(13,148,136,0.3); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.25); }
.btn-outline:hover { border-color: var(--teal-glow); color: var(--teal-glow); text-decoration: none; }

/* ===== Cards ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--card); border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { margin-bottom: 8px; color: var(--navy); }
.card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
.card .en { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

/* Product cards with accent colors */
.card-spc { border-top: 3px solid var(--teal); }
.card-command { border-top: 3px solid #2563EB; }
.card-knowledge { border-top: 3px solid var(--amber); }
.card-custom { border-top: 3px solid #7C3AED; }
.card-iot { border-top: 3px solid #059669; }

/* ===== Solution / Case Cards ===== */
.solution-card, .case-card {
  background: var(--card); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform 0.2s;
}
.solution-card:hover, .case-card:hover { transform: translateY(-2px); }
.solution-card-body, .case-card-body { padding: 24px; }
.solution-card-body .tag, .case-card-body .tag {
  display: inline-block; padding: 3px 10px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600; margin-bottom: 10px;
}
.tag-semi { background: #DBEAFE; color: #1E40AF; }
.tag-molding { background: #FEF3C7; color: #92400E; }
.tag-precision { background: #EDE9FE; color: #6D28D9; }
.tag-cleanroom { background: #CCFBF1; color: #0D9488; }
.tag-auto { background: #FFEDD5; color: #C2410C; }
.tag-metal { background: #E2E8F0; color: #475569; }

/* ===== Stats Bar ===== */
.stats-bar {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
  padding: 32px 20px; background: rgba(255,255,255,0.03); border-radius: var(--radius-lg);
}
.stat-item { text-align: center; }
.stat-num { font-size: 2.2rem; font-weight: 800; color: var(--teal-glow); }
.stat-label { font-size: 0.9rem; color: rgba(255,255,255,0.65); margin-top: 4px; }

/* ===== CTA Section ===== */
.cta-section {
  text-align: center; padding: 80px 20px;
  background: linear-gradient(135deg, var(--navy) 0%, #0B3D5C 100%);
  color: #fff;
}
.cta-section h2 { color: #fff; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.65); margin-bottom: 28px; font-size: 1.05rem; }
.cta-section .qr-box { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 20px; }
.cta-section .qr-img { width: 72px; height: 72px; border-radius: 6px; background: #fff; padding: 3px; }
.cta-section .qr-text { font-size: 0.9rem; color: rgba(255,255,255,0.7); text-align: left; line-height: 1.5; }
.cta-section .contact-info { font-size: 0.9rem; color: rgba(255,255,255,0.55); margin-top: 16px; }

/* ===== Slogan Bar ===== */
.slogan-bar {
  text-align: center; padding: 14px 20px; margin: 0;
  background: rgba(13,148,136,0.08); color: var(--teal);
  font-weight: 700; font-size: 1.1rem; border-radius: var(--radius);
}
.slogan-bar .en { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }

/* ===== FAQ (GEO-optimized) ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 600; color: var(--navy); font-size: 1.05rem; margin-bottom: 8px; cursor: default; }
.faq-a { color: var(--text-muted); line-height: 1.7; font-size: 0.95rem; }
.faq-a .en { font-size: 0.8rem; color: var(--text-light); }

/* ===== Comparison Table ===== */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 32px 0; }
.compare-table th { background: var(--navy); color: #fff; padding: 12px 16px; text-align: left; font-weight: 600; }
.compare-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); background: #fff; }
.section-dark .compare-table td { color: var(--text); }
.compare-table tr:nth-child(even) td { background: var(--bg-alt); }
.compare-table .us-col { color: #0F766E; font-weight: 600; }
.compare-table th.us-col { color: var(--teal-glow); }

/* ===== Blog ===== */
.blog-card { background: var(--card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.blog-card-body { padding: 24px; }
.blog-card .date { font-size: 0.8rem; color: var(--text-light); margin-bottom: 8px; }
.blog-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.blog-card h3 a { color: var(--navy); }
.blog-card h3 a:hover { color: var(--teal); text-decoration: none; }
.blog-card .excerpt { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* Article body */
.article-body { max-width: 720px; margin: 0 auto; }
.article-body h2 { margin: 36px 0 12px; }
.article-body p { margin-bottom: 16px; line-height: 1.8; color: var(--text-muted); }
.article-body ul, .article-body ol { margin: 0 0 16px 20px; color: var(--text-muted); line-height: 1.8; }
.article-body blockquote {
  border-left: 3px solid var(--teal); padding: 12px 20px; margin: 24px 0;
  background: var(--bg-alt); color: var(--text-muted); font-style: italic; border-radius: 0 var(--radius) var(--radius) 0;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,0.6); font-size: 0.85rem;
  padding: 48px 20px 32px; text-align: center;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-links a { color: rgba(255,255,255,0.5); font-size: 0.85rem; }
.footer-links a:hover { color: var(--teal-glow); }
.footer-brand { margin-top: 12px; font-size: 0.85rem; letter-spacing: 3px; color: rgba(255,255,255,0.3); }

/* ===== Page Header (for inner pages) ===== */
.page-hero {
  background: var(--navy); color: #fff; padding: 120px 20px 60px; text-align: center;
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero .page-sub { color: rgba(255,255,255,0.65); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.page-hero .page-sub .en { font-size: 0.9rem; color: rgba(255,255,255,0.45); }

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 16px 20px; font-size: 0.85rem; color: var(--text-light); max-width: var(--max-w); margin: 0 auto; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { color: var(--navy); }

/* ===== Feature Grid ===== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.feature-item { display: flex; gap: 14px; align-items: flex-start; }
.feature-item .fi-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.feature-item h4 { font-size: 1rem; margin-bottom: 4px; color: var(--navy); }
.feature-item p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

/* ===== Case Study ===== */
.case-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.case-meta-item { background: var(--bg-alt); padding: 8px 16px; border-radius: var(--radius); font-size: 0.85rem; }
.case-meta-item strong { color: var(--navy); }
.case-meta-item .en { font-size: 0.75rem; }

.case-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 32px 0; }
.case-result-item { background: #CCFBF1; padding: 20px; border-radius: var(--radius-lg); text-align: center; }
.case-result-item .num { font-size: 1.8rem; font-weight: 800; color: var(--teal); }
.case-result-item .desc { font-size: 0.85rem; color: #115E59; margin-top: 4px; }

/* ===== Contact Page ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info-card { background: var(--card); padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); }
.contact-info-card h3 { margin-bottom: 20px; }
.contact-item { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.contact-item .ci-icon { font-size: 1.2rem; }
.contact-item .ci-text { font-size: 0.95rem; color: var(--text-muted); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .section { padding: 60px 16px; }
  .hero { min-height: auto; padding: 100px 16px 60px; }
  .hero-visuals {
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-visual-card:hover { transform: translateY(-2px); }
  .hv-label { padding: 10px 12px 12px; }
  .stats-bar { gap: 24px; }
  .stat-num { font-size: 1.6rem; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 108px; left: 0; right: 0;
    background: rgba(15,23,42,0.98); padding: 20px; gap: 16px; border-top: 1px solid rgba(255,255,255,0.06);
  }
  .nav-toggle { display: block; }

  .contact-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
}

/* ===== Print ===== */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  .section { padding: 20px 0; }
  .hero { min-height: auto; padding: 20px 0; }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.placeholder-note {
  background: #FEF3C7; border: 1px dashed #F59E0B; padding: 12px 16px;
  border-radius: var(--radius); font-size: 0.85rem; color: #92400E; margin: 16px 0;
}
