/* ============================================
   VokiAI - Design System & Global Styles
   Brand: 科技专业 × 温暖亲和
   ============================================ */

/* --- CSS Variables / Theme --- */
:root {
  --brand-primary: #6345ED;
  --brand-primary-light: #8B72F5;
  --brand-primary-dark: #4A2FD4;
  --brand-gradient: linear-gradient(135deg, #6345ED 0%, #8B72F5 50%, #A78BFA 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(99,69,237,0.08) 0%, rgba(139,114,245,0.05) 100%);

  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #7a7a9a;
  --text-white: #ffffff;

  --bg-primary: #ffffff;
  --bg-secondary: #f8f7ff;
  --bg-dark: #0f0e1a;
  --bg-card: #ffffff;

  --border-light: rgba(99,69,237,0.1);
  --border-card: rgba(99,69,237,0.08);

  --shadow-sm: 0 2px 8px rgba(99,69,237,0.06);
  --shadow-md: 0 4px 20px rgba(99,69,237,0.1);
  --shadow-lg: 0 8px 40px rgba(99,69,237,0.12);
  --shadow-card: 0 2px 12px rgba(99,69,237,0.06), 0 0 0 1px rgba(99,69,237,0.04);
  --shadow-glow: 0 12px 48px -12px rgba(99,69,237,0.28);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-sans: 'Inter', 'Noto Sans SC', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', 'Noto Sans SC', 'Noto Sans JP', sans-serif;

  /* Texture & decoration system */
  --texture-dots: radial-gradient(rgba(99,69,237,0.10) 1px, transparent 1.3px);
  --texture-dots-light: radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1.3px);
  --texture-grid: linear-gradient(rgba(99,69,237,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(99,69,237,0.05) 1px, transparent 1px);
  --sheen-line: linear-gradient(90deg, transparent, rgba(139,114,245,0.55), transparent);

  --container-max: 1280px;
  --container-padding: 24px;
  --section-spacing: 100px;
  --transition: 200ms ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Ambient page atmosphere: soft brand glows + fine dot texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(99,69,237,0.075), transparent 62%),
    radial-gradient(900px 560px at -12% 32%, rgba(56,189,248,0.055), transparent 60%),
    radial-gradient(760px 480px at 70% 110%, rgba(167,139,250,0.05), transparent 60%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--texture-dots);
  background-size: 26px 26px;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% -4%, #000 22%, transparent 74%);
  mask-image: radial-gradient(ellipse 90% 62% at 50% -4%, #000 22%, transparent 74%);
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
p { color: var(--text-secondary); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(99,69,237,0.09), rgba(139,114,245,0.05));
  border: 1px solid rgba(99,69,237,0.14);
}
.section-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 0 8px rgba(99,69,237,0.7);
}

.section-title { margin-bottom: 16px; color: var(--text-primary); }
.section-desc { font-size: 1.1rem; color: var(--text-secondary); max-width: 640px; margin: 0 auto; }

/* --- Layout --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--section-spacing) 0;
}

.section--alt {
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(99,69,237,0.05), transparent 65%),
    var(--texture-dots) 0 0 / 24px 24px no-repeat local,
    var(--bg-secondary);
  background-color: var(--bg-secondary);
  position: relative;
}
.section--alt::before,
.section--alt::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,69,237,0.22), transparent);
  pointer-events: none;
}
.section--alt::before { top: 0; }
.section--alt::after { bottom: 0; }

.section--dark {
  background:
    radial-gradient(820px 420px at 18% 0%, rgba(99,69,237,0.28), transparent 62%),
    radial-gradient(720px 400px at 86% 100%, rgba(56,189,248,0.14), transparent 60%),
    var(--bg-dark);
  color: var(--text-white);
  position: relative;
  overflow: hidden;
}
.section--dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--texture-dots-light);
  background-size: 28px 28px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 30%, transparent 78%);
  pointer-events: none;
}
.section--dark > .container { position: relative; z-index: 1; }
.section--dark p { color: rgba(255,255,255,0.7); }

.text-center { text-align: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

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

.btn-primary {
  background: var(--brand-gradient);
  color: var(--text-white);
  box-shadow: 0 4px 16px rgba(99,69,237,0.3), inset 0 1px 0 rgba(255,255,255,0.28);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.38), transparent);
  transform: skewX(-22deg);
  transition: left 0.55s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99,69,237,0.4), inset 0 1px 0 rgba(255,255,255,0.28);
}
.btn-primary:hover::after { left: 130%; }

.btn-secondary {
  background: transparent;
  color: var(--brand-primary);
  border: 2px solid var(--brand-primary);
}
.btn-secondary:hover {
  background: rgba(99,69,237,0.06);
  transform: translateY(-2px);
}

.btn-white {
  background: #fff;
  color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); }

.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; }

.btn:focus-visible,
.tab-btn:focus-visible,
.filter-btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand-primary-light);
  outline-offset: 2px;
}

/* --- Cards --- */
.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(248,247,255,0.35) 100%),
    var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}
/* Top sheen hairline, revealed on hover */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--sheen-line);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
/* Soft corner glow */
.card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -25%;
  width: 75%;
  height: 90%;
  background: radial-gradient(circle, rgba(139,114,245,0.10) 0%, transparent 68%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(99,69,237,0.22);
}
.card:hover::before,
.card:hover::after { opacity: 1; }

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,0.95), rgba(255,255,255,0) 55%),
    linear-gradient(135deg, rgba(99,69,237,0.10) 0%, rgba(139,114,245,0.05) 55%, rgba(56,189,248,0.07) 100%);
  box-shadow: inset 0 0 0 1px rgba(99,69,237,0.10), inset 0 -6px 12px rgba(99,69,237,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card:hover .card-icon {
  transform: translateY(-4px) rotate(-4deg) scale(1.05);
}

/* --- 3D SVG icon sizing (sprite: images/icons.svg) --- */
.vi {
  width: 1.32em;
  height: 1.32em;
  display: inline-block;
  vertical-align: -0.28em;
  flex: none;
  filter: drop-shadow(0 2px 3px rgba(35,25,80,0.10));
}
.card-icon .vi { width: 40px; height: 40px; vertical-align: 0; filter: none; }
h4 > .vi,
h3 > .vi { margin-right: 2px; }

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(99,69,237,0.06);
  transition: all 0.3s ease;
}
.navbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 80%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,69,237,0.30), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.navbar.scrolled {
  box-shadow: 0 8px 32px rgba(26,26,46,0.08);
}
.navbar.scrolled::after { opacity: 1; }

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

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-logo img { height: 36px; width: auto; }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}
.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--brand-primary);
}
.navbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-primary);
  border-radius: 1px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  position: relative;
  margin-right: 8px;
}
.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.lang-current:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  background: rgba(99,69,237,0.04);
}
.lang-chevron { transition: transform 0.2s; }
.lang-switch.open .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 128px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 1000;
}
.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-decoration: none;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: left;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.lang-option:hover {
  color: var(--brand-primary);
  background: rgba(99,69,237,0.06);
}
.lang-option.active {
  color: var(--brand-primary);
  font-weight: 600;
  background: rgba(99,69,237,0.08);
}

/* Mobile menu toggle button */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.navbar-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}
.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu panel */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 24px 32px;
  z-index: 999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu.active { display: flex; flex-direction: column; }

.mobile-menu-nav {
  flex: 1;
}
.mobile-menu-nav a {
  display: block;
  padding: 15px 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  transition: color var(--transition);
}
.mobile-menu-nav a:hover,
.mobile-menu-nav a.active {
  color: var(--brand-primary);
}

/* Mobile menu language selector (collapsible) */
.mobile-lang-section {
  border-top: 1px solid var(--border-light);
  margin-top: 8px;
  padding-top: 4px;
}
.mobile-lang-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border: none;
}
.mobile-lang-toggle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}
.mobile-lang-toggle.expanded::after {
  transform: rotate(-135deg);
}
.mobile-lang-options {
  display: none;
  padding: 0 0 12px;
}
.mobile-lang-options.active {
  display: flex;
  gap: 10px;
}
.mobile-lang-options a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}
.mobile-lang-options a:hover,
.mobile-lang-options a.active {
  color: var(--brand-primary);
  background: rgba(99,69,237,0.08);
  border-color: var(--brand-primary);
}

/* Mobile menu CTA button */
.mobile-menu-cta {
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid var(--border-light);
}
.mobile-menu-cta .btn {
  width: 100%;
  height: 52px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

/* --- Hero --- */
.hero {
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 520px at 50% -12%, rgba(99,69,237,0.09), transparent 62%),
    var(--bg-primary);
}

/* Precision grid, fading toward edges */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--texture-grid);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 78% 72% at 50% 26%, #000 18%, transparent 72%);
  mask-image: radial-gradient(ellipse 78% 72% at 50% 26%, #000 18%, transparent 72%);
  pointer-events: none;
}

/* Drifting brand orb */
.hero::after {
  content: '';
  position: absolute;
  top: -220px;
  right: -180px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(99,69,237,0.13) 0%, rgba(139,114,245,0.06) 42%, transparent 70%);
  border-radius: 50%;
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}

/* ===== Per-page hero texture variants ===== */

/* Home (index): signature precision grid + orb — uses default .hero styles */

/* Product: layered architecture strata + diagonal scan beam */
.hero--product {
  background:
    radial-gradient(900px 480px at 30% -8%, rgba(56,189,248,0.06), transparent 55%),
    radial-gradient(700px 400px at 75% 10%, rgba(99,69,237,0.05), transparent 50%),
    var(--bg-primary);
}
.hero--product::before {
  background-image:
    repeating-linear-gradient(0deg, rgba(99,69,237,0.05) 0px, rgba(99,69,237,0.05) 1px, transparent 1px, transparent 56px),
    repeating-linear-gradient(0deg, rgba(56,189,248,0.03) 0px, rgba(56,189,248,0.03) 1px, transparent 1px, transparent 14px),
    linear-gradient(135deg, rgba(99,69,237,0.06) 0%, transparent 45%);
  background-size: 100% 56px, 100% 14px, 100% 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 88%);
  mask-image: linear-gradient(to bottom, #000 10%, transparent 88%);
}
.hero--product::after {
  top: auto;
  bottom: -120px;
  right: -80px;
  width: 520px;
  height: 520px;
  background:
    conic-gradient(from 220deg at 50% 50%, transparent 0deg, rgba(56,189,248,0.10) 60deg, transparent 120deg),
    radial-gradient(circle, rgba(99,69,237,0.08) 0%, transparent 60%);
  border-radius: 50%;
  animation: drift 16s ease-in-out infinite alternate;
}

/* Solutions: radial starburst rings + scattered micro-dots */
.hero--solutions {
  background:
    radial-gradient(800px 500px at 50% -5%, rgba(167,139,250,0.07), transparent 55%),
    radial-gradient(600px 350px at 20% 20%, rgba(56,189,248,0.04), transparent 50%),
    var(--bg-primary);
}
.hero--solutions::before {
  background-image:
    radial-gradient(circle at 50% 30%, rgba(99,69,237,0.05) 0%, transparent 20%),
    radial-gradient(circle at 50% 30%, transparent 26%, rgba(99,69,237,0.04) 26.5%, transparent 28%),
    radial-gradient(circle at 50% 30%, transparent 40%, rgba(99,69,237,0.03) 40.5%, transparent 42%),
    radial-gradient(circle at 50% 30%, transparent 56%, rgba(99,69,237,0.025) 56.5%, transparent 58%),
    radial-gradient(rgba(99,69,237,0.07) 1.2px, transparent 1.8px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse 82% 72% at 50% 28%, #000 12%, transparent 76%);
  mask-image: radial-gradient(ellipse 82% 72% at 50% 28%, #000 12%, transparent 76%);
}
.hero--solutions::after {
  top: -160px;
  right: -100px;
  width: 560px;
  height: 560px;
  background:
    radial-gradient(circle at 30% 40%, rgba(167,139,250,0.12) 0%, transparent 48%),
    radial-gradient(circle at 70% 60%, rgba(56,189,248,0.07) 0%, transparent 42%);
  border-radius: 50%;
  animation: drift 12s ease-in-out infinite alternate;
}

/* Pricing: clean vertical columns + soft horizontal sweep */
.hero--pricing {
  background:
    radial-gradient(1000px 400px at 50% -10%, rgba(99,69,237,0.10), transparent 50%),
    linear-gradient(180deg, rgba(56,189,248,0.04) 0%, transparent 40%),
    var(--bg-primary);
}
.hero--pricing::before {
  background-image:
    repeating-linear-gradient(90deg, rgba(99,69,237,0.09) 0px, rgba(99,69,237,0.09) 1px, transparent 1px, transparent 120px),
    linear-gradient(90deg, transparent 0%, rgba(99,69,237,0.08) 50%, transparent 100%);
  background-size: 120px 100%, 100% 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 5%, transparent 82%);
  mask-image: linear-gradient(to bottom, #000 5%, transparent 82%);
}
.hero--pricing::after {
  top: -80px;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 380px;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,69,237,0.16) 0%, rgba(139,114,245,0.08) 40%, transparent 70%);
  border-radius: 50%;
  animation: none;
}

/* Cases: constellation diamond lattice + node dots */
.hero--cases {
  background:
    radial-gradient(700px 450px at 70% -5%, rgba(244,114,182,0.08), transparent 50%),
    radial-gradient(600px 400px at 25% 10%, rgba(99,69,237,0.09), transparent 50%),
    var(--bg-primary);
}
.hero--cases::before {
  background-image:
    linear-gradient(45deg, rgba(99,69,237,0.09) 1px, transparent 1px),
    linear-gradient(-45deg, rgba(99,69,237,0.09) 1px, transparent 1px),
    radial-gradient(rgba(244,114,182,0.18) 2px, transparent 2.8px);
  background-size: 64px 64px, 64px 64px, 64px 64px;
  background-position: 0 0, 32px 0, 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 78% 70% at 50% 30%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 78% 70% at 50% 30%, #000 15%, transparent 72%);
}
.hero--cases::after {
  top: -140px;
  right: -160px;
  width: 600px;
  height: 600px;
  background:
    radial-gradient(circle at 25% 35%, rgba(99,69,237,0.16) 0%, transparent 38%),
    radial-gradient(circle at 65% 70%, rgba(244,114,182,0.12) 0%, transparent 36%),
    radial-gradient(circle at 80% 20%, rgba(56,189,248,0.10) 0%, transparent 32%);
  border-radius: 50%;
  animation: drift 18s ease-in-out infinite alternate;
}

/* Resources: flowing horizontal waves + fine grid */
.hero--resources {
  background:
    radial-gradient(800px 420px at 60% -8%, rgba(56,189,248,0.09), transparent 52%),
    radial-gradient(500px 300px at 15% 15%, rgba(99,69,237,0.07), transparent 48%),
    var(--bg-primary);
}
.hero--resources::before {
  background-image:
    repeating-linear-gradient(0deg, transparent 0px, transparent 36px, rgba(99,69,237,0.08) 36px, rgba(99,69,237,0.08) 37px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 36px, rgba(56,189,248,0.06) 36px, rgba(56,189,248,0.06) 37px),
    linear-gradient(180deg, rgba(99,69,237,0.10) 0%, transparent 35%);
  background-size: 37px 37px, 37px 37px, 100% 100%;
  -webkit-mask-image: radial-gradient(ellipse 82% 78% at 50% 20%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 82% 78% at 50% 20%, #000 10%, transparent 70%);
}
.hero--resources::after {
  top: -120px;
  right: -140px;
  width: 500px;
  height: 500px;
  background:
    radial-gradient(circle at 40% 40%, rgba(56,189,248,0.16) 0%, transparent 48%),
    radial-gradient(circle at 70% 65%, rgba(99,69,237,0.12) 0%, transparent 42%);
  border-radius: 50%;
  animation: drift 15s ease-in-out infinite alternate-reverse;
}

/* Company: organic warm blobs + human-centered glow */
.hero--company {
  background:
    radial-gradient(700px 450px at 30% 0%, rgba(167,139,250,0.10), transparent 50%),
    radial-gradient(500px 350px at 75% 5%, rgba(251,191,36,0.06), transparent 48%),
    radial-gradient(400px 300px at 50% 30%, rgba(244,114,182,0.06), transparent 45%),
    var(--bg-primary);
}
.hero--company::before {
  background-image:
    radial-gradient(ellipse 420px 320px at 20% 60%, rgba(167,139,250,0.12), transparent 60%),
    radial-gradient(ellipse 360px 280px at 80% 30%, rgba(244,114,182,0.09), transparent 55%),
    radial-gradient(ellipse 300px 240px at 55% 80%, rgba(56,189,248,0.08), transparent 50%),
    radial-gradient(rgba(99,69,237,0.12) 1px, transparent 1.5px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 88% 82% at 50% 40%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 88% 82% at 50% 40%, #000 20%, transparent 80%);
}
.hero--company::after {
  top: -180px;
  right: -120px;
  width: 580px;
  height: 580px;
  background:
    radial-gradient(circle at 45% 45%, rgba(167,139,250,0.18) 0%, transparent 45%),
    radial-gradient(circle at 65% 30%, rgba(251,191,36,0.10) 0%, transparent 38%);
  border-radius: 42% 58% 55% 45% / 55% 42% 58% 45%;
  animation: drift 20s ease-in-out infinite alternate;
}

/* ===== End per-page hero textures ===== */

.hero-content { position: relative; z-index: 1; text-align: center; max-width: 800px; margin: 0 auto; }

/* Floating geometric accents */
.hero-content::before,
.hero-content::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
.hero-content::before {
  width: 74px;
  height: 74px;
  left: -8%;
  top: -14%;
  border: 2px solid rgba(99,69,237,0.28);
  box-shadow: inset 0 0 0 6px rgba(99,69,237,0.05);
  animation: floatY 7s ease-in-out infinite;
}
.hero-content::after {
  width: 14px;
  height: 14px;
  right: -6%;
  bottom: 8%;
  background: var(--brand-gradient);
  box-shadow: 0 6px 18px rgba(99,69,237,0.45);
  animation: floatY 5.5s ease-in-out 0.8s infinite;
}

/* Per-page hero-content::before animation overrides */
.hero--home .hero-content::before { animation: floatY 7s ease-in-out infinite; }
.hero--product .hero-content::before { animation: orbitPulse 9s cubic-bezier(0.45,0.05,0.55,0.95) infinite; }
.hero--solutions .hero-content::before { animation: radiate 10s ease-in-out infinite; }
.hero--pricing .hero-content::before { animation: breathe 6s ease-in-out infinite; }
.hero--cases .hero-content::before { animation: driftDiag 11s ease-in-out infinite; }
.hero--resources .hero-content::before { animation: flipFloat 8s ease-in-out infinite; }
.hero--company .hero-content::before { animation: morphBlob 14s ease-in-out infinite; }

.hero-title { margin-bottom: 20px; }
.hero-title .highlight {
  color: var(--brand-primary);
  position: relative;
  white-space: nowrap;
}
.hero-title .highlight::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.30em;
  background: linear-gradient(90deg, rgba(99,69,237,0.16), rgba(139,114,245,0.20));
  border-radius: 4px;
  z-index: -1;
}
.hero-subtitle { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 40px; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-46px, 40px) scale(1.08); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* Home: gentle vertical bob (signature) */
/* floatY defined above */

/* Product: orbital rotation with scale pulse — layered architecture */
@keyframes orbitPulse {
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  25%  { transform: translateY(-8px) rotate(45deg) scale(1.06); }
  50%  { transform: translateY(-4px) rotate(90deg) scale(1); }
  75%  { transform: translateY(-10px) rotate(135deg) scale(1.04); }
  100% { transform: translateY(0) rotate(180deg) scale(1); }
}

/* Solutions: radial expansion/contraction — radiating scenarios */
@keyframes radiate {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  30%  { transform: scale(1.15) rotate(8deg); opacity: 0.7; }
  60%  { transform: scale(0.92) rotate(-4deg); opacity: 1; }
  80%  { transform: scale(1.08) rotate(3deg); opacity: 0.85; }
}

/* Pricing: calm breathing scale — stability & trust */
@keyframes breathe {
  0%, 100% { transform: scale(1); border-color: rgba(99,69,237,0.28); }
  50%  { transform: scale(1.12); border-color: rgba(99,69,237,0.18); }
}

/* Cases: diagonal constellation drift — connecting stories */
@keyframes driftDiag {
  0%   { transform: translate(0, 0) rotate(0deg); }
  20%  { transform: translate(6px, -10px) rotate(12deg); }
  40%  { transform: translate(-4px, -6px) rotate(-6deg); }
  60%  { transform: translate(8px, -12px) rotate(18deg); }
  80%  { transform: translate(-2px, -4px) rotate(-3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Resources: 3D perspective tilt — pages/documents */
@keyframes flipFloat {
  0%, 100% { transform: translateY(0) perspective(200px) rotateX(0deg) rotateY(0deg); }
  25%  { transform: translateY(-6px) perspective(200px) rotateX(8deg) rotateY(-4deg); }
  50%  { transform: translateY(-12px) perspective(200px) rotateX(0deg) rotateY(6deg); }
  75%  { transform: translateY(-4px) perspective(200px) rotateX(-6deg) rotateY(-2deg); }
}

/* Company: organic morphing — human warmth */
@keyframes morphBlob {
  0%, 100% { border-radius: 50%; transform: translate(0, 0) scale(1); }
  20%  { border-radius: 42% 58% 55% 45% / 55% 42% 58% 45%; transform: translate(3px, -6px) scale(1.04); }
  40%  { border-radius: 55% 45% 42% 58% / 48% 55% 45% 52%; transform: translate(-2px, -10px) scale(0.97); }
  60%  { border-radius: 48% 52% 58% 42% / 42% 58% 52% 48%; transform: translate(4px, -4px) scale(1.06); }
  80%  { border-radius: 58% 42% 45% 55% / 52% 48% 42% 58%; transform: translate(-3px, -8px) scale(1.02); }
}

/* --- Stats --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-item { text-align: center; padding: 32px 16px; position: relative; }
.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, transparent, rgba(139,114,245,0.4), transparent);
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(180deg, #C9B8FF 0%, #8B72F5 58%, #6345ED 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(139,114,245,0.35));
}
.stat-label { font-size: 0.95rem; color: var(--text-muted); margin-top: 8px; }
.stat-prefix { font-size: 0.95rem; margin-right: 4px; }
.section--dark .stat-label { color: rgba(255,255,255,0.62); }

/* --- Tabs --- */
.tabs { margin-bottom: 40px; }
.tabs-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}
.tab-btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid transparent;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--brand-primary); border-color: var(--border-light); transform: translateY(-1px); }
.tab-btn.active {
  color: #fff;
  background: var(--brand-gradient);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(99,69,237,0.32), inset 0 1px 0 rgba(255,255,255,0.25);
}

.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }

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

/* --- Pricing --- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: stretch; }
/* Two-plan rows (team / enterprise groups), centered and capped */
.pricing-grid--2col { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin: 0 auto; }

.pricing-card {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% -20%, rgba(139,114,245,0.07), transparent 55%),
    var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}
.pricing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-glow); border-color: rgba(99,69,237,0.2); }
.pricing-card.featured {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(99,69,237,0.08);
  transform: scale(1.03);
}
.pricing-card.featured:hover { transform: scale(1.03) translateY(-5px); }
/* 卡片等高：按钮统一沉底并水平居中，保证各套餐卡片框架高度一致、按钮垂直对齐 */
.pricing-card > .btn { margin-top: auto; align-self: center; width: 100%; }

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-gradient);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99,69,237,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
}

.pricing-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--brand-primary); margin: 16px 0; letter-spacing: -0.02em; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-features { text-align: left; margin: 24px 0; }
.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.pricing-features li::before { content: '✓'; color: var(--brand-primary); font-weight: 700; }
.pricing-features li.no-check::before { content: none; }

/* --- Module Select (pick-one-of-N) --- */
.module-select {
  text-align: left;
  margin: 24px 0 4px;
  padding: 16px 18px;
  border: 1.5px dashed var(--brand-primary);
  background: rgba(99, 69, 237, 0.05);
  border-radius: 12px;
}
.module-select-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 6px;
}
.module-select-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.module-select-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.module-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-primary);
  padding: 8px 12px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(99,69,237,0.09), rgba(139,114,245,0.05));
  border: 1px solid rgba(99,69,237,0.14);
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .module-select-options { grid-template-columns: 1fr; }
}

/* --- Filter --- */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  justify-content: center;
}
.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid transparent;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--border-light); color: var(--brand-primary); transform: translateY(-1px); }
.filter-btn.active {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,69,237,0.32), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* --- Forms --- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
  background: #fff;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(99,69,237,0.1);
}
.form-textarea { min-height: 120px; resize: vertical; }

/* --- Footer --- */
.footer {
  background:
    radial-gradient(760px 380px at 12% 0%, rgba(99,69,237,0.22), transparent 60%),
    radial-gradient(640px 320px at 92% 100%, rgba(56,189,248,0.10), transparent 60%),
    var(--bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--texture-dots-light);
  background-size: 30px 30px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  pointer-events: none;
}
.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,114,245,0.55), transparent);
  pointer-events: none;
}
.footer > .container { position: relative; z-index: 1; }

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

.footer-brand p { color: rgba(255,255,255,0.6); margin-top: 16px; font-size: 0.9rem; line-height: 1.8; }
.footer-brand img { height: 32px; }

.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(255,255,255,0.6); font-size: 0.9rem; padding: 6px 0; }
.footer-col a:hover { color: var(--brand-primary-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer-qrcodes { display: flex; gap: 16px; margin-top: 16px; align-items: flex-start; flex-wrap: wrap; }
.footer-qrcode { margin-top: 0; flex-shrink: 0; }
.footer-qrcode img { width: 100px; height: 100px; border-radius: 8px; }
.footer-qrcode p { font-size: 0.8rem; margin-top: 8px; color: rgba(255,255,255,0.5); }

/* --- CTA Section --- */
.cta-section {
  background:
    radial-gradient(circle at 30% 50%, rgba(255,255,255,0.12) 0%, transparent 50%),
    var(--brand-gradient);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--texture-dots-light);
  background-size: 22px 22px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 75% 90% at 50% 50%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 90% at 50% 50%, #000 25%, transparent 78%);
  pointer-events: none;
}
/* Slow ambient sheen band */
.cta-section::after {
  content: '';
  position: absolute;
  top: -40%;
  bottom: -40%;
  width: 34%;
  left: -45%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: skewX(-18deg);
  animation: ctaSheen 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ctaSheen {
  0%, 55% { left: -45%; }
  85%, 100% { left: 115%; }
}
.cta-section h2 { color: #fff; margin-bottom: 16px; position: relative; z-index: 1; }
.cta-section p { color: rgba(255,255,255,0.85); margin-bottom: 32px; position: relative; z-index: 1; }
.cta-actions { display: flex; gap: 16px; justify-content: center; position: relative; z-index: 1; flex-wrap: wrap; }

/* --- Timeline --- */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(99,69,237,0.45), rgba(139,114,245,0.18) 70%, transparent);
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-gradient);
  border: 3px solid rgba(99,69,237,0.18);
  box-shadow: 0 0 0 4px rgba(99,69,237,0.06), 0 2px 8px rgba(99,69,237,0.4);
}
.timeline-year { font-family: var(--font-display); font-weight: 700; color: var(--brand-primary); margin-bottom: 4px; letter-spacing: 0.02em; }

/* --- Table --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 20px; text-align: left; font-size: 0.9rem; }
th {
  background: linear-gradient(180deg, #F6F4FF, #EFEBFE);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
td { border-top: 1px solid var(--border-light); color: var(--text-secondary); }
tr:hover td { background: rgba(99,69,237,0.03); }

/* --- Badge / Tag --- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(99,69,237,0.10), rgba(139,114,245,0.06));
  border: 1px solid rgba(99,69,237,0.12);
  color: var(--brand-primary);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gentle stagger for grid children */
.grid-2 > .fade-in:nth-child(2),
.grid-3 > .fade-in:nth-child(2),
.grid-4 > .fade-in:nth-child(2) { transition-delay: 0.07s; }
.grid-2 > .fade-in:nth-child(3),
.grid-3 > .fade-in:nth-child(3),
.grid-4 > .fade-in:nth-child(3) { transition-delay: 0.14s; }
.grid-3 > .fade-in:nth-child(n+4),
.grid-4 > .fade-in:nth-child(n+4) { transition-delay: 0.10s; }
.grid-4 > .fade-in:nth-child(4) { transition-delay: 0.21s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; }
}

/* --- Responsive: iPad / Tablet (768px - 1199px) --- */
@media (max-width: 1199px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* iPad: show hamburger, hide desktop nav */
  .navbar-nav { display: none; }
  .navbar-actions .lang-switch { display: none; }
  .navbar-actions .btn-secondary { display: none; }
  .navbar-toggle { display: flex; }

  /* Signup: stack panel above card */
  .signup-layout { grid-template-columns: 1fr; max-width: 640px; gap: 28px; }
  .signup-panel { padding: 38px 34px 32px; }
}

/* --- Responsive: Mobile (<768px) --- */
@media (max-width: 767px) {
  :root {
    --section-spacing: 64px;
    --container-padding: 16px;
  }

  .navbar-nav { display: none; }
  .navbar-actions .btn { display: none; }
  .navbar-actions .lang-switch { display: none; }
  .navbar-toggle { display: flex; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pricing-grid,
  .pricing-grid--2col { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .hero { padding: 120px 0 60px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 320px; height: 52px; }

  /* Menu columns in two columns to save vertical space; brand spans full row */
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  .tabs-nav { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
  .tab-btn { white-space: nowrap; }

  /* Cases page filter tabs: horizontal single row with swipe scroll */
  .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .filter-bar::-webkit-scrollbar { height: 4px; }
  .filter-bar::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
  .filter-btn { flex: 0 0 auto; white-space: nowrap; }

  /* Standardize all buttons on mobile */
  .btn { height: 48px; padding: 0 24px; }
  .btn-lg { height: 52px; padding: 0 32px; }
  .btn-sm { height: 44px; padding: 0 20px; }
  .cta-actions { flex-direction: column; align-items: center; }
  .cta-actions .btn { width: 100%; max-width: 320px; }

  /* Signup page mobile: form first (top), info panel below; form fills first screen */
  /* Note: `body` prefix raises specificity so these rules win over base signup styles defined later in this file */
  body .signup-section { padding: 96px 0 var(--section-spacing); }
  body .signup-layout { grid-template-columns: 1fr; gap: 20px; }
  body .signup-card { order: -1; padding: 24px 18px 20px; }
  body .signup-panel { order: 1; padding: 30px 24px 26px; }
  body .signup-card-head { margin-bottom: 20px; gap: 10px; }
  body .signup-card-head h2 { font-size: 1.3rem; }
  body .form-group { margin-bottom: 14px; }
  body .form-input, body .form-select, body .form-textarea { padding: 11px 14px; }
  body .form-label { font-size: 0.85rem; margin-bottom: 6px; }
  body .pwd-hint { font-size: 0.75rem; }
  body .signup-steps { margin-bottom: 20px; }
  body .signup-steps li { font-size: 0.72rem; }
  body .signup-steps li:not(:first-child)::before { left: calc(-50% + 20px); right: calc(50% + 20px); }
  body .form-row { grid-template-columns: 1fr; gap: 0; }
  body .signup-summary { grid-template-columns: 1fr; gap: 2px; padding: 18px 20px; }
  body .signup-summary dt { margin-top: 8px; }
  body .signup-summary dd { text-align: left; }

  /* Company page join-us email prompt: let long text wrap inside the box */
  #careers .btn-secondary {
    height: auto;
    min-height: 48px;
    padding: 12px 22px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.6;
  }
}

/* --- Signup / Onboarding --- */
.signup-section {
  padding: 148px 0 var(--section-spacing);
  position: relative;
  overflow: hidden;
}
.signup-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--texture-grid);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 82% 62% at 50% 10%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 82% 62% at 50% 10%, #000 15%, transparent 72%);
  pointer-events: none;
}

.signup-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 40px;
  align-items: stretch;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Left brand value panel */
.signup-panel {
  background:
    radial-gradient(640px 360px at 10% -8%, rgba(139,114,245,0.38), transparent 62%),
    radial-gradient(520px 320px at 98% 106%, rgba(56,189,248,0.16), transparent 60%),
    var(--bg-dark);
  color: var(--text-white);
  border: 1px solid rgba(139,114,245,0.28);
  border-radius: var(--radius-lg);
  padding: 48px 44px 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.signup-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--texture-dots-light);
  background-size: 26px 26px;
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(ellipse 90% 68% at 28% 8%, #000 18%, transparent 74%);
  mask-image: radial-gradient(ellipse 90% 68% at 28% 8%, #000 18%, transparent 74%);
  pointer-events: none;
}
.signup-panel::after {
  content: '';
  position: absolute;
  bottom: -170px;
  right: -130px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,69,237,0.34) 0%, rgba(139,114,245,0.12) 46%, transparent 70%);
  animation: drift 12s ease-in-out infinite alternate;
  pointer-events: none;
}
.signup-panel > * { position: relative; z-index: 1; }

.signup-panel .section-label {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: #C9B8FF;
}
.signup-panel h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.55rem);
  color: #fff;
  margin: 20px 0 14px;
}
.signup-panel h1 .hl {
  background: linear-gradient(120deg, #C9B8FF 0%, #8B72F5 55%, #7DD3FC 115%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.signup-panel-desc { color: rgba(255,255,255,0.72); font-size: 1rem; line-height: 1.8; }

.signup-benefits { margin: 28px 0 4px; display: grid; gap: 12px; }
.signup-benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.signup-benefits li:hover {
  transform: translateX(5px);
  background: rgba(255,255,255,0.1);
  border-color: rgba(139,114,245,0.5);
}
.signup-benefits .b-ico {
  width: 30px;
  height: 30px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--brand-gradient);
  box-shadow: 0 4px 12px rgba(99,69,237,0.45), inset 0 1px 0 rgba(255,255,255,0.3);
}
.signup-benefits .b-ico svg { width: 15px; height: 15px; }

.signup-flow { margin-top: 26px; }
.signup-flow li { display: flex; gap: 14px; padding-bottom: 20px; }
.signup-flow li:last-child { padding-bottom: 0; }
.signup-flow .f-num {
  width: 32px;
  height: 32px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: #C9B8FF;
  background: rgba(99,69,237,0.2);
  border: 1px solid rgba(139,114,245,0.5);
  position: relative;
  z-index: 1;
}
.signup-flow li:not(:last-child) .f-num::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 20px;
  background: linear-gradient(180deg, rgba(139,114,245,0.55), rgba(139,114,245,0.12));
}
.signup-flow strong { display: block; color: #fff; font-size: 0.95rem; font-weight: 600; line-height: 1.5; }
.signup-flow .f-desc { font-size: 0.82rem; color: rgba(255,255,255,0.55); }

.signup-quote {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.68);
}
.signup-quote strong {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
}

/* Right wizard card */
.signup-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 44px 44px 34px;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 96px;
}
.signup-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(139,114,245,0.7), transparent);
  pointer-events: none;
}

.signup-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.signup-card-head h2 { font-size: 1.55rem; }
.signup-sub { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.signup-login { font-size: 0.88rem; color: var(--text-muted); padding-top: 6px; }
.signup-login a { color: var(--brand-primary); font-weight: 600; }
.signup-login a:hover { text-decoration: underline; }

/* Step progress indicator */
.signup-steps { display: flex; margin-bottom: 32px; }
.signup-steps li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
}
.signup-steps li:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(-50% + 24px);
  right: calc(50% + 24px);
  height: 2px;
  border-radius: 1px;
  background: var(--border-light);
  transition: background 0.35s ease;
}
.signup-steps li.active::before,
.signup-steps li.done::before { background: var(--brand-primary); }
.step-dot {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border-light);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}
.signup-steps li.active { color: var(--brand-primary); }
.signup-steps li.active .step-dot {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(99,69,237,0.4), 0 0 0 5px rgba(99,69,237,0.1);
  transform: scale(1.1);
}
.signup-steps li.done { color: var(--brand-primary); }
.signup-steps li.done .step-dot {
  background: #fff;
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Wizard panels */
.signup-step { border: 0; display: none; }
.signup-step.active { display: block; animation: fadeIn 0.35s ease; }
.signup-step > .signup-next { width: 100%; margin-top: 8px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label i { font-style: normal; color: #E5484D; }
.form-label .optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Validation states */
.form-group.invalid .form-input,
.form-group.invalid .form-select {
  border-color: #E5484D;
  box-shadow: 0 0 0 3px rgba(229,72,77,0.12);
}
.form-group.valid .form-input,
.form-group.valid .form-select {
  border-color: #30A46C;
}
.form-error { display: none; font-size: 0.82rem; color: #E5484D; margin-top: 6px; }
.form-group.invalid .form-error { display: block; animation: fadeIn 0.25s ease; }
.form-error.show { display: block; animation: fadeIn 0.25s ease; }

/* Captcha row: code input + send button */
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .form-input { flex: 1; min-width: 0; }
.captcha-row .captcha-send { flex-shrink: 0; white-space: nowrap; padding: 0.65rem 1.1rem; font-size: 0.9rem; }
.captcha-row .captcha-send:disabled { opacity: 0.6; cursor: not-allowed; }
@media (max-width: 480px) {
  .captcha-row .captcha-send { padding: 0.65rem 0.8rem; font-size: 0.82rem; }
}

/* Password visibility toggle */
.form-input-wrap { position: relative; }
.form-input-wrap .form-input { padding-right: 50px; }
.pwd-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
}
.pwd-toggle:hover { color: var(--brand-primary); background: rgba(99,69,237,0.07); }
.pwd-toggle svg { width: 19px; height: 19px; }
.pwd-toggle .eye-off { display: none; }
.pwd-toggle.showing .eye-on { display: none; }
.pwd-toggle.showing .eye-off { display: block; }

/* Password strength meter */
.pwd-meter { display: flex; gap: 6px; margin-top: 10px; }
.pwd-meter span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border-light);
  transition: background 0.3s ease;
}
.pwd-meter[data-score="1"] span:nth-child(1) { background: #E5484D; }
.pwd-meter[data-score="2"] span:nth-child(-n+2) { background: #F59E0B; }
.pwd-meter[data-score="3"] span { background: #30A46C; }
.pwd-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; transition: color 0.3s ease; }
.pwd-hint[data-level="1"] { color: #E5484D; }
.pwd-hint[data-level="2"] { color: #B45309; }
.pwd-hint[data-level="3"] { color: #30A46C; }

/* Step nav buttons */
.signup-nav { display: flex; gap: 12px; margin-top: 8px; }
.signup-nav .btn { flex: 1; }
.btn-plain {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.btn-plain:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  background: rgba(99,69,237,0.05);
}

/* Confirmation summary */
.signup-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin-bottom: 24px;
}
.signup-summary dt { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.signup-summary dd {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  word-break: break-all;
}

/* Terms agreement */
.signup-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 4px;
}
.signup-agree input {
  margin-top: 5px;
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--brand-primary);
  cursor: pointer;
}
.signup-agree .terms { font-style: normal; color: var(--brand-primary); font-weight: 600; }
.signup-agree.shake { animation: shakeX 0.4s ease; }
.signup-agree.shake input { outline: 2px solid rgba(229,72,77,0.5); outline-offset: 1px; border-radius: 2px; }
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Success state */
.signup-success { text-align: center; padding: 20px 0 8px; animation: fadeIn 0.4s ease; }
.success-mark { width: 88px; height: 88px; margin: 0 auto 24px; display: block; }
.sm-circle {
  stroke-dasharray: 252;
  stroke-dashoffset: 252;
  animation: drawStroke 0.7s ease forwards;
}
.sm-check {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawStroke 0.45s ease 0.55s forwards;
}
@keyframes drawStroke { to { stroke-dashoffset: 0; } }
.signup-success h3 { font-size: 1.5rem; margin-bottom: 10px; }
.signup-success > p { margin-bottom: 28px; }
.signup-success .countdown {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-primary);
  font-size: 1.1em;
}

.signup-alt {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}
.signup-alt a { color: var(--brand-primary); font-weight: 600; }
.signup-alt a:hover { text-decoration: underline; }

/* --- Utility --- */
.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; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* --- Button element normalization (modal trigger buttons) --- */
/* :where() keeps specificity at 0 so variant classes (.btn-primary etc.) still win */
:where(button.btn) {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

/* --- Contact Modal (popup lead form, avoids page jump) --- */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 12, 48, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.contact-modal.open { opacity: 1; pointer-events: auto; }
.contact-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 920px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 44px;
  box-shadow: 0 24px 80px rgba(20, 10, 60, 0.35);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}
.contact-modal.open .contact-modal-dialog { transform: none; }
.contact-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.contact-modal-close:hover { background: rgba(99, 69, 237, 0.12); color: var(--brand-primary); }
.contact-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 36px;
  align-items: start;
}
.contact-modal-info-row { display: flex; gap: 12px; align-items: center; }
.contact-modal-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--brand-gradient-soft);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .contact-modal-grid { grid-template-columns: 1fr; }
  .contact-modal-dialog { padding: 28px 20px; }
}
