/* ==========================================================================
   CardLLM Landing Page — Style Sheet
   Royal Blue: #2942E7 | Dark BG: #0a0a1a | Light BG: #f5f5f7
   ========================================================================== */

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

:root {
  --royal-blue: #2942E7;
  --royal-blue-hover: #1e35c9;
  --royal-blue-light: rgba(41, 66, 231, 0.08);
  --royal-blue-glow: rgba(41, 66, 231, 0.3);
  --dark-bg: #0a0a1a;
  --dark-surface: #141428;
  --dark-border: rgba(255, 255, 255, 0.08);
  --light-bg: #f5f5f7;
  --white: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-light: rgba(255, 255, 255, 0.92);
  --text-light-secondary: rgba(255, 255, 255, 0.6);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow-phone: 0 24px 80px rgba(0, 0, 0, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 100px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--dark-border);
  transition: background var(--transition);
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.nav-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--royal-blue);
  color: white;
  font-weight: 800;
  font-size: 16px;
  border-radius: 8px;
}

.nav-logo-text {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-light);
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light-secondary);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text-light);
}

/* ---------- Language Toggle ---------- */
.lang-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 0;
}

.lang-btn {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light-secondary);
  background: none;
  border: none;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.lang-btn:hover {
  color: var(--text-light);
}

.lang-btn.active {
  background: var(--royal-blue);
  color: white;
}

.lang-toggle-mobile {
  display: none;
}

.nav-right-mobile {
  display: none;
  align-items: center;
  gap: 12px;
}

/* Language visibility — controlled by body class */
body.is-en .lang-zh { display: none !important; }
body.is-zh .lang-en { display: none !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

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

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 16px 24px 24px;
  gap: 16px;
  background: rgba(10, 10, 26, 0.95);
  border-top: 1px solid var(--dark-border);
}

.nav-mobile a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-light-secondary);
  padding: 8px 0;
}

.nav-mobile a:hover {
  color: var(--text-light);
}

.nav-mobile .nav-cta {
  display: inline-block;
  background: var(--royal-blue);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  text-align: center;
  font-weight: 600;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
  background: var(--dark-bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(41, 66, 231, 0.15), transparent 70%);
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(41, 66, 231, 0.08), transparent 70%);
  filter: blur(80px);
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 80px;
  z-index: 1;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  color: var(--text-light);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-accent {
  background: linear-gradient(135deg, var(--royal-blue), #5b6ef7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-light-secondary);
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-logo-group {
  margin-bottom: 24px;
}

.hero-app-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(41, 66, 231, 0.3);
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  width: fit-content;
}

.hero-platform-badge svg {
  opacity: 0.8;
}

.hero-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light-secondary);
  letter-spacing: 0.02em;
}

.hero-phone {
  flex-shrink: 0;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-light-secondary);
  animation: bounce 2s infinite;
  opacity: 0.5;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Phone Frame ---------- */
.phone-frame {
  position: relative;
  width: 280px;
  border-radius: 40px;
  background: #1a1a2e;
  padding: 12px;
  box-shadow: var(--shadow-phone),
              inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.phone-frame-sm {
  width: 260px;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #1a1a2e;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  border-radius: 28px;
  display: block;
}

/* ---------- Section Base ---------- */
.section {
  padding: 100px 0;
}

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

.section-white {
  background: var(--white);
}

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

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--royal-blue);
  margin-bottom: 12px;
}

.section-eyebrow-light {
  color: #7b8cff;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-title-light {
  color: var(--text-light);
}

.section-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.section-desc-light {
  color: var(--text-light-secondary);
}

/* ---------- Pain Points ---------- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pain-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform var(--transition), box-shadow var(--transition);
}

.pain-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pain-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--royal-blue-light);
  border-radius: var(--radius-md);
  color: var(--royal-blue);
  margin-bottom: 20px;
}

.pain-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.pain-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ---------- Features ---------- */
.feature-row {
  display: flex;
  align-items: center;
  gap: 80px;
  margin-bottom: 100px;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row-reverse {
  flex-direction: row-reverse;
}

.feature-phone {
  flex-shrink: 0;
}

.feature-content {
  flex: 1;
  min-width: 0;
}

.feature-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--royal-blue);
  background: var(--royal-blue-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.feature-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.feature-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.feature-list li::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background: var(--royal-blue);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- How It Works ---------- */
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}

.step-card {
  flex: 1;
  max-width: 220px;
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--royal-blue);
  color: white;
  font-size: 16px;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 16px;
}

.step-phone-mini {
  width: 140px;
  margin: 0 auto 16px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(0, 0, 0, 0.06);
}

.step-phone-mini img {
  width: 100%;
  display: block;
}

.step-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.step-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.step-arrow {
  display: flex;
  align-items: center;
  padding-top: 80px;
  color: var(--text-secondary);
  opacity: 0.4;
}

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

.privacy-item {
  text-align: center;
  padding: 32px 20px;
  background: var(--dark-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--dark-border);
  transition: transform var(--transition);
}

.privacy-item:hover {
  transform: translateY(-4px);
}

.privacy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(41, 66, 231, 0.15);
  border-radius: var(--radius-md);
  color: #7b8cff;
  margin-bottom: 16px;
}

.privacy-item h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 8px;
}

.privacy-item p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-light-secondary);
}

/* ---------- CTA Section ---------- */
.section-cta {
  background: linear-gradient(135deg, var(--royal-blue), #1e35c9);
  padding: 100px 0;
  text-align: center;
}

.cta-content {
  max-width: 560px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  color: white;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-desc {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 36px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.cta-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--royal-blue);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 16px;
}

.btn-primary:hover {
  background: var(--royal-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--royal-blue-glow);
}

.btn-white {
  background: white;
  color: var(--text-primary);
  padding: 16px 32px;
  border-radius: var(--radius-pill);
  font-size: 16px;
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
}

.btn-icon {
  flex-shrink: 0;
}

.btn-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.btn-text-sm {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.7;
}

.btn-text-lg {
  font-size: 18px;
  font-weight: 700;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--dark-bg);
  padding: 64px 0 32px;
  border-top: 1px solid var(--dark-border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 280px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-light-secondary);
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light-secondary);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-light-secondary);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--text-light);
}

.footer-bottom {
  border-top: 1px solid var(--dark-border);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-light-secondary);
  opacity: 0.6;
}

/* ---------- Animations (scroll reveal) ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-row {
    gap: 48px;
  }

  .privacy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-right-mobile {
    display: flex;
  }

  .lang-toggle-mobile {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-mobile.active {
    display: flex;
  }

  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }

  .hero-content {
    flex-direction: column;
    gap: 48px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    align-items: center;
  }

  .hero-phone {
    display: flex;
    justify-content: center;
  }

  .phone-frame {
    width: 240px;
  }

  .phone-frame-sm {
    width: 220px;
  }

  .hero-scroll-hint {
    display: none;
  }

  .section {
    padding: 72px 0;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .pain-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-row,
  .feature-row-reverse {
    flex-direction: column;
    gap: 36px;
    margin-bottom: 72px;
    text-align: center;
  }

  .feature-phone {
    display: flex;
    justify-content: center;
  }

  .feature-list {
    align-items: center;
  }

  .steps-grid {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .step-arrow {
    display: none;
  }

  .step-card {
    max-width: 300px;
  }

  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 36px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 36px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 36px;
  }

  .phone-frame {
    width: 220px;
  }

  .phone-frame-sm {
    width: 200px;
  }

  .pain-card {
    padding: 24px;
  }

  .step-phone-mini {
    width: 120px;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 16px;
  }
}
