﻿/* ============================================================
   MOXIMTECH – DESIGN SYSTEM
   Industrial Blue Light Theme (TSMC / Flytech / Inventec style)
   Primary: #003e75 (Logo Navy)  Accent: #005a9e  Steel: #4878a0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
  --bg:           #ffffff;
  --bg2:          #f4f8fd;
  --bg3:          #e6f0f8;
  --glass:        rgba(255, 255, 255, 0.95);
  --glass-hover:  rgba(0, 62, 117, 0.05);
  --glass-border: rgba(0, 62, 117, 0.14);
  --primary:       #003e75;        /* primary blue */
  --primary-dim:   rgba(0, 62, 117, 0.08);
  --primary-glow:  rgba(0, 62, 117, 0.15);
  --accent:         #005a9e;        /* secondary blue */
  --steel:         #4878a0;        /* steel blue */
  --text-dark:        #0c1f35;        /* body text (dark navy) */
  --text-secondary:       #2e4e6e;        /* secondary text */
  --muted:        #5878a0;        /* muted text */
  --muted2:       #c0d4e8;        /* light divider */
  --font:         'Inter', 'Noto Sans TC', sans-serif;
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --r:            4px;
  --r-lg:         8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--text-dark);
  font-family: var(--font);
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── NAVBAR ───────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0, 62, 117, 0.12);
  box-shadow: 0 1px 12px rgba(0, 60, 120, 0.06);
}

.guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  height: 68px;
}

.logo { display: flex; align-items: center; }
.logo img { width: 160px; display: block; }

.nav ul { list-style: none; display: flex; gap: 2px; padding: 0; margin: 0; }
.nav li { display: flex; position: relative; }
.nav .switch { display: flex; align-items: center; }
.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--r);
  position: relative;
  transition: color 0.25s var(--ease);
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.25s var(--ease);
}
.nav a:hover { color: var(--primary); }
.nav a:hover::after { width: calc(100% - 32px); }

/* Nav Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: 0 12px 40px rgba(0, 62, 117, 0.28), 0 2px 8px rgba(0,0,0,0.1);
  min-width: 170px;
  z-index: 200;
  overflow: hidden;
  animation: dropdownFade 0.18s var(--ease);
}
.nav-dropdown a {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 500;
  padding: 11px 20px;
  letter-spacing: 0.02em;
  text-transform: none;
  transition: color 0.15s, background 0.15s;
}
.nav-dropdown a::after { display: none; }
.nav-dropdown a:hover { color: #ffffff; background: rgba(255, 255, 255, 0.12); }
.nav li.has-dropdown:hover .nav-dropdown { display: block; }

/* Mobile accordion menu */
.menu-content { min-width: 240px; }

.menu-group-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding-right: 4px;
}
.menu-group-hdr a { flex: 1; pointer-events: none; }
.menu-group-hdr:hover a { color: var(--primary); }

.menu-chevron {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.22s var(--ease);
  flex-shrink: 0;
  user-select: none;
}
.menu-chevron::after { content: '›'; }
.menu-group.open .menu-chevron { transform: rotate(90deg); }

.menu-sub-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s var(--ease);
}
.menu-group.open .menu-sub-list { max-height: 320px; }

.menu-content a.menu-sub {
  padding-left: 28px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Full-screen mobile nav overlay (body-level, avoids backdrop-filter containment) ── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background:
    radial-gradient(ellipse at 15% 60%, rgba(0, 62, 117, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(90, 144, 184, 0.05) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 85%, rgba(56, 200, 240, 0.04) 0%, transparent 40%),
    linear-gradient(160deg, #eef5fc 0%, #ffffff 100%);
  overflow-y: auto;
  z-index: 9999;
  animation: menuOverlayIn 0.26s var(--ease);
}
body.mobile-nav-open .mobile-nav-overlay { display: block; }

body.mobile-nav-open .menu-btn {
  border-color: var(--primary);
  background: var(--primary-dim);
}
body.mobile-nav-open .menu-btn img {
  display: none;
}
body.mobile-nav-open .menu-btn::after {
  content: '\2715';
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--primary);
}

.mobile-nav-overlay a {
  display: block;
  font-size: 19px;
  font-weight: 600;
  padding: 15px 36px;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.18s, background 0.18s;
}
.mobile-nav-overlay a:hover { color: var(--primary); background: var(--primary-dim); }
.mobile-nav-overlay a.menu-sub {
  font-size: 14px;
  font-weight: 400;
  padding-left: 56px;
  color: var(--muted);
}
.mobile-nav-overlay .menu-group-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding-right: 36px;
}
.mobile-nav-overlay .menu-group-hdr a { flex: 1; pointer-events: none; }
.mobile-nav-overlay .menu-group-hdr:hover a { color: var(--primary); }
.mobile-nav-overlay .menu-chevron {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.22s var(--ease);
  flex-shrink: 0;
  user-select: none;
}
.mobile-nav-overlay .menu-chevron::after { content: '›'; }
.mobile-nav-overlay .menu-group.open .menu-chevron { transform: rotate(90deg); }
.mobile-nav-overlay .menu-sub-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s var(--ease);
}
.mobile-nav-overlay .menu-group.open .menu-sub-list { max-height: 600px; }

@keyframes menuOverlayIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.search form { display: flex; align-items: center; }
.search-bar {
  background: var(--bg2);
  border: 1px solid var(--glass-border);
  border-right: none;
  border-radius: var(--r) 0 0 var(--r);
  color: var(--text-dark);
  font-size: 13px;
  font-family: var(--font);
  height: 34px;
  width: 120px;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.25s var(--ease), width 0.25s var(--ease);
}
.search-bar::placeholder { color: var(--muted); }
.search-bar:focus { border-color: var(--primary); width: 160px; }
.search-btn {
  background: var(--bg2);
  border: 1px solid var(--glass-border);
  border-left: none;
  border-radius: 0 var(--r) var(--r) 0;
  height: 34px;
  padding: 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: border-color 0.25s;
}
.search:focus-within .search-bar { border-color: var(--primary); }
.search:focus-within .search-btn { border-color: var(--primary); }
.search-btn img { filter: none; opacity: 0.4; }
.search-btn:hover img { opacity: 0.8; }

.language, .menu {
  position: relative;
  display: flex;
  align-items: center;
}
.language-btn, .menu-btn {
  background: var(--bg2);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  cursor: pointer;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: border-color 0.25s, background 0.25s;
}
.menu-btn {
  width: 40px;
  height: 32px;
  padding: 0;
  justify-content: center;
}
.language-btn:hover, .menu-btn:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
}
.language-btn img, .menu-btn img { filter: none; opacity: 0.5; }

.lang-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.language-content, .menu-content {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow: 0 16px 48px rgba(0, 60, 120, 0.12), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 130px;
  overflow: hidden;
  animation: dropdownFade 0.18s var(--ease);
}
.language-content a, .menu-content a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  letter-spacing: 0.03em;
  transition: color 0.18s, background 0.18s;
}
.language-content a:hover, .menu-content a:hover {
  color: var(--primary);
  background: var(--primary-dim);
}
.language.active .language-content,
.menu.active .menu-content { display: block; }

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FOOTER ──────────────────────────────────────────── */
.site-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: rgba(255,255,255,0.7);
}
.footer-top {
  padding: 72px 0;
}
.footer-separator {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin: 0 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 40px 40px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
.footer-cols {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.footer-col h4 {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s var(--ease);
}
.footer-col a:hover { color: #fff; }
.footer-cta {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.footer-logo {
  height: 26px;
  z-index: 1;
}
.footer-cta-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.footer-cta-btn {
  display: inline-block;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: var(--r);
  padding: 8px 20px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.footer-cta-btn:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.footer-socials { display: flex; gap: 8px; }
.footer-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: var(--r);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.footer-social-icon:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.08); }
.footer-social-icon svg { width: 17px; height: 17px; fill: currentColor; display: block; }
.copyright {
  background: rgba(0,0,0,0.22);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 14px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.copyright a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.copyright a:hover { color: rgba(255,255,255,0.8); }
/* ── Newsletter ──────────────────────────────────────── */
.footer-newsletter-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 48px;
}
.footer-newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.footer-nl-text { flex: 1; }
.footer-nl-label {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.footer-nl-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
}
.footer-nl-form {
  display: flex;
  gap: 0;
  flex-shrink: 0;
}
.footer-nl-input {
  width: 260px;
  padding: 10px 16px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-right: none;
  border-radius: var(--r) 0 0 var(--r);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.footer-nl-input::placeholder { color: rgba(255,255,255,0.4); }
.footer-nl-input:focus { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.12); }
.footer-nl-btn {
  padding: 10px 20px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 0 var(--r) var(--r) 0;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.footer-nl-btn:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.6); }
.footer-nl-success { color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 500; padding: 10px 0; }

/* ── Certifications ──────────────────────────────────── */
.footer-certs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-cert-badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}

/* ── Copyright expanded ──────────────────────────────── */
.copyright-links { display: flex; gap: 16px; }
.copyright-links a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.copyright-links a:hover { color: rgba(255,255,255,0.8); }
.footer-lang-toggle { display: flex; align-items: center; gap: 6px; }
.footer-lang-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.footer-lang-btn:hover,
.footer-lang-btn.active { color: rgba(255,255,255,0.85); }
.footer-lang-sep { color: rgba(255,255,255,0.2); font-size: 10px; }

@media (max-width: 960px) {
  .footer-top { padding: 52px 0; }
  .footer-separator { margin: 0 24px; }
  .footer-newsletter-wrap { padding: 28px 24px; }
  .footer-newsletter { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-nl-form { width: 100%; }
  .footer-nl-input { flex: 1; width: auto; }
  .footer-inner { flex-direction: column; padding: 40px 24px 32px; gap: 32px; }
  .footer-cta { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
  .footer-cta-title { font-size: 16px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .footer-top .cta-banner-deco { display: none; }
  .footer-top .cta-banner-inner { flex-direction: column; align-items: flex-start; padding: 0 24px; }
  .footer-top .cta-banner-title { font-size: 1.5rem; }
}
@media (max-width: 600px) {
  .copyright { flex-direction: column; gap: 8px; padding: 14px 20px; }
  .copyright-links { flex-wrap: wrap; justify-content: center; gap: 10px; }
  .footer-certs { flex-wrap: wrap; }
}

/* ── SCROLL REVEAL ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0) translateX(0) scale(1); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }
.reveal-d6 { transition-delay: 0.48s; }

/* Variant directions */
.reveal-left  { transform: translateX(-32px); }
.reveal-right { transform: translateX(32px); }
.reveal-scale { transform: scale(0.94); }
.reveal-fade  { transform: none; }
.reveal-blur  { filter: blur(8px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease); }
.reveal-blur.visible { filter: blur(0); }

/* Auto-stagger: parent with data-stagger applies index-based delay to children */
[data-stagger] > .reveal:nth-child(1) { transition-delay: 0.00s; }
[data-stagger] > .reveal:nth-child(2) { transition-delay: 0.08s; }
[data-stagger] > .reveal:nth-child(3) { transition-delay: 0.16s; }
[data-stagger] > .reveal:nth-child(4) { transition-delay: 0.24s; }
[data-stagger] > .reveal:nth-child(5) { transition-delay: 0.32s; }
[data-stagger] > .reveal:nth-child(6) { transition-delay: 0.40s; }
[data-stagger] > .reveal:nth-child(7) { transition-delay: 0.48s; }
[data-stagger] > .reveal:nth-child(8) { transition-delay: 0.56s; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  padding: 12px 28px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.22s var(--ease), transform 0.18s var(--ease), box-shadow 0.22s var(--ease);
  box-shadow: 0 4px 16px rgba(0, 62, 117, 0.25);
}
.btn-primary:hover {
  background: #005a9e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 62, 117, 0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid rgba(0, 62, 117, 0.35);
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  padding: 12px 28px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 0.22s, color 0.22s, background 0.22s, transform 0.18s;
}
.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
  transform: translateY(-2px);
}

/* ── SECTION LABELS ──────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text-dark);
}

.section-subtitle {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.85;
  max-width: 600px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── HASH-TAB LAYOUT (Customization / Why Choose Us) ─── */
.tabs-page { background: var(--bg); }

.tabs-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 0 80px;
}

.tabs-sidebar {
  flex: 0 0 220px;
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tab-link {
  display: block;
  padding: 11px 18px;
  border-radius: var(--r-lg);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
  border-left: 3px solid transparent;
}
.tab-link:hover {
  background: var(--glass-hover);
  color: var(--primary);
}
.tab-link.active {
  background: var(--primary-dim);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.tabs-content { flex: 1; min-width: 0; }

.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: tabFadeIn 0.22s ease both;
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tab-section {
  margin-bottom: 64px;
}
.tab-section:last-child { margin-bottom: 0; }

.tab-section-head {
  margin-bottom: 36px;
}
.tab-section-head .section-label { display: inline-block; margin-bottom: 10px; }

.tab-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.tab-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tab-card:hover {
  box-shadow: 0 8px 32px rgba(0, 62, 117, 0.08);
  border-color: rgba(0, 62, 117, 0.22);
}
.tab-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.tab-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Process flow (numbered steps) */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.flow-step {
  background: var(--bg2);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 24px 20px;
}
.flow-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--muted2);
  line-height: 1;
  margin-bottom: 10px;
}
.flow-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.flow-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* CTA strip inside tab */
.tab-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.tab-cta-text .tab-cta-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.tab-cta-text .tab-cta-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}
.tab-cta-btn {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--r);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.18s;
}
.tab-cta-btn:hover { opacity: 0.88; }

/* ODM intro paragraph */
.tab-intro {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 32px;
  max-width: 720px;
}

@media (max-width: 960px) {
  .tabs-layout { flex-direction: column; gap: 0; padding: 24px 0 40px; }
  .tabs-sidebar {
    position: static;
    flex-direction: column;
    width: 100%;
    gap: 2px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
  }
  .tab-link { padding: 8px 14px; font-size: 13px; border-left: 3px solid transparent; }
  .tab-link.active { border-left-color: var(--primary); }
  .tab-section { margin-bottom: 40px; }
  .tab-cards { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .flow-grid { grid-template-columns: 1fr; }
  .tab-cta { flex-direction: column; align-items: flex-start; }
}

/* ── CTA Banner ──────────────────────────────────────── */
.cta-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  padding: 72px 0;
}
.cta-banner-deco {
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  pointer-events: none;
}
.cta-banner-deco::before {
  content: '';
  position: absolute;
  inset: 55px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.cta-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
}
.cta-banner-text { flex: 1; }
.cta-banner-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.3;
}
.cta-banner-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.82);
  margin: 0;
  max-width: 560px;
  line-height: 1.7;
}
.cta-banner-btn {
  flex-shrink: 0;
  display: inline-block;
  padding: 14px 32px;
  border: 2px solid rgba(255,255,255,0.8);
  border-radius: var(--r-lg);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cta-banner-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}
@media (max-width: 768px) {
  .cta-banner { padding: 52px 0; }
  .cta-banner-inner { flex-direction: column; align-items: flex-start; padding: 0 24px; }
  .cta-banner-title { font-size: 1.5rem; }
  .cta-banner-deco { display: none; }
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (min-width: 1280px) {
  div.menu { display: none; }
}
@media (max-width: 1279px) {
  .nav { display: none; }
  .search { display: none; }
  .guide { width: 92%; }
  .language-content, .menu-content { top: calc(100% + 8px); }
}
@media (max-width: 480px) {
  .logo img { width: 136px; }
  .footer-cols { grid-template-columns: 1fr; }
}

/* ── Site Search Overlay ─────────────────────────────── */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(12, 31, 53, 0.52);
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 72px;
}
.search-overlay.open { display: flex; }

.search-modal {
  background: var(--bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  width: min(680px, 94vw);
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 62, 117, 0.18);
  overflow: hidden;
  animation: searchModalIn 0.18s var(--ease);
}
@keyframes searchModalIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.search-modal-header img { opacity: 0.35; flex-shrink: 0; }

.search-overlay-input {
  flex: 1;
  font: 500 15px var(--font);
  color: var(--text-dark);
  background: transparent;
  border: none;
  outline: none;
}
.search-overlay-input::placeholder { color: var(--muted); }

.search-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--r);
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.search-modal-close:hover { color: var(--primary); background: var(--primary-dim); }

.search-results {
  overflow-y: auto;
  flex: 1;
  padding: 6px 0 10px;
}

.search-empty {
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  font: 400 14px var(--font);
}

.search-group + .search-group { border-top: 1px solid var(--glass-border); }
.search-group-label {
  padding: 10px 18px 4px;
  font: 600 10px var(--font);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 18px;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}
.search-result-item:hover { background: var(--glass-hover); }

.search-result-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--r);
  background: var(--bg2);
  flex-shrink: 0;
}
.search-result-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  background: var(--primary-dim);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.search-result-text { flex: 1; min-width: 0; }
.search-result-title {
  font: 500 14px var(--font);
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-sub {
  font: 400 12px var(--font);
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Page Progress Bar ──────────────────────────────── */
.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent), #38c8f0);
  z-index: 2000;
  pointer-events: none;
  transition: width 0.08s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Skeleton Loading ───────────────────────────────── */
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sk {
  background: linear-gradient(90deg, #dce8f3 25%, #c8dcea 50%, #dce8f3 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: var(--r);
}

/* Product card skeleton */
.skeleton-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.skeleton-card .sk-img { height: 200px; border-radius: 0; }
.skeleton-card .sk-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-card .sk-line { height: 14px; }
.skeleton-card .sk-title { height: 20px; width: 70%; }
.skeleton-card .sk-tag { height: 18px; width: 45%; border-radius: 40px; }
.skeleton-card .sk-short { width: 50%; }

/* News card skeleton */
.skeleton-news {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.skeleton-news .sk-img { height: 200px; border-radius: 0; }
.skeleton-news .sk-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-news .sk-line { height: 13px; }
.skeleton-news .sk-title { height: 18px; width: 85%; }
.skeleton-news .sk-short { width: 40%; }
.skeleton-news .sk-med { width: 65%; }

/* Category card skeleton */
.skeleton-cat {
  border-radius: var(--r-lg);
  height: 220px;
}

/* ── Cookie Consent Banner ───────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--primary);
  color: #fff;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner-body { flex: 1; min-width: 200px; }
.cookie-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.cookie-banner-text {
  font-size: 0.82rem;
  line-height: 1.55;
  opacity: 0.82;
}
.cookie-banner-link {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.cookie-banner-link:hover { color: #fff; }
.cookie-banner-btns { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
  padding: 8px 22px;
  border-radius: var(--r);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #fff;
  transition: background 0.2s, color 0.2s;
}
.cookie-btn-accept { background: #fff; color: var(--primary); }
.cookie-btn-accept:hover { background: var(--bg2); }
.cookie-btn-decline { background: transparent; color: #fff; }
.cookie-btn-decline:hover { background: rgba(255,255,255,0.12); }

/* Footer cookie settings link */
.footer-bottom-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-cookie-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-family: var(--font);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.footer-cookie-btn:hover { color: rgba(255,255,255,0.8); }

/* ── FUSION SKELETON (.fsk-) ─────────────────────────────
   詳情頁專用：左上深藍 → 右下亮青靜態漸層 + 青色流光 3.2s + 14px 圓角
   用於 product.html / article.html 動態載入時的佔位畫面
   注意：與舊的淺藍 .sk- 系統（line 1119+，列表頁用）並存不衝突 */
.fsk {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    #0d1b3d 0%,
    #143a6e 35%,
    #1a6090 65%,
    #2ba8c4 100%
  );
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 200, 255, 0.3),
    0 0 16px rgba(0, 150, 220, 0.18);
}
.fsk::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 35%,
    rgba(0, 200, 255, 0.18) 45%,
    rgba(120, 230, 255, 0.7) 50%,
    rgba(0, 200, 255, 0.18) 55%,
    transparent 65%
  );
  transform: translateX(-100%);
  animation: fsk-shimmer 3.2s ease-in-out infinite;
}
@keyframes fsk-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .fsk::after { animation: none; }
}

/* Skeleton：產品頁版面（左圖右資訊） */
.fsk-product {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.fsk-product__gallery .fsk-img-main { width: 100%; aspect-ratio: 4/3; }
.fsk-product__gallery .fsk-thumbs { display: flex; gap: 8px; margin-top: 12px; }
.fsk-product__gallery .fsk-thumb { width: 64px; height: 64px; border-radius: 8px; }
.fsk-product__info > .fsk { border-radius: 6px; }
.fsk-product__info .fsk-tag      { width: 80px; height: 22px; margin-bottom: 16px; }
.fsk-product__info .fsk-title    { width: 70%; height: 36px; margin-bottom: 14px; }
.fsk-product__info .fsk-tagline  { width: 90%; height: 16px; margin-bottom: 8px; }
.fsk-product__info .fsk-tagline.short { width: 60%; margin-bottom: 32px; }
.fsk-product__info .fsk-spec-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 62, 117, 0.1);
}
.fsk-product__info .fsk-spec-row .fsk { border-radius: 4px; }
.fsk-product__info .fsk-spec-row .fsk-label { width: 30%; height: 14px; }
.fsk-product__info .fsk-spec-row .fsk-value { width: 50%; height: 14px; }
.fsk-product__info .fsk-btns { display: flex; gap: 12px; margin-top: 32px; }
.fsk-product__info .fsk-btn  { width: 140px; height: 44px; border-radius: 6px; }

/* Skeleton：文章頁版面（標題 + Hero + 段落） */
.fsk-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px;
}
.fsk-article > .fsk { border-radius: 6px; }
.fsk-article .fsk-cat   { width: 90px;  height: 18px; margin-bottom: 16px; }
.fsk-article .fsk-h1    { width: 85%;   height: 38px; margin-bottom: 10px; }
.fsk-article .fsk-h1.line2 { width: 60%; margin-bottom: 20px; }
.fsk-article .fsk-meta  { width: 220px; height: 14px; margin-bottom: 32px; }
.fsk-article .fsk-hero  { width: 100%;  aspect-ratio: 16/9; border-radius: 14px; margin-bottom: 36px; }
.fsk-article .fsk-p     { width: 100%;  height: 14px; margin-bottom: 12px; }
.fsk-article .fsk-p.w90 { width: 90%; }
.fsk-article .fsk-p.w70 { width: 70%; margin-bottom: 28px; }

@media (max-width: 720px) {
  .fsk-product { grid-template-columns: 1fr; gap: 24px; padding: 40px 20px; }
}

/* ============================================================
   STYLE ENHANCEMENTS — Polish layer (Phase: 樣式優化 v0.7.0)
   Universal additions: typography, micro-interactions, section rhythm,
   mobile UX, View Transitions API. All additive, zero breaking.
   ============================================================ */

/* ── F. TYPOGRAPHY POLISH ───────────────────────────────────
   Variable weight, optical sizing, kerning, balanced wrapping,
   improved CJK ↔ Latin mixed-script rhythm. */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "ss01" 1;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
:lang(zh), :lang(zh-TW) {
  letter-spacing: 0.02em;
}
h1, h2, h3, h4, .section-title, .page-hero-title, .hero-title {
  text-wrap: balance;
  font-feature-settings: "kern" 1, "liga" 1, "ss01" 1, "cv11" 1;
}
p, .section-subtitle, .card-desc, .product-tag, .cat-desc {
  text-wrap: pretty;
}
/* Inline code / numeric tabular alignment (specs, stats) */
.hero-stats, .stat-num, .product-specs, .compareSpecs, .quickSpecs {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "cv01" 1;
}

/* ── B. MICRO-INTERACTIONS ──────────────────────────────────
   Card 3D tilt, button shine sweep, link gradient underline.
   All hover-only on devices with hover capability. */

/* Cards: subtle 3D lift + conic glow border on hover (pointer devices only).
   Use ::after with inset:0 so cards with overflow:hidden still show it. */
.service-card, .product-card, .tab-card, .news-card { position: relative; }
@media (hover: hover) {
  .service-card::after,
  .product-card::after,
  .tab-card::after,
  .news-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(
      from var(--card-angle, 0deg),
      transparent 0%,
      rgba(0, 62, 117, 0.28) 30%,
      rgba(56, 200, 240, 0.55) 50%,
      rgba(0, 62, 117, 0.28) 70%,
      transparent 100%
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
    z-index: 1;
    animation: card-angle-spin 6s linear infinite paused;
  }
  .service-card:hover::after,
  .product-card:hover::after,
  .tab-card:hover::after,
  .news-card:hover::after {
    opacity: 1;
    animation-play-state: running;
  }
}
@property --card-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes card-angle-spin {
  to { --card-angle: 360deg; }
}

/* Button primary: shine sweep */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
  pointer-events: none;
  z-index: -1;
}
.btn-primary:hover::before { transform: translateX(120%); }

/* Button outline: fill-on-hover with smooth gradient */
.btn-outline { position: relative; overflow: hidden; isolation: isolate; }
.btn-outline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease);
  z-index: -1;
}
.btn-outline:hover::before { transform: scaleX(1); }
.btn-outline:hover { color: #fff; border-color: var(--primary); background: transparent; }

/* Nav link: gradient underline morph (replaces flat width animation) */
.nav a::after {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  height: 2px;
  border-radius: 1px;
}

/* Product card image: subtle parallax zoom (smoother than current) */
.product-card .product-img-wrap img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s var(--ease);
}
.product-card:hover .product-img-wrap img {
  transform: scale(1.08) translateY(-2px);
  filter: drop-shadow(0 12px 24px rgba(0, 62, 117, 0.22));
}

/* Card icon: gentle pulse on parent hover */
.service-card .card-icon,
.tab-card .card-icon {
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.service-card:hover .card-icon {
  transform: scale(1.08) rotate(-4deg);
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.service-card:hover .card-icon svg { stroke: #fff; }

/* ── C. SECTION VISUAL RHYTHM ───────────────────────────────
   Utility classes for visual breathing between sections. */
.section-tinted { background: var(--bg2); position: relative; }
.section-tinted-deep { background: var(--bg3); position: relative; }

.section-divider {
  position: relative;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 62, 117, 0.18) 20%,
    rgba(0, 62, 117, 0.32) 50%,
    rgba(0, 62, 117, 0.18) 80%,
    transparent 100%);
  margin: 0;
}
.section-divider-dot {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-divider-dot::before,
.section-divider-dot::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 62, 117, 0.22), transparent);
}
.section-divider-dot::after { transform: scaleX(-1); }
.section-divider-dot .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin: 0 14px;
  box-shadow: 0 0 0 4px rgba(0, 62, 117, 0.08), 0 0 16px rgba(0, 62, 117, 0.35);
  flex-shrink: 0;
}

/* Section breathing utility (positioning anchor, no decoration to avoid clashing with per-page section borders) */
.section-frame { position: relative; }

/* ── D. MOBILE UX & ACCESSIBILITY ───────────────────────────
   Larger touch targets, visible focus, tap-state polish. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r);
}
.nav a:focus-visible,
.btn-primary:focus-visible,
.btn-outline:focus-visible,
.menu-btn:focus-visible,
.language-btn:focus-visible {
  outline-offset: 4px;
}
button, a, [role="button"] {
  -webkit-tap-highlight-color: rgba(0, 62, 117, 0.12);
}
/* Touch-device minimums: ensure 44px hit area on interactive controls */
@media (hover: none) and (pointer: coarse) {
  .nav a, .menu-content a, .mobile-nav-overlay a,
  .language-content a, .nav-dropdown a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .btn-primary, .btn-outline { min-height: 44px; }
  .menu-btn, .language-btn { min-height: 40px; min-width: 40px; }
  /* Disable expensive hover-only effects on touch */
  .service-card::before,
  .product-card::before,
  .tab-card::before,
  .news-card::before { display: none; }
}

/* Mobile card layout polish */
@media (max-width: 600px) {
  .product-card, .service-card, .tab-card { border-radius: 12px; }
  .product-img-wrap { min-height: 160px; padding: 20px; }
  .product-info { padding: 18px; }
  .product-name { font-size: 18px; }
}

/* Selection color: brand-aligned */
::selection {
  background: rgba(0, 62, 117, 0.22);
  color: var(--text-dark);
}

/* Scrollbar polish (WebKit + Firefox) */
* { scrollbar-width: thin; scrollbar-color: rgba(0, 62, 117, 0.35) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(0, 62, 117, 0.28);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(0, 62, 117, 0.5); background-clip: padding-box; border: 2px solid transparent; }

/* ── E. VIEW TRANSITIONS API ────────────────────────────────
   Progressive enhancement — cross-page fade + slide on browsers
   that support startViewTransition (Chrome 111+, Edge, Safari 18+).
   No-op on unsupported (Firefox today) — zero JS error risk. */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.32s;
  animation-timing-function: var(--ease);
}
::view-transition-old(root) {
  animation-name: vt-fade-out;
}
::view-transition-new(root) {
  animation-name: vt-fade-in;
}
@keyframes vt-fade-out {
  to { opacity: 0; transform: translateY(-6px); }
}
@keyframes vt-fade-in {
  from { opacity: 0; transform: translateY(8px); }
}

/* Pin the header so it doesn't flicker during view transitions */
.header { view-transition-name: site-header; }
#site-footer, footer.site-footer { view-transition-name: site-footer; }
::view-transition-old(site-header),
::view-transition-new(site-header),
::view-transition-old(site-footer),
::view-transition-new(site-footer) {
  animation: none;
  mix-blend-mode: normal;
}

/* ── REDUCED-MOTION GUARD ───────────────────────────────────
   Honor user preference. Disable transforms/transitions/animations
   while preserving final visual state. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .orb { animation: none !important; }
  .btn-primary::before, .btn-outline::before { display: none; }
}
