/* =========================================================
   Homepage Shared Styles (used by both zh and en versions)
   ========================================================= */

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  background: #1a2540;
  color: #fff;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(180deg, rgba(6, 10, 22, 0.15) 0%, rgba(6, 10, 22, 0) 45%, rgba(6, 10, 22, 0.15) 100%),
    url('assets/background.png');
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse 100% 45% at 50% 95%, rgba(56, 189, 248, 0.06) 0%, transparent 70%),
    linear-gradient(to right, rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 60px 60px, 60px 60px;
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  top: -200px; right: -100px;
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  animation: float-glow 12s ease-in-out infinite;
}
.hero-glow.g2 {
  top: auto; right: auto;
  bottom: -280px; left: -160px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22) 0%, transparent 60%);
  animation-duration: 15s;
}
@keyframes float-glow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate(-30px, 20px) scale(1.1); opacity: 1; }
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 100%;
  margin: 0 auto;
  padding: 120px 40px 100px;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 180px;
}
.hero-left { max-width: none; min-width: 0; text-align: center; }
.hero-left > * {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-rise .9s cubic-bezier(.2,.7,.3,1) forwards;
}
.hero-left > *:nth-child(1) { animation-delay: .1s; }
.hero-left > *:nth-child(2) { animation-delay: .22s; }
.hero-left > *:nth-child(3) { animation-delay: .34s; }
.hero-left > *:nth-child(4) { animation-delay: .46s; }
.hero-left > *:nth-child(5) { animation-delay: .58s; }
@keyframes hero-rise { to { opacity: 1; transform: translateY(0); } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  padding-top: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500;
  color: var(--brand-ice);
  letter-spacing: 0.22em; text-transform: uppercase;
  margin-bottom: 28px;
  border-top: 1px solid rgba(56, 189, 248, 0.4);
  width: fit-content;
}
.hero h1 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(28px, 3.8vw, 120px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  word-break: keep-all;
  white-space: nowrap;
}
.hero h1 .row { display: block; }
.hero h1 strong { font-weight: 700; }
.hero h1 .accent { color: var(--brand-ice); }
.hero-subtitle {
  font-size: clamp(16px, 2vw, 42px);
  font-weight: 300;
  letter-spacing: 2px;
  margin: 60px auto 32px;
  max-width: 720px;
  text-align: center;
  background: linear-gradient(135deg, #c9d4e2 0%, #ffffff 22%, #e8eef6 42%, #ffffff 58%, #a9b4c3 82%, #f4f7fb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.hero-lead {
  font-size: 17px;
  line-height: 1.9;
  color: rgba(255,255,255,0.65);
  max-width: 540px;
  margin: 0 auto 40px;
  text-align: center;
  display: none;
}
.lead-kw {
  display: inline-block;
  color: #fff;
  font-weight: 600;
  padding: 2px 0;
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.5);
}
.lead-sep {
  display: inline-block;
  margin: 0 10px;
  color: rgba(255,255,255,0.3);
  font-weight: 300;
}
.hero-cta-row {
  display: none;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  justify-content: center;
  text-align: center;
}
.hero-stat { padding-right: 48px; border-right: 1px solid rgba(255,255,255,0.08); text-align: center; }
.hero-stat:last-child { border-right: none; padding-right: 0; }
.hero-stat .n {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(20px, 2.2vw, 48px);
  font-weight: 700;
  color: #7DD3FC;
  line-height: 1;
  margin-bottom: 10px;
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.55);
}
.hero-stat .n .u { font-size: 0.5em; font-weight: 500; color: rgba(125, 211, 252, 0.75); margin-left: 4px; text-shadow: none; }
.hero-stat .l {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(11px, 1vw, 18px);
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-scroll-btn {
  display: none;
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.4);
  align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  z-index: 10;
  animation: scroll-bounce 2s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); opacity: 0.6; }
}
@media (max-width: 1100px) { .hero-scroll-btn { display: flex; } }

/* Sections */
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }

/* Product Cards */
.prod-subgroup + .prod-subgroup { margin-top: 80px; }
.prod-subgroup-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 18px;
  align-items: baseline;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line);
}
.prod-subgroup-head .sg-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--brand); font-weight: 600;
  letter-spacing: 0.18em;
}
.prod-subgroup-head .sg-name {
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 500;
  color: var(--ink-0);
  white-space: nowrap;
}
.prod-subgroup-head .sg-en {
  font-size: 12px; color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
}
.prod-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.prod-item {
  position: relative;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: all .3s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.prod-item:hover {
  border-color: var(--brand);
  box-shadow: 0 20px 48px rgba(14, 165, 233, 0.12);
  transform: translateY(-6px);
}
.prod-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.prod-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-3);
  letter-spacing: 0.15em;
  padding: 5px 11px;
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid rgba(203, 213, 225, 0.4);
  border-radius: 100px;
}
.prod-item h4 {
  font-size: 20px; font-weight: 600;
  color: var(--ink-0);
  margin-bottom: 4px;
}
.prod-item .p-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; color: var(--text-3);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.prod-item p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

/* News */
.news-section { padding: 64px 0; background: var(--bg-paper); border-bottom: 1px solid var(--line); }
.news-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 48px; padding-bottom: 20px;
  border-bottom: 1px solid var(--ink-0); gap: 40px; flex-wrap: wrap;
}
.news-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--text-3);
  letter-spacing: 0.2em; margin-bottom: 16px;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
}
.news-eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--text-3); }
.news-header h2 {
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 500; line-height: 1;
  color: var(--ink-0);
}
.news-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.news-feature { display: block; cursor: pointer; }
.nf-image {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(180deg, rgba(5,8,15,0.1) 0%, rgba(5,8,15,0.5) 100%), url('assets/images/news.jpg');
  background-size: cover;
  background-position: center;
  margin-bottom: 24px; position: relative; overflow: hidden;
}
.nf-badge {
  position: absolute; top: 20px; left: 20px;
  padding: 6px 12px; background: rgba(255,255,255,0.95);
  color: var(--ink-0); font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 0.15em;
}
.nf-meta {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 14px; font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--text-3); letter-spacing: 0.08em;
}
.nf-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-4); }
.nf-meta .tag { color: var(--brand); }
.news-feature h3 {
  font-size: clamp(15px, 2.2vw, 28px);
  font-weight: 500; line-height: 1.3;
  color: var(--ink-0); margin-bottom: 14px;
}
.news-feature:hover h3 { color: var(--brand-dark); }
.news-feature p { font-size: 15px; line-height: 1.75; color: var(--text-2); }
.nf-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px; font-size: 13px; font-weight: 600;
  color: var(--ink-0); border-bottom: 1px solid var(--ink-0); padding-bottom: 2px;
}
.news-list { display: flex; flex-direction: column; }
.news-item {
  display: grid; grid-template-columns: 56px 1fr;
  gap: 20px; padding: 20px 12px; margin: 0 -12px;
  border-top: 1px solid var(--line); cursor: pointer; align-items: start;
  text-decoration: none;
}
.news-item:first-child { border-top: 1px solid var(--ink-0); }
.news-item:last-child { border-bottom: 1px solid var(--ink-0); }
.news-item:hover { background: var(--bg); }
.ni-date .d-day { font-size: 26px; font-weight: 400; color: var(--ink-0); }
.ni-date .d-month { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-3); margin-top: 6px; letter-spacing: 0.1em; }
.ni-tag { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; margin-bottom: 8px; color: var(--brand); }
.ni-body h4 { font-size: 18px; font-weight: 500; color: var(--ink-0); margin-bottom: 8px; line-height: 1.35; }
.news-item:hover .ni-body h4 { color: var(--brand-dark); }
.ni-body p { font-size: 13px; color: var(--text-2); line-height: 1.65; }

/* Logos Marquee */
.logos-marquee {
  position: relative; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 8px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logos-track {
  display: flex; gap: 56px; width: max-content; padding: 18px 0;
  animation: logos-scroll 38s linear infinite;
}
.logos-track .logo-tile {
  flex: 0 0 auto; min-width: 160px; padding: 14px 28px;
  background: transparent; font-size: 15px; color: var(--text-2);
  border: 1px solid var(--line); border-radius: 2px;
}
@keyframes logos-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 28px; white-space: normal; }
  .hero-stats { grid-template-columns: 1fr; gap: 24px; }
  .hero-stat { padding-right: 0; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 24px; }
  .hero-stat:last-child { border-bottom: none; }
  .prod-subgrid { grid-template-columns: 1fr; }
  .prod-subgroup-head { grid-template-columns: 1fr; }
  .news-body { grid-template-columns: 1fr; }
  .tech-stack { grid-template-columns: 1fr !important; gap: 32px !important; }
  .tech-layer { grid-template-columns: 48px 1fr !important; gap: 12px !important; padding: 14px 16px !important; }
  .tech-right h3 { font-size: 24px !important; }
  .tech-stats-grid { grid-template-columns: 1fr 1fr !important; gap: 16px 24px !important; }
  .tech-stat .ts-num { font-size: 28px !important; }
  .cases-bar { grid-template-columns: 1fr 1fr !important; }
  .cases-bar .cb { padding: 20px 16px !important; }
  .cases-bar .cb-num { font-size: 28px !important; }
  .cases-bar .cb:nth-child(2) { border-right: none !important; }
}
