/*
 * 海风易科技官网视觉主题 v4
 * 在原有业务样式之上统一颜色、层级、动效与明暗主题，不改变页面功能。
 */
:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-warm: #eaf0f7;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-hover: #e9f0fb;
  --text: #101828;
  --text-2: #475467;
  --text-3: #7b8798;
  --brand: #176b87;
  --brand-deep: #0d465d;
  --brand-light: rgba(23, 107, 135, 0.1);
  --accent: #c56b42;
  --accent-light: rgba(197, 107, 66, 0.1);
  --green: #19875d;
  --green-light: rgba(25, 135, 93, 0.1);
  --border: rgba(126, 145, 166, 0.24);
  --border-light: rgba(126, 145, 166, 0.14);
  --surface-solid: #ffffff;
  --header-bg: rgba(247, 250, 252, 0.76);
  --footer-bg: #0c1820;
  --grid-line: rgba(23, 107, 135, 0.07);
  --ambient-a: rgba(23, 107, 135, 0.16);
  --ambient-b: rgba(197, 107, 66, 0.1);
  --shadow-sm: 0 2px 8px rgba(19, 50, 66, 0.05);
  --shadow: 0 18px 50px rgba(19, 50, 66, 0.09);
  --shadow-lg: 0 32px 90px rgba(19, 50, 66, 0.15);
  --font: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Outfit", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #091118;
  --bg-warm: #0e1a23;
  --bg-card: rgba(17, 29, 38, 0.82);
  --bg-hover: #132531;
  --text: #edf4f7;
  --text-2: #a7b7c2;
  --text-3: #748793;
  --brand: #63b3c9;
  --brand-deep: #9bd5e4;
  --brand-light: rgba(99, 179, 201, 0.12);
  --accent: #dc926d;
  --accent-light: rgba(220, 146, 109, 0.12);
  --green: #62c99d;
  --green-light: rgba(98, 201, 157, 0.11);
  --border: rgba(157, 181, 194, 0.16);
  --border-light: rgba(157, 181, 194, 0.1);
  --surface-solid: #111d26;
  --header-bg: rgba(9, 17, 24, 0.8);
  --footer-bg: #060c11;
  --grid-line: rgba(131, 193, 211, 0.06);
  --ambient-a: rgba(76, 155, 179, 0.17);
  --ambient-b: rgba(213, 128, 87, 0.08);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.18);
  --shadow: 0 20px 54px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 34px 100px rgba(0, 0, 0, 0.38);
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(circle at 12% 5%, var(--ambient-a), transparent 28rem),
    radial-gradient(circle at 88% 18%, var(--ambient-b), transparent 25rem),
    var(--bg);
  transition: background-color 0.45s ease, color 0.3s ease;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.55;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 74%);
}

h1, h2, h3, .logo { font-family: var(--font-display); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a, button, input, textarea, select { outline-offset: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--brand);
}
::selection { color: var(--text); background: rgba(99, 179, 201, 0.25); }

/* 顶部导航 */
.header { padding: 14px 18px 0; }
.header-inner {
  max-width: 1280px;
  height: 64px;
  padding: 0 12px 0 18px;
  border: 1px solid transparent;
  border-radius: 18px;
  transition: all 0.35s var(--ease-premium);
}
.header.scrolled .header-inner {
  background: var(--header-bg);
  border-color: var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(140%);
}
.header.scrolled {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.logo { gap: 12px; font-size: 16px; font-weight: 750; letter-spacing: -0.025em; }
.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-deep);
  box-shadow: 0 12px 24px rgba(13, 70, 93, 0.2);
}
.logo-mark::after { border-color: var(--border); }
.nav-links {
  gap: 2px;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: rgba(126, 145, 166, 0.08);
  box-shadow: none;
}
.nav-links a {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
}
.nav-links a:hover { color: var(--text); background: var(--bg-card); box-shadow: none; }
.nav-links a.active {
  color: var(--surface-solid);
  background: var(--text);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .nav-links a.active { color: #0a151c; background: var(--brand); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
.theme-switch {
  position: relative;
  width: 74px;
  height: 38px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-2);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s var(--ease-premium), background 0.35s ease;
}
.theme-switch:hover { border-color: var(--brand); transform: translateY(-1px); }
.theme-switch:active { transform: scale(0.97); }
.theme-switch-track { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 100%; align-items: center; }
.theme-switch-icon { z-index: 2; display: grid; place-items: center; transition: color 0.3s ease; }
.theme-switch-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 30px;
  border-radius: 9px;
  background: var(--surface-solid);
  box-shadow: 0 4px 14px rgba(19, 50, 66, 0.16);
  transition: transform 0.42s var(--ease-premium), background 0.3s ease;
}
[data-theme="dark"] .theme-switch-thumb { transform: translateX(34px); }
[data-theme="light"] .theme-switch-icon-sun,
[data-theme="dark"] .theme-switch-icon-moon { color: var(--brand); }
.theme-switch-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.theme-toggle { display: none !important; }
.mobile-toggle { border-radius: 11px; background: var(--bg-card); border: 1px solid var(--border); }

/* 首页首屏 */
.home-hero {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr) !important;
  gap: clamp(44px, 7vw, 100px) !important;
  align-items: center;
  min-height: 760px !important;
  padding: 150px max(28px, calc((100vw - 1200px) / 2)) 90px !important;
  overflow: hidden;
  background: transparent !important;
}
.home-hero::before {
  position: absolute;
  top: 104px;
  right: -10%;
  width: 52vw;
  height: 52vw;
  max-width: 720px;
  max-height: 720px;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, var(--ambient-a), transparent 67%);
  filter: blur(4px);
  pointer-events: none;
}
.home-hero-text { z-index: 2; max-width: 700px !important; margin: 0 !important; text-align: left !important; }
.home-label {
  padding: 8px 12px !important;
  border-color: var(--border) !important;
  border-radius: 9px !important;
  color: var(--brand) !important;
  background: var(--bg-card) !important;
  box-shadow: var(--shadow-sm);
}
.home-label::before { background: var(--accent) !important; }
.home-title {
  max-width: 760px;
  margin-bottom: 22px !important;
  color: var(--text) !important;
  font-family: var(--font-display);
  font-size: clamp(50px, 6.4vw, 88px) !important;
  font-weight: 800 !important;
  line-height: 0.98 !important;
  letter-spacing: -0.065em !important;
  text-wrap: balance;
}
.home-sub { color: var(--text) !important; font-size: clamp(18px, 2vw, 24px) !important; }
.home-copy { max-width: 620px; color: var(--text-2) !important; font-size: 16px !important; }
.home-actions .btn { min-height: 48px; }
.btn { border-radius: 11px; transition: all 0.3s var(--ease-premium); }
.btn-primary { background: var(--text); box-shadow: 0 16px 34px rgba(16, 24, 40, 0.18); }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-3px); box-shadow: 0 22px 42px rgba(13, 70, 93, 0.24); }
[data-theme="dark"] .btn-primary { color: #071116; background: var(--brand); }
.btn-outline { color: var(--text); background: var(--bg-card); border-color: var(--border); }
.btn-outline:hover { color: var(--brand); background: var(--surface-solid); }

.home-kpis {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 26px !important;
  max-width: 620px !important;
  margin-top: 42px !important;
}
.home-kpis div {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 26px 0 0 !important;
  border: 0 !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.home-kpis div:last-child { padding-right: 0 !important; border-right: 0 !important; }
.home-kpis div::before, .home-kpis div::after { display: none !important; }
.home-kpis strong { color: var(--text) !important; font-size: 28px !important; }
.home-kpis div > span { margin-top: 7px !important; color: var(--text-3) !important; font-size: 12px !important; }

.home-visual {
  position: relative !important;
  z-index: 2;
  display: block !important;
  width: 100% !important;
  max-width: 500px;
  height: 500px !important;
  justify-self: end;
}
.network-orbit {
  position: absolute;
  inset: 8%;
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: orbitSpin 26s linear infinite;
}
.network-orbit::before, .network-orbit::after {
  position: absolute;
  width: 12px;
  height: 12px;
  content: "";
  border: 4px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 24px var(--accent);
}
.network-orbit::before { top: 12%; left: 12%; }
.network-orbit::after { right: 4%; bottom: 24%; background: var(--brand); box-shadow: 0 0 24px var(--brand); }
.network-orbit-secondary { inset: 24%; animation-direction: reverse; animation-duration: 18s; }
.network-core {
  position: absolute;
  inset: 22%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: linear-gradient(145deg, var(--bg-card), rgba(126, 145, 166, 0.06));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(22px);
  transform: rotate(-5deg);
}
.network-core-inner { text-align: center; transform: rotate(5deg); }
.network-core-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 24px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: var(--brand-deep);
  box-shadow: 0 18px 34px rgba(13, 70, 93, 0.25);
}
.network-core small { display: block; margin-bottom: 6px; color: var(--text-3); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; }
.network-core strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 38px; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.network-core span { color: var(--green); font-size: 12px; font-weight: 700; }
.network-float {
  position: absolute;
  min-width: 146px;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: floatSoft 5s ease-in-out infinite;
}
.network-float small { display: block; color: var(--text-3); font-size: 11px; }
.network-float strong { display: block; margin-top: 2px; color: var(--text); font-family: var(--font-display); font-size: 20px; }
.network-float-a { top: 12%; right: 0; }
.network-float-b { bottom: 14%; left: 0; animation-delay: -2.3s; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes floatSoft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* 通用内容与卡片 */
.section { padding-top: 116px; padding-bottom: 124px; }
.section-hd { max-width: 760px; margin-bottom: 60px; }
.section-hd h2, .page-title { font-family: var(--font-display); font-weight: 750; letter-spacing: -0.045em; }
.label-caps { color: var(--brand); font-weight: 800; }
.page-section { padding-top: 142px; }
.page-hero { max-width: 760px; padding-bottom: 58px; }
.product-grid { grid-template-columns: repeat(12, 1fr); gap: 20px; }
.product-grid .product-card { grid-column: span 4; }
.product-grid .product-card:nth-child(1), .product-grid .product-card:nth-child(5) { grid-column: span 8; }
.product-card, .team-card, .brand-card, .about-card, .contact-item, .contact-form-panel, .job-card {
  border-color: var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}
.product-card { border-radius: 20px; }
.product-card::before { background: radial-gradient(circle at var(--mx, 20%) var(--my, 10%), var(--brand-light), transparent 42%); }
.product-card:hover, .team-card:hover, .brand-card:hover { border-color: rgba(99, 179, 201, 0.42); box-shadow: var(--shadow-lg); transform: translateY(-7px); }
.icon-box { border-radius: 13px; }
.icon-box.blue { color: var(--brand); background: var(--brand-light); }
.icon-box.amber { color: var(--accent); background: var(--accent-light); }
.tag { color: var(--text-2); background: var(--bg-warm); }
.product-list-full { max-width: 980px; }
.product-card.wide { padding: 34px; }
.about-grid { grid-template-columns: repeat(12, 1fr); }
.about-card { grid-column: span 3; border-radius: 18px; }
.contact-grid { max-width: 1040px; gap: 28px; }
.contact-form-panel { border-radius: 20px; padding: 36px; }
.contact-item { border-radius: 15px; }
.form-group input, .form-group textarea, .form-group select { color: var(--text); background: var(--bg-warm); border-color: var(--border); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { background: var(--surface-solid); box-shadow: 0 0 0 4px var(--brand-light); }

/* 新闻页原有内联颜色的主题适配 */
.news-search, .category-tabs { background: var(--bg-card) !important; border-color: var(--border) !important; box-shadow: var(--shadow-sm) !important; backdrop-filter: blur(16px); }
.news-search button, .category-tabs a.active, .pagination .active { background: var(--brand) !important; border-color: var(--brand) !important; }
.category-tabs a { color: var(--text-2) !important; background: var(--bg-warm) !important; border-color: var(--border) !important; }
.category-tabs a.active { color: #071116 !important; }
.news-row, .news-item { border-color: var(--border) !important; }
.news-row h2 a { color: var(--text) !important; }
.news-row h2 a:hover { color: var(--brand) !important; }

/* 页脚 */
.footer { padding-top: 58px; background: var(--footer-bg); }
.footer-inner { align-items: center; }
.footer-brand .logo-mark { background: rgba(255, 255, 255, 0.1); }
.footer-links { gap: 8px; }
.footer-links a { padding: 7px 10px; border-radius: 8px; }
.footer-links a:hover { background: rgba(255, 255, 255, 0.06); }

@media (max-width: 1120px) {
  .nav-links a { padding: 0 9px; font-size: 12px; }
  .home-hero { grid-template-columns: minmax(0, 1fr) 380px !important; }
  .home-visual { height: 420px !important; }
  .product-grid .product-card, .product-grid .product-card:nth-child(1), .product-grid .product-card:nth-child(5) { grid-column: span 6; }
}

@media (max-width: 900px) {
  .header { padding: 10px 10px 0; }
  .header-inner { height: 58px; padding-left: 12px; }
  .header-actions { margin-left: auto; }
  .theme-switch { width: 68px; height: 36px; }
  .theme-switch-thumb { width: 29px; height: 28px; }
  [data-theme="dark"] .theme-switch-thumb { transform: translateX(31px); }
  .home-hero { display: block !important; min-height: auto !important; padding-top: 140px !important; }
  .home-hero-text { max-width: 760px !important; margin: 0 auto !important; }
  .home-visual { display: none !important; }
  .nav-links {
    position: fixed !important;
    inset: 80px 10px auto !important;
    z-index: 99;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 94px);
    padding: 16px !important;
    overflow-y: auto;
    border: 1px solid var(--border) !important;
    border-radius: 18px !important;
    opacity: 0;
    pointer-events: none;
    background: var(--header-bg) !important;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(24px);
    transform: translateY(-10px) scale(0.985);
    transition: opacity 0.24s ease, transform 0.3s var(--ease-premium);
  }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
  .nav-links a { width: 100%; height: 44px; justify-content: center; font-size: 15px; }
  .mobile-toggle { display: flex; }
  .about-card { grid-column: span 6; }
}

@media (max-width: 640px) {
  .logo > span:last-child { max-width: 122px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-hero { padding: 126px 20px 70px !important; }
  .home-title { font-size: clamp(43px, 14vw, 62px) !important; }
  .home-sub { font-size: 18px !important; }
  .home-copy { font-size: 14px !important; }
  .home-actions { display: grid !important; grid-template-columns: 1fr 1fr; }
  .home-actions .btn { width: 100%; padding: 12px 15px; justify-content: center; }
  .home-kpis { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 0 !important; }
  .home-kpis div { padding: 0 12px !important; }
  .home-kpis div:first-child { padding-left: 0 !important; }
  .home-kpis strong { font-size: 22px !important; }
  .home-kpis div > span { font-size: 10px !important; }
  .section { padding-top: 76px; padding-bottom: 84px; }
  .page-section { padding-top: 112px; }
  .product-grid { display: block; }
  .product-grid .product-card + .product-card { margin-top: 14px; }
  .about-grid { display: block; }
  .about-card + .about-card { margin-top: 12px; }
  .contact-form-panel, .product-card, .brand-card { padding: 24px 20px; }
  .footer { padding-top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
