/*
 * 歌蓝智能官网全局样式
 * 设计原则：简约大方、克莱因蓝品牌色、移动端优先、无外部依赖
 */

:root {
  /* 品牌色 */
  --gran-blue: #1E40AF;
  --gran-blue-light: #3B82F6;
  --gran-blue-dark: #1E3A8A;
  --gran-blue-soft: #EFF6FF;
  --gran-blue-muted: #DBEAFE;

  /* 中性色 */
  --bg-warm: #FFFBF7;
  --bg-cool: #F8FAFC;
  --white: #FFFFFF;
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-tertiary: #6B7280;
  --border: #E5E7EB;
  --border-light: #F3F4F6;

  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(30, 64, 175, 0.12), 0 4px 10px -4px rgba(30, 64, 175, 0.08);
  --shadow-card: 0 2px 8px rgba(30, 64, 175, 0.06);

  /* 圆角 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 间距 */
  --section-pad: 80px;
  --container-max: 1440px;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (max-width: 768px) {
  :root {
    --section-pad: 48px;
  }
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-warm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gran-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gran-blue-light);
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
}

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
}

.brand:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.brand img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.brand span {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .brand span {
    display: none;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gran-blue);
  background: var(--gran-blue-soft);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 12px 16px 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
  }

  .nav-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    padding: 12px 16px;
    border-radius: var(--radius);
  }
}

/* Hero */
.hero {
  position: relative;
  padding: calc(var(--section-pad) + 20px) 0 var(--section-pad);
  background: linear-gradient(135deg, var(--gran-blue-soft) 0%, var(--bg-warm) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(30, 64, 175, 0.08);
  color: var(--gran-blue);
  border-radius: var(--radius-full);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(36px, 7vw, 60px);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero h1 em {
  color: var(--gran-blue);
  font-style: normal;
  position: relative;
}

.hero .lead {
  font-size: clamp(19px, 2.5vw, 24px);
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--gran-blue);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
  background: var(--gran-blue-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.35);
}

.btn-secondary {
  background: var(--white);
  color: var(--gran-blue);
  border: 1px solid var(--gran-blue-muted);
}

.btn-secondary:hover {
  background: var(--gran-blue-soft);
  color: var(--gran-blue-dark);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* Section */
.section {
  padding: var(--section-pad) 0;
}

.section-alt {
  background: var(--bg-cool);
}

.section-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 48px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--gran-blue-soft);
  color: var(--gran-blue);
  border-radius: var(--radius-full);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 24px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1.75;
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-cool);
}

/* Grid */
.grid {
  display: grid;
  gap: 40px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* Feature / Icon blocks */
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--gran-blue-soft);
  color: var(--gran-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}

.feature-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-text {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.75;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 2px solid var(--border);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 20px;
}

thead {
  background: var(--gran-blue);
  color: var(--white);
}

th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 700;
  font-size: 17px;
}

tbody tr:last-child td {
  border-bottom: 2px solid var(--border);
}

tbody tr:hover {
  background: var(--bg-cool);
}

@media (max-width: 640px) {
  th, td {
    padding: 12px 14px;
    font-size: 15px;
  }
}

/* Image gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  background: var(--bg-cool);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery img:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 640px) {
  .gallery img {
    height: auto;
  }
}

/* Certificate cards with captions */
.cert-card {
  margin: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cert-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.cert-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: var(--bg-cool);
  cursor: pointer;
}

.cert-card figcaption {
  padding: 14px 16px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--white);
  border-top: 1px solid var(--border-light);
}

/* Carousel */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
}

.carousel-slide img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--gran-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s;
}

.carousel-btn:hover {
  background: var(--white);
}

.carousel-btn.prev {
  left: 12px;
}

.carousel-btn.next {
  right: 12px;
}

@media (max-width: 640px) {
  .carousel-btn {
    width: 32px;
    height: 32px;
  }
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--gran-blue-muted);
}

.timeline-item {
  position: relative;
  margin-bottom: 18px;
  padding-left: 16px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gran-blue);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--gran-blue-muted);
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.75;
}

.timeline-item a {
  font-weight: 600;
}

/* Contact / Info list */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 20px;
}

.info-list svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--gran-blue);
  margin-top: 3px;
}

/* QR code display */
.qr-inline {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  width: 100px;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

@media (max-width: 640px) {
  .qr-inline {
    display: block;
    margin: 8px 0 0;
  }
}

/* Footer */
.site-footer {
  background: var(--text-primary);
  color: #9CA3AF;
  padding: 48px 0 28px;
  font-size: 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.footer-title {
  color: var(--white);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #9CA3AF;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 20px;
  text-align: center;
}

.footer-bottom a {
  color: #D1D5DB;
}

.footer-bottom a:hover {
  color: var(--white);
}

.beian-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin: 0 4px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Lazy image reveal */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"][src^="data:"] {
  opacity: 1;
}

/* Modal lightbox */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--white);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

/* 灯箱左右切换 */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transition: background 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }

@media (max-width: 640px) {
  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 34px;
  }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
}

/* 可点击放大的图片，鼠标移上去给个放大镜手势 */
[data-lightbox] {
  cursor: zoom-in;
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.prose {
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 24px;
  line-height: 1.9;
}

.prose p {
  margin-bottom: 16px;
}

.prose strong {
  color: var(--text-primary);
}

/* Founder card */
.founder-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.founder-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.founder-body {
  padding: 32px;
}

.founder-body h3 {
  font-size: 22px;
  margin-bottom: 16px;
}

.founder-body p {
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-size: 15px;
}

@media (max-width: 768px) {
  .founder-card {
    grid-template-columns: 1fr;
  }

  .founder-card img {
    height: 240px;
  }

  .founder-body {
    padding: 24px;
  }
}

/* Video container */
.video-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
}

.video-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

/* Simple center image page */
.simple-img-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg-warm);
}

.simple-img-page img {
  max-width: min(900px, 100%);
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* QR Popover */
.qr-popover {
  position: absolute;
  z-index: 1500;
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  text-align: center;
  min-width: 160px;
}

.qr-popover p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.qr-popover img {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-sm);
  margin: 0 auto;
}

/* Skip link accessibility */
.skip-link {
  position: fixed;
  top: -200px;
  left: 8px;
  background: var(--gran-blue);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.skip-link:focus {
  top: 8px;
  opacity: 1;
  pointer-events: auto;
}


/* Sports gallery: 3 images per row */
.sports-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sports-gallery .card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sports-gallery .card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.sports-gallery .card-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--bg-cool);
  aspect-ratio: auto;
}

.sports-gallery .card-body {
  padding: 16px;
  text-align: center;
}

@media (max-width: 768px) {
  .sports-gallery {
    grid-template-columns: 1fr;
  }
}


/* Timeline scrollable */
.timeline-scroll {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.timeline-scroll .timeline {
  padding: 24px 24px 24px 44px;
}

.timeline-scroll::-webkit-scrollbar {
  width: 8px;
}

.timeline-scroll::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 4px;
}

.timeline-scroll::-webkit-scrollbar-thumb {
  background: var(--gran-blue-muted);
  border-radius: 4px;
}

.timeline-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--gran-blue-light);
}
