/* ============================================================
   Entai Tech — Computer Systems Design
   Chengdu Entai Fuchuan Technology Co., Ltd.
   ============================================================ */

/* --- CUSTOM PROPERTIES --- */
:root {
  --ink: #0a1628;
  --ink-light: #13203b;
  --steel: #1a2d4a;
  --steel-light: #243b5e;
  --teal: #00c9a7;
  --teal-deep: #009b80;
  --teal-glow: #00e6be;
  --gold: #f0b90b;
  --gold-soft: #f5d066;
  --cloud: #eef3f8;
  --snow: #f8fafc;
  --white: #ffffff;
  --text-primary: #0a1628;
  --text-secondary: #3a4c66;
  --text-muted: #6b7d94;
  --font-heading: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-body: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
  --shadow-card: 0 1px 3px hsla(215, 30%, 15%, 0.08), 0 6px 24px hsla(215, 30%, 15%, 0.06);
  --shadow-elevated: 0 2px 6px hsla(215, 30%, 10%, 0.10), 0 12px 40px hsla(215, 30%, 10%, 0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--snow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); letter-spacing: -0.01em; }
h4 { font-size: 1.125rem; }

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 0.75rem;
}

.section-label::before {
  content: '▸ ';
}

/* --- LAYOUT --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 860px;
}

.section {
  padding: 5rem 0;
}

.section--dark {
  background: var(--ink);
  color: var(--cloud);
}

.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 {
  color: var(--white);
}

/* --- HEADER / NAV --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.site-header--scrolled {
  background: hsla(0, 0%, 100%, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: #e2e8f0;
  box-shadow: 0 1px 4px hsla(215, 30%, 10%, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--ink-light) 0%, var(--steel) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.brand-logo::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--teal);
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 0 0 12px var(--teal-glow);
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand-text span {
  color: var(--teal-deep);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 1rem;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--teal-deep);
  background: #eef9f6;
}

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.5rem 1.25rem !important;
  background: var(--teal-deep) !important;
  color: var(--white) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  transition: background 0.25s, transform 0.2s !important;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: #008068 !important;
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

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

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

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

/* --- HERO --- */
.hero {
  padding: 8rem 0 5rem;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, #def5f0 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #eef2ff 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  margin-bottom: 1.25rem;
}

.hero-title .accent {
  color: var(--teal-deep);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.25s, background 0.25s;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--teal-deep);
  color: var(--white);
  box-shadow: 0 4px 14px hsla(170, 100%, 30%, 0.3);
}

.btn--primary:hover {
  background: #008068;
  box-shadow: 0 6px 20px hsla(170, 100%, 25%, 0.4);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid #d0d8e0;
}

.btn--outline:hover {
  border-color: var(--teal-deep);
  color: var(--teal-deep);
  transform: translateY(-2px);
}

.btn--light {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

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

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-illustration {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  position: relative;
}

.hero-circuit {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--ink-light) 0%, var(--steel) 100%);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-circuit::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: calc(var(--radius-xl) - 2px);
  background: var(--ink);
}

.hero-circuit-node {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 2rem;
}

.hero-circuit-node .dot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--teal);
  box-shadow: 0 0 16px var(--teal-glow);
  justify-self: center;
  align-self: center;
}

.hero-circuit-node .dot:nth-child(2),
.hero-circuit-node .dot:nth-child(8) {
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold-soft);
  border-radius: 50%;
}

.hero-circuit-node .dot:nth-child(5) {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 0 24px var(--white);
}

.hero-circuit-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.3;
  background-image:
    linear-gradient(to right, var(--teal-deep) 1px, transparent 1px),
    linear-gradient(to bottom, var(--teal-deep) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
}

/* --- FEATURES --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid #e8ecf2;
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-elevated);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #eef9f6 0%, #d4f5ec 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- STATS --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--teal-deep);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.925rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- CAPABILITIES --- */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.capability-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid #eef1f6;
}

.capability-marker {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 0.45rem;
  background: var(--teal);
  border-radius: 3px;
  box-shadow: 0 0 8px var(--teal-glow);
}

.capability-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.capability-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- CTA --- */
.cta-section {
  background: linear-gradient(160deg, var(--ink-light) 0%, var(--ink) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, #1a3648 0%, transparent 70%);
  pointer-events: none;
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.cta-section p {
  color: #9ab4c8;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--ink);
  color: #7d93a8;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand-desc {
  margin-top: 1rem;
  font-size: 0.925rem;
  line-height: 1.65;
  max-width: 320px;
}

.footer-heading {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  font-size: 0.925rem;
  color: #7d93a8;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--teal-glow);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #1e3248;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: #7d93a8;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: var(--teal-glow);
}

/* --- PAGE HEADER (Privacy / Terms) --- */
.page-header {
  padding: 7rem 0 3rem;
  background: var(--white);
  border-bottom: 1px solid #eef1f6;
  text-align: center;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header .page-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- LEGAL CONTENT --- */
.legal-content {
  padding: 4rem 0 6rem;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--ink-light);
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-content ul, .legal-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.legal-content li {
  list-style: disc;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-content ol li {
  list-style: decimal;
}

.legal-content .highlight-box {
  background: #f0f7f5;
  border-left: 4px solid var(--teal-deep);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

.legal-content .highlight-box p:last-child {
  margin-bottom: 0;
}

.legal-content .last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  font-style: italic;
}

/* --- CONTACT PAGE / SECTION --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #eef9f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-info-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.contact-info-item p {
  color: var(--text-secondary);
  font-size: 0.925rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-illustration {
    max-width: 320px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .section {
    padding: 3.5rem 0;
  }

  .hero {
    padding: 6rem 0 3rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid #eef1f6;
    box-shadow: var(--shadow-elevated);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.35s, opacity 0.25s;
    pointer-events: none;
  }

  .nav-links--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .nav-cta {
    margin-left: 0;
    text-align: center;
  }
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease-out both;
}

.animate-in--delay-1 { animation-delay: 0.1s; }
.animate-in--delay-2 { animation-delay: 0.2s; }
.animate-in--delay-3 { animation-delay: 0.3s; }
.animate-in--delay-4 { animation-delay: 0.4s; }

/* --- UTILITY --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Print */
@media print {
  .site-header, .site-footer, .cta-section, .nav-toggle {
    display: none;
  }
  body {
    font-size: 12pt;
    color: #000;
  }
}
