/* =========================================================
   Intelligency — Global Stylesheet
   Brand: Dark Theme + Blue Accent (Logo aesthetic)
   ========================================================= */

:root {
  --bg-primary: #06080f;
  --bg-secondary: #0a0d18;
  --bg-card: #0e1322;
  --bg-card-hover: #141a30;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-mid: rgba(255, 255, 255, 0.15);
  --border-blue: rgba(59, 155, 216, 0.35);
  --text-primary: #ffffff;
  --text-secondary: #c8d0e0;
  --text-muted: #7a8499;
  --accent-blue: #3b9bd8;
  --accent-blue-light: #6dbce8;
  --accent-blue-dark: #2a7fb8;
  --accent-glow: rgba(59, 155, 216, 0.25);
  --gradient-blue: linear-gradient(135deg, #3b9bd8 0%, #2a7fb8 100%);
  --gradient-hero: radial-gradient(ellipse at top, rgba(59,155,216,0.15) 0%, transparent 60%);
  /* Per-language fonts. Body inherits via html[lang=...] rules below. */
  --font-jp: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  --font-tw: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --font-en: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-sans: var(--font-jp); /* fallback for elements without lang context */
  --font-display: 'Poppins', 'Noto Sans JP', 'Noto Sans TC', sans-serif;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-blue: 0 8px 32px rgba(59, 155, 216, 0.25);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --container-max: 1240px;
  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ===== Lenis 平滑捲動（smooth scroll）===== */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Page-load fade-in — fires every time a menu item is entered */
  animation: page-enter 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes page-enter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Honor reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header / Navigation ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(10, 14, 26, 0.95);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Ambient drifting dots inside the header strip */
.header-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.site-header .nav-wrapper {
  position: relative;
  z-index: 1;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;             /* 圖標與文字之間的呼吸空隙 */
}

.logo-link .logo-icon-img,
.logo-link .logo-text-img {
  display: block;
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* Header */
.logo-link .logo-icon-img { height: 34px; }
.logo-link .logo-text-img { height: 22px; }   /* 文字略小於 icon，比例平衡 */

/* Footer 略大版本 */
.footer-brand .logo-link { gap: 16px; }
.footer-brand .logo-link .logo-icon-img { height: 38px; }
.footer-brand .logo-link .logo-text-img { height: 24px; }

/* 響應式：小螢幕略縮 */
@media (max-width: 480px) {
  .logo-link { gap: 10px; }
  .logo-link .logo-icon-img { height: 28px; }
  .logo-link .logo-text-img { height: 18px; }
}

/* Legacy fallbacks（避免舊樣式殘留） */
.logo-link .logo-img { display: none; }
.logo-text {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.logo-text .accent { color: var(--accent-blue); }

.nav-menu {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-menu > li > a,
.nav-menu > li > button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-menu > li > a:hover,
.nav-menu > li > button:hover,
.nav-menu > li.active > a {
  color: var(--accent-blue-light);
  background: rgba(59, 155, 216, 0.08);
}

.nav-menu .has-dropdown { position: relative; }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.dropdown a:hover {
  background: rgba(59, 155, 216, 0.1);
  color: var(--accent-blue-light);
}

.dropdown a .item-title {
  display: block;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.dropdown a .item-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lang-switcher {
  display: flex;
  gap: 4px;
  margin-left: 8px;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
}

.lang-switcher button,
.lang-switcher a {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 4px;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}

.lang-switcher button.active,
.lang-switcher a.active {
  background: var(--accent-blue);
  color: #fff;
}

.lang-switcher a:hover { color: var(--accent-blue-light); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: var(--transition);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59,155,216,0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59,155,216,0.4);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border-mid);
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue-light);
  background: rgba(59,155,216,0.08);
}

.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ===== Sections ===== */
main { padding-top: 72px; }

section { padding: 100px 0; position: relative; }

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 14px;
  padding: 6px 14px;
  background: rgba(59,155,216,0.1);
  border: 1px solid var(--border-blue);
  border-radius: 100px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-title .accent { color: var(--accent-blue); }

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 60px;
  line-height: 1.7;
}

.section-header { text-align: center; margin-bottom: 60px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  pointer-events: none;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,155,216,0.15) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(60px);
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(42,127,184,0.12) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(80px);
}

/* Hero particle hexsphere — sits behind the hero content */
.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  /* let hover-reveal & drag reach the canvas; CTAs re-enable below */
  pointer-events: none;
}

.hero-content .hero-ctas,
.hero-content .hero-ctas a {
  pointer-events: auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(59,155,216,0.1);
  border: 1px solid var(--border-blue);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-blue-light);
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease forwards;
}

.hero-eyebrow .pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-blue);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  animation: fadeUp 0.8s 0.1s ease both;
  /* subtle background-colour halo behind the title — smaller blur radius
     and lighter alpha so it sits close to the text without bleeding far */
  filter:
    drop-shadow(0 0 5px rgba(6, 8, 15, 0.55))
    drop-shadow(0 0 12px rgba(6, 8, 15, 0.4));
}

.hero h1 .accent {
  background: linear-gradient(135deg, #6dbce8, #3b9bd8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.3s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ===== Product Matrix Cards ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.product-card {
  position: relative;
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.product-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-blue);
}

.product-card:hover::before { transform: scaleX(1); }

.product-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;          /* 與 .product-tag 相同 → vertical-align 後中線對齊 */
  color: var(--accent-blue);    /* 設定 currentColor 給內部 SVG */
  vertical-align: middle;       /* 與藍色標籤的中線對齊 */
}

.product-icon svg {
  width: 48px;
  height: 48px;
  color: inherit;
  stroke: var(--accent-blue);   /* 明確使用網站主藍色 */
}

/* 確保 SVG 中的所有路徑都繼承藍色 */
.product-icon svg path,
.product-icon svg rect,
.product-icon svg circle {
  stroke: var(--accent-blue);
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.product-tag {
  display: inline-block;
  font-size: 1rem;              /* 放大（原 0.78rem）*/
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;          /* 與 .product-icon 相同 → 中線對齊 */
  margin-left: 6px;             /* 與 icon 之間的呼吸空隙 */
  vertical-align: middle;       /* 對齊 icon 的垂直中線 */
}

.product-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.product-bullets {
  margin-bottom: 28px;
}

.product-bullets li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.product-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b9bd8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.product-card .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.95rem;
}

.product-card .btn-link:hover { color: var(--accent-blue-light); gap: 12px; }

/* ===== Process / Steps ===== */
.steps-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
}

.step-card {
  position: relative;
  padding: 28px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--border-blue);
  transform: translateY(-4px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gradient-blue);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 16px;
  font-family: var(--font-display);
}

.step-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Feature Grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-item {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.feature-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-blue);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  margin-bottom: 20px;
}

.feature-icon svg { width: 36px; height: 36px; }

.feature-item h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-item p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Scenarios ===== */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.scenario-card {
  position: relative;
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.scenario-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-blue);
  transform: translateY(-4px);
}

.scenario-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--accent-blue);
}
.scenario-icon svg {
  width: 44px;
  height: 44px;
}

.scenario-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.scenario-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* ===== Trust / Logos ===== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.trust-item {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
}

.trust-badge {
  margin: 0 auto 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
}

.trust-badge svg { width: 56px; height: 56px; }

.trust-item h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.trust-item p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* ===== Logo Wall ===== */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  align-items: center;
  margin-top: 40px;
  opacity: 0.6;
}

.logo-wall .client-logo {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
}

.logo-wall .client-logo:hover {
  opacity: 1;
  border-color: var(--border-blue);
}

/* ===== Latest News ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.news-card:hover {
  border-color: var(--border-blue);
  transform: translateY(-4px);
}

.news-card-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--accent-blue-dark), var(--bg-card));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
}

.news-card-body { padding: 24px; }

.news-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.news-meta .news-tag {
  padding: 2px 10px;
  background: rgba(59,155,216,0.15);
  color: var(--accent-blue);
  border-radius: 100px;
  font-weight: 600;
}

.news-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ===== Latest News — list layout ===== */
.news-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-subtle);
}

.news-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 14px;
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.news-row:hover {
  background: rgba(59,155,216,0.06);
  padding-left: 22px;
}

.news-row-date {
  flex: 0 0 auto;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.news-row .news-tag {
  flex: 0 0 auto;
  padding: 3px 12px;
  background: rgba(59,155,216,0.15);
  color: var(--accent-blue);
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 600;
}

.news-row-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.04rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

.news-row:hover .news-row-title { color: var(--accent-blue-light); }

.news-row-arrow {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
}

.news-row:hover .news-row-arrow {
  color: var(--accent-blue);
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .news-row { flex-wrap: wrap; gap: 8px 12px; padding: 18px 6px; }
  .news-row:hover { padding-left: 6px; }
  .news-row-title { flex: 1 1 100%; order: 3; }
  .news-row-arrow { display: none; }
}

/* ===== CTA Banner ===== */
.cta-banner {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(135deg, rgba(59,155,216,0.12), rgba(42,127,184,0.05));
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  pointer-events: none;
}

.cta-banner > * { position: relative; z-index: 1; }

.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 16px;
}

.cta-banner p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 80px 0 32px;
  position: relative;
  /* overflow:visible so the hexsphere can bulge up above the footer edge */
  overflow: visible;
}

/* Footer particle hexsphere — lower half, shifted upward so the dome
   crosses the footer's top edge and reaches into the section above */
.footer-particles {
  position: absolute;
  top: -120px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* Ambient drifting dots layered above the hexsphere */
.footer-floats {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  pointer-events: none;
}

.site-footer .container {
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand .logo-link { margin-bottom: 20px; }

.footer-brand p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul a {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

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

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.newsletter-form button {
  padding: 10px 18px;
  background: var(--gradient-blue);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-legal a:hover { color: var(--accent-blue); }

/* ===== Page Header ===== */
.page-header {
  position: relative;
  padding: 140px 0 80px;
  text-align: center;
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--border-subtle);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-header h1 .accent { color: var(--accent-blue); }

.page-header p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a:hover { color: var(--accent-blue); }
.breadcrumb .separator { opacity: 0.5; }

/* ===== Comparison Table ===== */
.compare-wrap { overflow-x: auto; margin-top: 40px; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  min-width: 720px;
}

.compare-table th,
.compare-table td {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.compare-table thead {
  background: rgba(59,155,216,0.08);
}

.compare-table th {
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.compare-table td:first-child { font-weight: 600; color: #fff; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover { background: rgba(59,155,216,0.04); }

/* ===== FAQ ===== */
.faq-list { max-width: 880px; margin: 40px auto 0; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.6rem;
  color: var(--accent-blue);
  font-weight: 300;
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item summary:hover { color: var(--accent-blue-light); }

.faq-body {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  max-width: 780px;
  margin: 60px auto 0;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-blue), var(--accent-blue-dark), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 4px;
  width: 24px;
  height: 24px;
  background: var(--accent-blue);
  border: 4px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent-blue);
}

.timeline-year {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(59,155,216,0.15);
  color: var(--accent-blue);
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.timeline-item h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

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

/* ===== Article / Form ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group label .req { color: var(--accent-blue); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(59,155,216,0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.info-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.info-card .info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  margin-bottom: 16px;
}

.info-card .info-icon svg { width: 32px; height: 32px; }

.info-card h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

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

.map-embed {
  width: 100%;
  height: 360px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-top: 40px;
}

.map-embed iframe { width: 100%; height: 100%; border: 0; filter: invert(0.92) hue-rotate(180deg) saturate(0.6); }

/* ===== AI Engine Diagram ===== */
.ai-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}

.ai-diagram::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(59,155,216,0.12) 0%, transparent 70%);
}

.ai-engines {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.engine-node {
  padding: 36px 28px;
  background: linear-gradient(135deg, rgba(59,155,216,0.15), rgba(59,155,216,0.02));
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  text-align: center;
}

.engine-node .engine-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.engine-node h4 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.engine-node p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.engine-icon {
  margin: 0 auto 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
}

.engine-icon svg { width: 48px; height: 48px; }

.engine-connector {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border: 2px solid var(--accent-blue);
  border-radius: 50%;
  color: var(--accent-blue);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 0 0 8px rgba(59,155,216,0.1);
}

/* ===== Article cards ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.article-card:hover {
  border-color: var(--border-blue);
  transform: translateY(-4px);
}

.article-card-thumb {
  height: 200px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
  position: relative;
  overflow: hidden;
}

.article-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.15), transparent 60%);
}

.article-card-body { padding: 24px; }

.article-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.article-meta .tag {
  padding: 2px 10px;
  background: rgba(59,155,216,0.15);
  color: var(--accent-blue);
  border-radius: 100px;
  font-weight: 600;
}

.article-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-card h3 a:hover { color: var(--accent-blue-light); }

.article-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.filter-tags {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-tag {
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-tag:hover,
.filter-tag.active {
  background: rgba(59,155,216,0.15);
  border-color: var(--accent-blue);
  color: var(--accent-blue-light);
}

/* ===== News Timeline ===== */
.news-list {
  max-width: 880px;
  margin: 0 auto;
}

.news-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.news-item:last-child { border-bottom: none; }

.news-item-date {
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-display);
}

.news-item-date span {
  display: block;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.82rem;
  margin-top: 4px;
}

.news-item h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.news-item h3 a:hover { color: var(--accent-blue); }

.news-item p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Three-layer Defense Visual ===== */
.defense-layers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}

.layer-card {
  position: relative;
  padding: 40px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
  overflow: hidden;
}

.layer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-blue);
}

.layer-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-blue);
  box-shadow: var(--shadow-blue);
}

.layer-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  line-height: 1;
}

.layer-label {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--accent-blue);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
}

.layer-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.layer-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Detection Capabilities Grid ===== */
.detection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.detection-item {
  padding: 20px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
}

.detection-item:hover {
  border-color: var(--border-blue);
  background: var(--bg-card-hover);
}

.detection-item .dot {
  width: 8px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent-blue);
}

.detection-item span {
  font-size: 0.92rem;
  font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps-flow { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .ai-engines { grid-template-columns: 1fr; }
  .engine-connector { transform: rotate(90deg); margin: 0 auto; }
  .defense-layers { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 768px) {
  section { padding: 70px 0; }
  .nav-menu { display: none; }
  .nav-menu.mobile-open {
    display: flex;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border-subtle);
    align-items: stretch;
  }
  .nav-menu.mobile-open .has-dropdown .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: transparent;
    border: none;
    margin-top: 4px;
  }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps-flow { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; padding: 100px 0 60px; }
  .news-item { grid-template-columns: 1fr; }
}

/* =========================================================
   Per-Language Typography
   Each language has its own preferred font, line-height,
   letter-spacing, and hero/headline sizing for optimal
   readability and visual rhythm.
   ========================================================= */

/* ---------- 日本語 (ja) ---------- */
html[lang="ja"] body {
  font-family: var(--font-jp);
  line-height: 1.8;            /* CJK needs more breathing room */
  letter-spacing: 0.02em;      /* slight tracking for kanji legibility */
  font-feature-settings: "palt"; /* proportional latin alternates for mixed JP/EN */
}
html[lang="ja"] .hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
  font-weight: 700;            /* JP usually looks heavy; tone down from 800 */
}
html[lang="ja"] .hero p.lead {
  font-size: 1.1rem;
  line-height: 1.95;
  letter-spacing: 0.03em;
}
html[lang="ja"] .section-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.4;
  letter-spacing: 0.01em;
  font-weight: 700;
}
html[lang="ja"] .section-subtitle {
  font-size: 1.02rem;
  line-height: 1.95;
  letter-spacing: 0.03em;
}
html[lang="ja"] .product-card h3,
html[lang="ja"] .layer-card h3 {
  font-size: 1.45rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
html[lang="ja"] .product-card p,
html[lang="ja"] .feature-item p,
html[lang="ja"] .info-card p,
html[lang="ja"] .news-card p,
html[lang="ja"] .article-card p {
  line-height: 1.85;
  letter-spacing: 0.03em;
}
html[lang="ja"] .btn {
  letter-spacing: 0.06em;      /* JP buttons need more breathing room */
}
html[lang="ja"] .nav-menu > li > a {
  letter-spacing: 0.03em;
}
html[lang="ja"] .faq-item summary {
  line-height: 1.7;
  letter-spacing: 0.02em;
}

/* ---------- 繁體中文 (zh-Hant) ---------- */
html[lang="zh-Hant"] body {
  font-family: var(--font-tw);
  line-height: 1.8;
  letter-spacing: 0.03em;      /* TC slightly looser than JP for full-width punctuation */
}
html[lang="zh-Hant"] .hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  font-weight: 700;
}
html[lang="zh-Hant"] .hero p.lead {
  font-size: 1.1rem;
  line-height: 1.95;
  letter-spacing: 0.04em;
}
html[lang="zh-Hant"] .section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
  font-weight: 700;
}
html[lang="zh-Hant"] .section-subtitle {
  font-size: 1.02rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
}
html[lang="zh-Hant"] .product-card p,
html[lang="zh-Hant"] .feature-item p,
html[lang="zh-Hant"] .info-card p,
html[lang="zh-Hant"] .news-card p,
html[lang="zh-Hant"] .article-card p {
  line-height: 1.85;
  letter-spacing: 0.04em;
}
html[lang="zh-Hant"] .btn {
  letter-spacing: 0.08em;
}
html[lang="zh-Hant"] .faq-item summary {
  line-height: 1.7;
  letter-spacing: 0.03em;
}

/* ---------- English (en) ---------- */
html[lang="en"] body {
  font-family: var(--font-en);
  line-height: 1.65;           /* tighter than CJK */
  letter-spacing: 0;
}
html[lang="en"] .hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;     /* tight tracking for large display type */
  font-weight: 800;
  word-spacing: -0.02em;
}
html[lang="en"] .hero p.lead {
  font-size: 1.2rem;
  line-height: 1.7;
  letter-spacing: 0;
}
html[lang="en"] .section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}
html[lang="en"] .section-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
}
html[lang="en"] .product-card p,
html[lang="en"] .feature-item p,
html[lang="en"] .info-card p,
html[lang="en"] .news-card p,
html[lang="en"] .article-card p {
  line-height: 1.65;
}
html[lang="en"] .btn {
  letter-spacing: 0.01em;
}
html[lang="en"] .faq-item summary {
  line-height: 1.5;
}

/* ---------- Per-language micro adjustments ---------- */
/* CJK text wrapping: avoid awkward line breaks within kanji blocks */
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3,
html[lang="zh-Hant"] h1, html[lang="zh-Hant"] h2, html[lang="zh-Hant"] h3 {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}
/* English: long compound words / URLs should never overflow */
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3,
html[lang="en"] p {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Hero subtitle paragraph spacing */
html[lang="ja"] .hero-content p,
html[lang="zh-Hant"] .hero-content p {
  max-width: 760px;
}
html[lang="en"] .hero-content p {
  max-width: 720px;
}

/* Compare-table cell padding for CJK density */
html[lang="ja"] .compare-table th,
html[lang="ja"] .compare-table td,
html[lang="zh-Hant"] .compare-table th,
html[lang="zh-Hant"] .compare-table td {
  padding: 20px 22px;
  line-height: 1.7;
}

/* Footer brand description: CJK reads better with extra leading */
html[lang="ja"] .footer-brand p,
html[lang="zh-Hant"] .footer-brand p {
  line-height: 1.95;
  letter-spacing: 0.03em;
}

/* Section vertical rhythm: CJK pages feel cleaner with slightly more space */
@media (min-width: 769px) {
  html[lang="ja"] section,
  html[lang="zh-Hant"] section {
    padding: 110px 0;
  }
  html[lang="en"] section {
    padding: 100px 0;
  }
}

/* =========================================================
   News Carousel — touch-friendly scroll-snap slider
   ========================================================= */
.news-carousel {
  position: relative;
  padding: 0 8px;
}

.news-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 4px 16px;
  margin: 0 -4px;
}
.news-track::-webkit-scrollbar { display: none; }

.news-track .news-card {
  flex: 0 0 calc((100% - 48px) / 3);   /* 3 cards visible on desktop */
  scroll-snap-align: start;
  min-width: 0;
}

@media (max-width: 968px) {
  .news-track .news-card { flex: 0 0 calc((100% - 24px) / 2); }
}
@media (max-width: 640px) {
  .news-track .news-card { flex: 0 0 calc(100% - 8px); }
}

.carousel-btn {
  position: absolute;
  top: calc(50% - 14px);          /* 14px = half of dots row height to keep centered with cards */
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.carousel-btn svg { width: 20px; height: 20px; }
.carousel-btn:hover {
  background: var(--accent-blue);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(59,155,216,0.45);
}
.carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }

@media (max-width: 768px) {
  .carousel-prev { left: 4px; }
  .carousel-next { right: 4px; }
  .carousel-btn { width: 38px; height: 38px; }
  .carousel-btn svg { width: 16px; height: 16px; }
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-mid);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: width 0.3s ease, background 0.3s ease;
}
.carousel-dots button:hover { background: var(--accent-blue-light); }
.carousel-dots button.is-active {
  background: var(--accent-blue);
  width: 28px;
  border-radius: 4px;
}

/* =========================================================
   Video Section — Hover / In-view Autoplay
   ========================================================= */
.video-section {
  padding: 50px 0 20px;
}

.video-wrapper {
  position: relative;
  max-width: 1180px;          /* enlarged from 920px → 1180px */
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-blue);
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.video-wrapper:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 12px 36px rgba(59, 155, 216, 0.25);
}

.video-wrapper video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Centered play indicator (shown when paused) */
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(59, 155, 216, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;        /* wrapper handles click */
}
.video-play-btn svg {
  width: 32px;
  height: 32px;
  margin-left: 4px;            /* visual centering of play triangle */
}
.video-wrapper:hover .video-play-btn {
  background: var(--accent-blue);
  transform: translate(-50%, -50%) scale(1.05);
}
.video-wrapper.is-playing .video-play-btn {
  opacity: 0;
  pointer-events: none;
}

/* Subtle hint below the play button */
.video-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 100px;
  pointer-events: none;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.video-wrapper.is-playing .video-hint {
  opacity: 0;
}

/* Sound toggle button (bottom-right corner of video) */
.video-sound-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.3s ease, background 0.3s ease,
              border-color 0.3s ease, transform 0.2s ease;
  pointer-events: auto;
}
.video-sound-btn svg { width: 20px; height: 20px; display: block; }
.video-wrapper:hover .video-sound-btn { opacity: 1; }
.video-sound-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: scale(1.08);
}
.video-sound-btn.is-active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  opacity: 1;
}

@media (max-width: 768px) {
  .video-section { padding: 30px 0 10px; }
  .video-play-btn { width: 56px; height: 56px; }
  .video-play-btn svg { width: 24px; height: 24px; }
  .video-hint { font-size: 0.7rem; bottom: 10px; padding: 4px 10px; }
  .video-sound-btn { width: 38px; height: 38px; bottom: 12px; right: 12px; }
  .video-sound-btn svg { width: 16px; height: 16px; }
}

/* =========================================================
   Custom Cursor — Blue Light Dot with Trailing Particles
   Only enabled on devices with a real pointer (mouse).
   Touch devices fall back to the native cursor.
   ========================================================= */
@media (hover: hover) and (pointer: fine) {

  /* Hide every native cursor (including hand/pointer on links & buttons)
     — overrides all `cursor: pointer` declarations elsewhere */
  html, body, *, *::before, *::after { cursor: none !important; }
  /* Keep the I-beam caret only on real text-entry fields, so users still
     get a visual hint of where their text will be inserted */
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="search"], input[type="number"], input[type="url"],
  input[type="password"], textarea, [contenteditable="true"] {
    cursor: text !important;
  }

  /* Main dot — instant follow, solid (no glow) */
  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: #3b9bd8;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    transform: translate3d(-50%, -50%, 0);
    transition: width 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.18s ease,
                opacity 0.2s ease;
    will-change: transform;
  }

  /* Hover state on interactive elements */
  .cursor-dot.is-hovering {
    width: 14px;
    height: 14px;
    background: #6dbce8;
  }

  /* Click pulse */
  .cursor-dot.is-clicking {
    width: 16px;
    height: 16px;
    background: #ffffff;
  }

  /* Hidden when mouse outside window */
  .cursor-dot.is-hidden { opacity: 0; }

  /* Particle trail dots — enlarged, flat solid (no glow) */
  .cursor-particle {
    position: fixed;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999997;
    background: rgba(59, 155, 216, 0.7);
    transform: translate3d(-50%, -50%, 0) scale(1);
    animation: cursor-particle-fade 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
  }
  @keyframes cursor-particle-fade {
    0%   { opacity: 0.7; transform: translate3d(-50%, -50%, 0) scale(1); }
    100% { opacity: 0;   transform: translate3d(-50%, -50%, 0) scale(0.15); }
  }
}
