/* ============================================
   盈如科技 - 企业官网共享样式
   设计风格：简约大气
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Design Tokens ===== */
:root {
  /* 品牌色 */
  --color-primary: #0f4c5c;
  --color-primary-dark: #093845;
  --color-primary-light: #1a6b7e;
  --color-accent: #e36414;
  --color-accent-light: #f08550;

  /* 中性色 */
  --color-text: #1a1a2e;
  --color-text-secondary: #5a6470;
  --color-text-light: #8a94a0;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8fa;
  --color-bg-dark: #0f4c5c;
  --color-border: #e4e7eb;
  --color-border-light: #f0f1f3;

  /* 字体 */
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 间距 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;

  /* 容器 */
  --container-max: 1200px;
  --container-padding: 1.5rem;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(15, 76, 92, 0.06);
  --shadow-md: 0 4px 20px rgba(15, 76, 92, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 76, 92, 0.12);

  /* 过渡 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.3s var(--ease-out);
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ===== Layout Utilities ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-xl);
}

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn--accent:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(227, 100, 20, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

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

.btn--white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--ghost-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.btn--ghost-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn--lg {
  padding: 1.0625rem 2.5rem;
  font-size: 1rem;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.navbar.scrolled {
  padding: 0.875rem 0;
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

.navbar-brand .logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.navbar-brand .logo-icon svg {
  width: 22px;
  height: 22px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.navbar-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.navbar-nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--color-primary);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
  width: 100%;
}

.navbar-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand {
  font-size: 1.375rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.footer-brand .logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
}

.footer-brand .logo-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.footer-desc {
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: 320px;
  margin-bottom: var(--space-md);
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--space-sm);
}

.footer-col ul li {
  margin-bottom: 0.625rem;
}

.footer-col ul li a {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--color-accent-light);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.7;
}

.footer-bottom {
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* ===== Page Hero (子页面头部) ===== */
.page-hero {
  padding: 9rem 0 4rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(227, 100, 20, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  position: relative;
}

.page-hero p {
  font-size: 1.125rem;
  opacity: 0.85;
  max-width: 580px;
  margin: 0 auto;
  position: relative;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--space-md);
  font-size: 0.875rem;
  opacity: 0.7;
  position: relative;
}

.breadcrumb a:hover {
  color: var(--color-accent-light);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  :root {
    --space-2xl: 5rem;
    --space-xl: 4rem;
  }

  .navbar-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    padding: var(--space-md);
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-150%);
    transition: transform 0.4s var(--ease-out);
    box-shadow: var(--shadow-lg);
  }

  .navbar-nav.open {
    transform: translateY(0);
  }

  .navbar-nav a {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border-light);
    width: 100%;
  }

  .navbar-nav a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .navbar-cta .btn {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
