/* ============================================================
   China LLM Map — Frontier LLM Notes
   Custom Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-deep: #0a0e17;
  --bg-slate: #111827;
  --bg-card: #161b25;
  --bg-card-hover: #1c2433;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.10);
  --text-primary: #e8eaed;
  --text-secondary: #9aa0ab;
  --text-muted: #6b7280;
  --accent: #60a5fa;
  --accent-glow: rgba(96, 165, 250, 0.15);
  --accent-strong: #3b82f6;
  --glass-bg: rgba(22, 27, 37, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;
  --gradient-hero: linear-gradient(160deg, #0a0e17 0%, #111c2e 50%, #0f172a 100%);
  --navbar-blur-bg: rgba(10, 14, 23, 0.82);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(96, 165, 250, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme overrides */
[data-bs-theme="light"] {
  --bg-deep: #f8fafc;
  --bg-slate: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.10);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.08);
  --accent-strong: #1d4ed8;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(0, 0, 0, 0.08);
  --gradient-hero: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
  --navbar-blur-bg: rgba(248, 250, 252, 0.82);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.05);
}

/* ---------- Base & Typography ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--accent-strong);
}

.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; }

/* ---------- Navbar ---------- */
#mainNavbar {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  transition: all var(--transition-smooth);
  background: transparent;
  z-index: 1030;
}

#mainNavbar.navbar-scrolled {
  background: var(--navbar-blur-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

#mainNavbar .navbar-brand {
  color: var(--text-primary);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

#mainNavbar .nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

#mainNavbar .nav-link:hover,
#mainNavbar .nav-link:focus-visible {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Language switch */
.lang-switch .btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  letter-spacing: 0.02em;
}

.lang-switch .btn.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Theme toggle */
#themeToggle {
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* ---------- Hero Section ---------- */
.hero-section {
  position: relative;
  padding: 140px 0 100px;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
}

.hero-disclosure {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Badge styles */
.badge-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.78rem;
  padding: 0.35em 0.7em;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---------- Dashboard Card (Hero) ---------- */
.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  position: relative;
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dashboard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.dashboard-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-card-body {
  font-size: 0.9rem;
}

/* Model pills */
.model-pill {
  display: inline-block;
  padding: 0.25em 0.7em;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 20px;
  background: rgba(96, 165, 250, 0.12);
  color: var(--accent);
  border: 1px solid rgba(96, 165, 250, 0.2);
  white-space: nowrap;
}

.model-pill-more {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px dashed var(--border-medium);
}

/* Mini comparison list */
.mini-compact-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mini-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

/* ---------- Sections ---------- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-slate);
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 780px;
  line-height: 1.7;
}

/* ---------- Clarity Strip ---------- */
.clarity-strip {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-slate);
}

.clarity-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.clarity-card:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.clarity-icon {
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}

/* ---------- Model Cards ---------- */
.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  height: 100%;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.model-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), var(--shadow-glow);
  border-color: var(--border-medium);
}

.model-card-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.model-card-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.model-card-models {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.model-card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

.model-card-features {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.model-card-features li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-left: 1.2rem;
  position: relative;
}

.model-card-features li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}

.model-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

/* ---------- Buttons ---------- */
.btn-outline-accent {
  color: var(--accent);
  border: 1px solid var(--accent);
  opacity: 0.75;
  background: transparent;
  transition: all var(--transition-smooth);
}

.btn-outline-accent:hover {
  opacity: 1;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.btn-primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  font-weight: 600;
  transition: all var(--transition-smooth);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* light mode primary button override for better contrast */
[data-bs-theme="light"] .btn-primary {
  color: #fff;
}

[data-bs-theme="light"] .btn-primary:hover {
  color: #fff;
}

/* ---------- Capability Cards ---------- */
.capability-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: 100%;
  transition: all var(--transition-fast);
}

.capability-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-card);
}

.cap-icon {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.capability-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

/* ---------- Pricing Table ---------- */
.pricing-table-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-card);
  margin-top: 2rem;
}

.pricing-table {
  margin-bottom: 0;
  font-size: 0.9rem;
  border-collapse: collapse;
}

.pricing-table thead th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1rem 0.75rem;
  border-bottom: 2px solid var(--border-medium);
  white-space: nowrap;
}

.pricing-table tbody td {
  padding: 0.85rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.pricing-table tbody tr:last-child td {
  border-bottom: none;
}

.pricing-table tbody tr {
  transition: background var(--transition-fast);
}

.pricing-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.table-row-reference {
  background: rgba(255, 255, 255, 0.015);
}

.table-row-reference td {
  color: var(--text-secondary);
}

.pricing-reference-note {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

/* ---------- Why Cards ---------- */
.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  height: 100%;
}

.why-card:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.why-icon {
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
}

/* ---------- Access Card ---------- */
.access-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-card);
}

/* ---------- Model Carousel ---------- */
.model-carousel-wrapper {
  overflow: hidden;
  position: relative;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0;
  /* Fade edges for seamless look */
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.model-carousel-track {
  display: flex;
  gap: 0.85rem;
  width: max-content;
  will-change: transform;
}

.model-carousel-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  cursor: default;
}

.model-carousel-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  background: var(--bg-card-hover);
}

.model-carousel-svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* More models prompt */
.more-models-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.more-models-arrow {
  display: inline-block;
  animation: arrowPulse 1.6s ease-in-out infinite;
  font-size: 1rem;
}

.more-models-dots {
  display: inline-flex;
  gap: 2px;
  opacity: 0.5;
}

.more-models-dots span {
  animation: dotBlink 1.4s ease-in-out infinite;
}

.more-models-dots span:nth-child(2) { animation-delay: 0.2s; }
.more-models-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes arrowPulse {
  0%, 100% { transform: translateX(0); opacity: 0.6; }
  50%      { transform: translateX(4px); opacity: 1; }
}

@keyframes dotBlink {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 1; }
}

/* Model card SVG icon */
.model-icon-svg {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.model-card-icon {
  margin-bottom: 0.75rem;
  line-height: 0;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .model-carousel-track {
    flex-wrap: wrap;
    justify-content: center;
  }
  .model-carousel-wrapper {
    mask-image: none;
    -webkit-mask-image: none;
  }
  .more-models-arrow,
  .more-models-dots span {
    animation: none;
  }
}

/* ---------- Disclosure Section ---------- */
.disclosure-section {
  padding: 40px 0 60px;
}

.disclosure-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.disclosure-icon {
  font-size: 1.4rem;
  color: var(--accent);
  margin-top: 2px;
}

.disclosure-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

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

/* ---------- FAQ Accordion ---------- */
.faq-accordion {
  max-width: 820px;
  margin: 1.5rem auto 0;
}

.faq-accordion .accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm) !important;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.faq-accordion .accordion-button {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: none;
  padding: 1rem 1.25rem;
  transition: all var(--transition-fast);
}

.faq-accordion .accordion-button:not(.collapsed) {
  background: var(--bg-card-hover);
  color: var(--accent);
}

.faq-accordion .accordion-button::after {
  filter: brightness(0) invert(0.7);
}

.faq-accordion .accordion-button:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

.faq-accordion .accordion-body {
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  padding: 0.25rem 1.25rem 1.25rem;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-slate);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 1.5rem;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
  padding: 0.15rem 0;
  display: inline-block;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-divider {
  border-color: var(--border-subtle);
  margin: 1.5rem 0 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 120px 0 60px;
    text-align: center;
  }
  .hero-subtitle {
    max-width: 100%;
  }
  .hero-section .d-flex {
    justify-content: center;
  }
  .section {
    padding: 50px 0;
  }
}

@media (max-width: 767.98px) {
  .pricing-table {
    font-size: 0.78rem;
  }
  .pricing-table thead th,
  .pricing-table tbody td {
    padding: 0.6rem 0.5rem;
  }
  .dashboard-card {
    margin-top: 2rem;
  }
  .access-card {
    padding: 1.25rem;
  }
}

/* ---------- Focus / Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Navbar toggle icon fix for dark mode ---------- */
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(232, 234, 237, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-bs-theme="light"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15, 23, 42, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
