/* 和管车 / HAVSEEN — 主题配色（data-theme）；默认 havseen = VIS007 */
/* HAVSEEN VIS007 标志标准彩色 — 默认主题
   橙 CMYK 0/50/75/0 → #FF7F40
   深灰 K75 → #404040 · 中灰 K50 → #808080
*/
:root,
[data-theme="havseen"] {
  --theme-name: "HAVSEEN";
  --brand: #FF7F40;
  --brand-hover: #E56F36;
  --brand-deep: #CC5A28;
  --brand-soft: #FFA06A;
  --brand-pale: #FFF0E8;
  --brand-rgb: 255, 127, 64;
  --brand-dim: rgba(255, 127, 64, 0.12);
  --brand-glow: rgba(255, 127, 64, 0.28);

  --bg: #FAFAFA;
  --bg-white: #FFFFFF;
  --bg-soft: #F5F5F5;
  --bg-warm: #FFF8F3;
  --bg-card: #FFFFFF;
  --bg-muted: #F0F0F0;
  --header-bg: rgba(255, 255, 255, 0.92);
  --mobile-nav-bg: rgba(255, 255, 255, 0.98);

  --text: #404040;
  --text-strong: #333333;
  --text-muted: #808080;
  --text-dim: #999999;
  --text-on-brand: #FFFFFF;

  --border: rgba(64, 64, 64, 0.12);
  --border-strong: rgba(255, 127, 64, 0.35);
  --border-brand: rgba(255, 127, 64, 0.22);

  --success: #2F9E6B;
  --warning: #D97706;

  --radius: 12px;
  --radius-lg: 16px;
  --header-h: 68px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --shadow-sm: 0 1px 3px rgba(64, 64, 64, 0.06), 0 1px 2px rgba(64, 64, 64, 0.04);
  --shadow-md: 0 8px 24px rgba(64, 64, 64, 0.08);
  --shadow-glow: 0 8px 28px rgba(255, 127, 64, 0.18);
  --shadow-btn: 0 6px 20px rgba(255, 127, 64, 0.32);
  --gradient-cta: linear-gradient(135deg, #FF7F40 0%, #E56F36 55%, #CC5A28 100%);
  --gradient-hero: linear-gradient(165deg, #FFFFFF 0%, #FFF8F3 45%, #FFF0E8 100%);
  --gradient-band: linear-gradient(135deg, #FF7F40 0%, #FF9660 50%, #E56F36 100%);
  --grid-line: rgba(255, 127, 64, 0.06);
  --orb-a: rgba(255, 127, 64, 0.22);
  --orb-b: rgba(255, 160, 106, 0.18);
  --orb-glow: rgba(255, 127, 64, 0.18);
  --header-accent: rgba(255, 127, 64, 0.04);

  --cyan: var(--brand);
  --cyan-dim: var(--brand-dim);
  --cyan-glow: var(--brand-glow);
  --bg-deep: var(--bg);
  --bg-navy: var(--bg-soft);
  --primary: var(--brand);

  color-scheme: light;
}


[data-theme="green"] {
  --theme-name: "环保绿";
  --brand: #2E7D32;
  --brand-hover: #1B5E20;
  --brand-deep: #145214;
  --brand-soft: #66BB6A;
  --brand-pale: #E8F5E9;
  --brand-rgb: 46, 125, 50;
  --brand-dim: rgba(46, 125, 50, 0.12);
  --brand-glow: rgba(46, 125, 50, 0.28);

  --bg: #FAFAFA;
  --bg-white: #FFFFFF;
  --bg-soft: #F5F5F5;
  --bg-warm: #F1F8F1;
  --bg-card: #FFFFFF;
  --bg-muted: #F0F0F0;
  --header-bg: rgba(255, 255, 255, 0.92);
  --mobile-nav-bg: rgba(255, 255, 255, 0.98);

  --text: #424242;
  --text-strong: #1A1A1A;
  --text-muted: #6B6B6B;
  --text-dim: #8A8A8A;
  --text-on-brand: #FFFFFF;

  --border: rgba(66, 66, 66, 0.12);
  --border-strong: rgba(46, 125, 50, 0.35);
  --border-brand: rgba(46, 125, 50, 0.22);

  --shadow-glow: 0 8px 28px rgba(46, 125, 50, 0.18);
  --shadow-btn: 0 6px 20px rgba(46, 125, 50, 0.28);
  --gradient-cta: linear-gradient(135deg, #2E7D32 0%, #43A047 55%, #1B5E20 100%);
  --gradient-hero: linear-gradient(165deg, #FFFFFF 0%, #F1F8F1 45%, #E8F5E9 100%);
  --gradient-band: linear-gradient(135deg, #2E7D32 0%, #66BB6A 50%, #43A047 100%);
  --grid-line: rgba(46, 125, 50, 0.06);
  --orb-a: rgba(46, 125, 50, 0.22);
  --orb-b: rgba(102, 187, 106, 0.18);
  --orb-glow: rgba(46, 125, 50, 0.18);
  --header-accent: rgba(46, 125, 50, 0.04);

  --cyan: var(--brand);
  --cyan-dim: var(--brand-dim);
  --cyan-glow: var(--brand-glow);
  --bg-deep: var(--bg);
  --bg-navy: var(--bg-soft);
  --primary: var(--brand);

  color-scheme: light;
}

[data-theme="blue"] {
  --theme-name: "天空蓝";
  --brand: #0288D1;
  --brand-hover: #01579B;
  --brand-deep: #013A63;
  --brand-soft: #4FC3F7;
  --brand-pale: #E1F5FE;
  --brand-rgb: 2, 136, 209;
  --brand-dim: rgba(2, 136, 209, 0.12);
  --brand-glow: rgba(2, 136, 209, 0.28);

  --bg: #FAFAFA;
  --bg-white: #FFFFFF;
  --bg-soft: #F5F5F5;
  --bg-warm: #F0F9FF;
  --bg-card: #FFFFFF;
  --bg-muted: #F0F0F0;
  --header-bg: rgba(255, 255, 255, 0.92);
  --mobile-nav-bg: rgba(255, 255, 255, 0.98);

  --text: #424242;
  --text-strong: #1A1A1A;
  --text-muted: #6B6B6B;
  --text-dim: #8A8A8A;
  --text-on-brand: #FFFFFF;

  --border: rgba(66, 66, 66, 0.12);
  --border-strong: rgba(2, 136, 209, 0.35);
  --border-brand: rgba(2, 136, 209, 0.22);

  --shadow-glow: 0 8px 28px rgba(2, 136, 209, 0.18);
  --shadow-btn: 0 6px 20px rgba(2, 136, 209, 0.28);
  --gradient-cta: linear-gradient(135deg, #0288D1 0%, #039BE5 55%, #01579B 100%);
  --gradient-hero: linear-gradient(165deg, #FFFFFF 0%, #F0F9FF 45%, #E1F5FE 100%);
  --gradient-band: linear-gradient(135deg, #0288D1 0%, #4FC3F7 50%, #039BE5 100%);
  --grid-line: rgba(2, 136, 209, 0.06);
  --orb-a: rgba(2, 136, 209, 0.22);
  --orb-b: rgba(79, 195, 247, 0.18);
  --orb-glow: rgba(2, 136, 209, 0.18);
  --header-accent: rgba(2, 136, 209, 0.04);

  --cyan: var(--brand);
  --cyan-dim: var(--brand-dim);
  --cyan-glow: var(--brand-glow);
  --bg-deep: var(--bg);
  --bg-navy: var(--bg-soft);
  --primary: var(--brand);

  color-scheme: light;
}

/* 科技蓝 — 深蓝青（对应原版官网demo） */
[data-theme="tech"] {
  --theme-name: "科技蓝";
  --brand: #00d4ff;
  --brand-hover: #7eeaff;
  --brand-deep: #00b4d8;
  --brand-soft: #60a5fa;
  --brand-pale: #12263f;
  --brand-rgb: 0, 212, 255;
  --brand-dim: rgba(0, 212, 255, 0.15);
  --brand-glow: rgba(0, 212, 255, 0.4);

  --bg: #050b14;
  --bg-white: #0a1628;
  --bg-soft: #0a1628;
  --bg-warm: #12263f;
  --bg-card: rgba(26, 51, 82, 0.45);
  --bg-muted: #12263f;
  --header-bg: rgba(5, 11, 20, 0.85);
  --mobile-nav-bg: rgba(5, 11, 20, 0.97);

  --text: #e8eef7;
  --text-strong: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-on-brand: #041018;

  --border: rgba(0, 212, 255, 0.18);
  --border-strong: rgba(0, 212, 255, 0.35);
  --border-brand: rgba(0, 212, 255, 0.22);

  --success: #34d399;
  --warning: #fbbf24;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.12);
  --shadow-btn: 0 0 24px rgba(0, 180, 216, 0.35);
  --gradient-cta: linear-gradient(135deg, #00b4d8 0%, #0077b6 50%, #023e8a 100%);
  --gradient-hero: linear-gradient(160deg, #050b14 0%, #0a1628 40%, #12263f 100%);
  --gradient-band: linear-gradient(135deg, #00b4d8 0%, #3b82f6 50%, #0077b6 100%);
  --grid-line: rgba(0, 212, 255, 0.03);
  --orb-a: rgba(0, 212, 255, 0.22);
  --orb-b: rgba(59, 130, 246, 0.18);
  --orb-glow: rgba(0, 212, 255, 0.12);
  --header-accent: rgba(0, 212, 255, 0.06);

  --cyan: var(--brand);
  --cyan-dim: var(--brand-dim);
  --cyan-glow: var(--brand-glow);
  --bg-deep: var(--bg);
  --bg-navy: var(--bg-soft);
  --primary: #1a3352;

  color-scheme: dark;
}

/* 主题切换器 — 自定义下拉 */
.theme-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: .2rem;
  margin-right: .35rem;
  flex-shrink: 0;
}
.theme-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-strong);
  background-color: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .38rem .75rem .38rem .85rem;
  cursor: pointer;
  min-width: 5.6rem;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.theme-trigger:hover {
  border-color: var(--border-strong);
}
.theme-trigger:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.theme-trigger-caret {
  width: 10px;
  height: 7px;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B6B6B' d='M1.2 1.2L6 6l4.8-4.8'/%3E%3C/svg%3E");
  flex-shrink: 0;
}
[data-theme="tech"] .theme-trigger-caret {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1.2 1.2L6 6l4.8-4.8'/%3E%3C/svg%3E");
}
.theme-trigger[aria-expanded="true"] .theme-trigger-caret {
  transform: rotate(180deg);
}
.theme-menu {
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  z-index: 80;
  margin: 0;
  padding: .35rem;
  list-style: none;
  min-width: 100%;
  background: var(--bg-card, var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}
.theme-menu[hidden] {
  display: none !important;
}
.theme-option {
  display: block;
  width: 100%;
  padding: .5rem .75rem;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  outline: none;
}
.theme-option:hover,
.theme-option:focus-visible {
  background: var(--bg-soft);
  color: var(--text-strong);
}
.theme-option.is-active {
  font-weight: 700;
  color: var(--text-strong);
}
@media (max-width: 1100px) {
  .theme-switcher:not(.theme-switcher--mobile) { display: none; }
}

[data-theme="tech"] .glass-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--bg-card);
  box-shadow: var(--shadow-glow);
}
[data-theme="tech"] .btn-outline {
  background: rgba(0, 212, 255, 0.06);
}
[data-theme="tech"] .logo,
[data-theme="tech"] .logo:hover {
  color: var(--text-strong);
}
[data-theme="tech"] .section-alt {
  background: rgba(10, 22, 40, 0.6);
}
[data-theme="tech"] .hero h1 {
  background: linear-gradient(135deg, #f1f5f9 20%, #00d4ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.theme-switcher--mobile {
  display: none;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0;
  border: none;
  background: transparent;
  justify-content: stretch;
}
.theme-switcher--mobile .theme-trigger {
  width: 100%;
  justify-content: space-between;
  font-size: .85rem;
  padding: .55rem .85rem;
  border-radius: 12px;
}
.theme-switcher--mobile .theme-menu {
  left: 0;
  right: 0;
  min-width: 0;
  width: 100%;
}
@media (max-width: 1100px) {
  .theme-switcher--mobile { display: block; }
}
