/* ============================================================
   EduAgent4u — redesigned styles
   ============================================================ */

:root {
  --c-bg: #f0f4f8;
  --c-surface: #ffffff;
  --c-text: #1a2332;
  --c-text-secondary: #475569;
  --c-muted: #64748b;
  --c-accent: #2563eb;
  --c-accent-dark: #1d4ed8;
  --c-accent-light: #dbeafe;
  --c-accent-glow: rgba(37, 99, 235, 0.15);
  --c-border: #e2e8f0;
  --c-border-light: #f1f5f9;
  --c-hero-bg: #0f172a;
  --c-hero-text: #f8fafc;
  --c-hero-muted: #94a3b8;
  --c-footer-bg: #0f172a;
  --c-footer-text: #94a3b8;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max-w: 1120px;
  --header-h: 56px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --ease: 0.2s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
}
a { color: var(--c-accent); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--c-accent-dark); }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   Header — slim, frosted
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--c-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  color: var(--c-accent);
}
.brand:hover { text-decoration: none; opacity: 0.8; }

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
.nav-main a {
  padding: 0.35rem 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-text-secondary);
  border-radius: 6px;
  transition: all var(--ease);
}
.nav-main a:hover {
  color: var(--c-accent);
  background: var(--c-accent-light);
  text-decoration: none;
}
.lang-switch {
  margin-left: 0.4rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
}
.lang-switch .lang-select {
  appearance: auto;
  max-width: 9.5rem;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: inherit;
  font-family: inherit;
  color: var(--c-accent);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  cursor: pointer;
}
.lang-switch .lang-select:hover,
.lang-switch .lang-select:focus {
  border-color: var(--c-accent);
  outline: none;
  background: var(--c-accent-light);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
}
.nav-toggle:hover { background: var(--c-accent-light); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-text);
  border-radius: 1px;
  transition: all 0.25s ease;
}

@media (max-width: 768px) {
  .site-header .container { position: relative; }
  .nav-toggle { display: flex; }
  .nav-main {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1rem 0.75rem;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--r-md) var(--r-md);
    display: none;
  }
  .site-header.is-open .nav-main { display: flex; }
  .site-header--simple .nav-toggle { display: none !important; }
  .site-header--simple .nav-main {
    display: flex !important;
    position: static;
    flex-direction: row;
    padding: 0;
    border: none;
    box-shadow: none;
  }
  .lang-switch {
    margin: 0; padding: 0.5rem 0 0; border-left: none;
    border-top: 1px solid var(--c-border-light);
    justify-content: center;
  }
  .lang-switch .lang-select { max-width: none; width: 100%; }
}

/* ============================================================
   Hero — dark, immersive, with decorative shapes
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--c-hero-bg);
  color: var(--c-hero-text);
  padding: 4.5rem 0 4rem;
}

/* Decorative gradient orbs */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 600px; height: 600px;
  top: -220px; right: -120px;
  background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 70%);
}
.hero::after {
  width: 400px; height: 400px;
  bottom: -160px; left: -80px;
  background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
}

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

.hero-text h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-text .lead {
  font-size: 0.95rem;
  color: var(--c-hero-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 28rem;
}

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

/* Hero right — visual panel with stats/keywords */
.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.hero-card {
  padding: 1.1rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  backdrop-filter: blur(8px);
}

.hero-card .num {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #60a5fa;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.hero-card .label {
  font-size: 0.75rem;
  color: var(--c-hero-muted);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual {
    grid-template-columns: 1fr 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--ease);
  text-decoration: none;
}
.btn-primary {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.btn-primary:hover {
  background: var(--c-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.4);
}
.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
  transform: translateY(-1px);
}

/* Light-bg variant for non-hero sections */
.btn-outline {
  background: var(--c-surface);
  color: var(--c-accent);
  border: 1.5px solid var(--c-border);
}
.btn-outline:hover {
  border-color: var(--c-accent);
  background: var(--c-accent-light);
  transform: translateY(-1px);
}

/* ============================================================
   Sections — tighter rhythm
   ============================================================ */
section {
  padding: 3rem 0;
}
.section-alt {
  background: var(--c-surface);
}

.section-header {
  margin-bottom: 1.75rem;
}
.section-header .tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-accent);
  background: var(--c-accent-light);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.section-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}
.section-header p {
  color: var(--c-muted);
  font-size: 0.875rem;
  max-width: 36rem;
}

/* ============================================================
   About — two-column with feature pills
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.about-prose p {
  font-size: 0.9rem;
  color: var(--c-text-secondary);
  margin-bottom: 0.85rem;
  line-height: 1.75;
}
.about-prose p:last-child { margin-bottom: 0; }
.about-prose strong { color: var(--c-accent); font-weight: 700; }

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.feature-pill {
  padding: 1rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  border-radius: var(--r-md);
  transition: box-shadow var(--ease), transform var(--ease);
}
.feature-pill:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.feature-pill .icon {
  width: 36px; height: 36px;
  margin-bottom: 0.5rem;
  border-radius: var(--r-sm);
  background: var(--c-accent-light);
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-pill h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.feature-pill p {
  font-size: 0.75rem;
  color: var(--c-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .about-features { grid-template-columns: 1fr; }
}

/* ============================================================
   Product grid — 3 columns, compact cards
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  transition: all var(--ease);
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-accent), #818cf8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.product-card:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.product-card:hover::before { transform: scaleX(1); }
.product-card .card-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--c-accent-light);
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.product-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0.3rem;
}
.product-card p {
  font-size: 0.8rem;
  color: var(--c-muted);
  line-height: 1.55;
  flex: 1;
}
.product-card .arrow {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-accent);
}

@media (max-width: 768px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Team — horizontal cards
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.team-member {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  transition: all var(--ease);
}
.team-member:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.team-member .avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-accent-light), var(--c-border-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--c-muted);
  flex-shrink: 0;
}
.team-member .info h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}
.team-member .info p {
  font-size: 0.75rem;
  color: var(--c-muted);
  line-height: 1.4;
}

/* ============================================================
   CTA / Contact strip
   ============================================================ */
.cta-strip {
  text-align: center;
  padding: 2.5rem 0;
  background: var(--c-accent-light);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.cta-strip h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.cta-strip p {
  color: var(--c-text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.cta-strip .btn { font-size: 0.8125rem; }

/* ============================================================
   Footer — compact
   ============================================================ */
.site-footer {
  padding: 2rem 0;
  background: var(--c-footer-bg);
  color: var(--c-footer-text);
  font-size: 0.8125rem;
}
.site-footer a { color: #cbd5e1; transition: color var(--ease); }
.site-footer a:hover { color: #fff; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-brand {
  font-weight: 800;
  font-size: 1rem;
  color: #e2e8f0;
  letter-spacing: -0.03em;
}
.footer-logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.footer-logo-link {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity var(--ease);
}
.footer-logo-link:hover { opacity: 1; text-decoration: none; }
.footer-logo-link img {
  max-height: 32px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.footer-logo-link img.no-invert { filter: none; }

.footer-copy {
  width: 100%;
  text-align: center;
  padding-top: 1.25rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #475569;
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-logos { justify-content: center; }
}

/* ============================================================
   Utilities
   ============================================================ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

::selection {
  background: var(--c-accent-light);
  color: var(--c-accent-dark);
}

/* 临时隐藏院校名称与页脚校徽（与 index.html 中 HIDE_INSTITUTION_NAMES 同步） */
body.hide-institution-names .footer-logos {
  display: none;
}

/* 临时隐藏核心成员区块与主导航「团队」链接（与 index.html 中 HIDE_TEAM_SECTION 同步） */
body.hide-team-section #team {
  display: none !important;
}
body.hide-team-section .nav-team-link {
  display: none !important;
}
