/* ============================================
   词忆 MemQuirk — Landing Page
   Design System: Premium Editorial
   Typography: Playfair Display + Noto Serif SC
   ============================================ */

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

:root {
  /* Colors — Warm editorial palette */
  --ink: #1a1a18;
  --on-primary: #faf8f5;
  --ink-muted: #6b6860;
  --ink-subtle: #8a8680;
  --ink-tertiary: #a8a49e;
  --canvas: #faf8f5;
  --surface-1: #ffffff;
  --surface-2: #f0ece6;
  --hairline: #d8d3cb;
  --hairline-soft: #e8e4dd;
  /* Accent — MemQuirk orange (for AI features) */
  --accent: #e85d26;
  --accent-soft: rgba(232, 93, 38, 0.08);
  --accent-hover: #d14d1a;

  /* Typography — Editorial serif system */
  --font-display: 'Playfair Display', 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-body: 'Source Serif 4', 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing — Generous editorial rhythm */
  --sp-xxs: 4px;
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;
  --sp-section: 120px;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 24px;
  --r-pill: 9999px;

  /* Container */
  --max-w: 1200px;
  --nav-h: 64px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26,26,24,0.04);
  --shadow-md: 0 4px 16px rgba(26,26,24,0.06);
  --shadow-lg: 0 8px 32px rgba(26,26,24,0.08);
  --shadow-xl: 0 16px 48px rgba(26,26,24,0.10);
}

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background: var(--canvas);
  overflow-x: hidden;
}

/* Subtle grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

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

/* --- Typography --- */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5.5vw, 4.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.20;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.30;
  letter-spacing: -0.01em;
}

.subhead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.50;
}

.body-lg {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-muted);
}

.body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
}

.body-sm {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.60;
}

.caption {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.40;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn-text {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.20;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.30;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

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

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--sp-3xl);
}

.section-header .eyebrow {
  margin-bottom: var(--sp-md);
}

.section-header .display-lg {
  margin-bottom: var(--sp-lg);
}

.section-header .body-lg {
  max-width: 560px;
  margin: 0 auto;
}

/* --- Navigation --- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.top-nav.scrolled {
  border-bottom-color: var(--hairline-soft);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.nav-brand span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--ink);
  transition: width 0.25s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  padding: 11px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.20;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--ink);
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #2a2a28;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-1);
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--ink-tertiary);
}

.btn-accent {
  background: var(--accent);
  color: var(--on-primary);
  box-shadow: 0 2px 8px rgba(232, 93, 38, 0.2);
}

.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(232, 93, 38, 0.25);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.lang-toggle:hover {
  background: var(--surface-1);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* --- Cards --- */
.card {
  background: var(--surface-1);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  border: 1px solid var(--hairline-soft);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: var(--hairline);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-xl {
  border-radius: var(--r-2xl);
  padding: var(--sp-xl);
}

/* --- Hero --- */
.hero {
  padding-top: calc(var(--nav-h) + var(--sp-3xl));
  padding-bottom: var(--sp-section);
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(232, 93, 38, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 8px 20px;
  border-radius: var(--r-pill);
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: var(--sp-xl);
  box-shadow: var(--shadow-sm);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero .display-xl {
  margin-bottom: var(--sp-xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero .body-lg {
  max-width: 520px;
  margin: 0 auto var(--sp-2xl);
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.hero-visual {
  margin-top: var(--sp-3xl);
  position: relative;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-app-icon {
  width: 100px;
  height: 100px;
  border-radius: var(--r-xl);
  margin: 0 auto var(--sp-xl);
  box-shadow: var(--shadow-lg);
}

.hero-mockup {
  background: var(--surface-1);
  border-radius: var(--r-2xl);
  border: 1px solid var(--hairline);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--hairline-soft);
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hairline);
}

.mockup-body {
  padding: var(--sp-2xl) var(--sp-xl);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xl);
}

.mockup-word-card {
  text-align: center;
  padding: var(--sp-xl) var(--sp-3xl);
}

.mockup-word {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-xs);
  color: var(--ink);
}

.mockup-phonetic {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--ink-muted);
  margin-bottom: var(--sp-md);
}

.mockup-meaning {
  font-size: 1.125rem;
  color: var(--ink-subtle);
  filter: blur(5px);
  user-select: none;
  transition: filter 0.4s ease;
  cursor: pointer;
}

.mockup-meaning.revealed {
  filter: none;
}

.mockup-actions {
  display: flex;
  gap: var(--sp-md);
}

.mockup-btn {
  padding: 12px 36px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}

.mockup-btn:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.mockup-btn.known {
  background: var(--ink);
  color: var(--on-primary);
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.mockup-btn.known:hover {
  background: #2a2a28;
  box-shadow: var(--shadow-md);
}

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md);
  max-width: 900px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  padding: var(--sp-xl) var(--sp-lg);
  border-radius: var(--r-xl);
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  transition: all 0.3s ease;
}

.stat-item:hover {
  border-color: var(--hairline);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-xxs);
  color: var(--ink);
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}

.feature-card {
  padding: var(--sp-xl);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-lg);
  font-size: 1.5rem;
  background: var(--surface-2);
  color: var(--ink);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.feature-card .card-title {
  margin-bottom: var(--sp-sm);
}

.feature-card .body {
  color: var(--ink-muted);
  line-height: 1.7;
}

/* --- Tech Stack Section --- */
.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-lg);
  max-width: 900px;
  margin: 0 auto;
}

.tech-category {
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  transition: all 0.3s ease;
}

.tech-category:hover {
  border-color: var(--hairline);
  box-shadow: var(--shadow-md);
}

.tech-category-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--hairline-soft);
}

.tech-category-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.tech-category-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}

.tech-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink-muted);
  transition: all 0.2s;
}

.tech-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.tech-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* --- Architecture Diagram Section --- */
.arch-diagram {
  max-width: 800px;
  margin: 0 auto;
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-2xl);
  padding: var(--sp-2xl);
  box-shadow: var(--shadow-md);
}

.arch-layers {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.arch-layer {
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-lg);
  transition: all 0.3s ease;
}

.arch-layer:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.arch-layer-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-md);
}

.arch-layer-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.arch-item {
  padding: 10px 18px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink);
  transition: all 0.2s;
}

.arch-item:hover {
  background: var(--ink);
  color: var(--on-primary);
}

.arch-arrow {
  text-align: center;
  color: var(--hairline);
  font-size: 1.25rem;
  padding: var(--sp-xs) 0;
}

/* --- AI Reading Showcase --- */
.ai-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3xl);
  align-items: center;
}

.ai-showcase-text .eyebrow {
  margin-bottom: var(--sp-md);
}

.ai-showcase-text .display-md {
  margin-bottom: var(--sp-lg);
}

.ai-showcase-text .body-lg {
  margin-bottom: var(--sp-xl);
}

.ai-feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.ai-feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
}

.ai-feature-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.ai-feature-check svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.ai-reading-card {
  background: var(--surface-1);
  border-radius: var(--r-2xl);
  border: 1px solid var(--hairline);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.ai-reading-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--sp-xl);
  background: var(--surface-2);
  border-bottom: 1px solid var(--hairline-soft);
}

.ai-reading-theme-dots {
  display: flex;
  gap: 8px;
}

.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--hairline);
  cursor: pointer;
  transition: all 0.2s;
}

.theme-dot:hover { border-color: var(--ink-muted); transform: scale(1.1); }
.theme-dot.light { background: #fff; }
.theme-dot.sepia { background: #F5F0E6; }
.theme-dot.dark { background: #1C1C1E; }

.ai-reading-content {
  padding: var(--sp-xl) var(--sp-2xl);
  line-height: 1.9;
  font-size: 1.0625rem;
  min-height: 280px;
}

.ai-reading-content .highlight-word {
  background: rgba(232, 93, 38, 0.12);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-reading-content .highlight-word:hover {
  background: rgba(232, 93, 38, 0.22);
  transform: translateY(-1px);
}

/* --- SRS Section --- */
.srs-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

.srs-step {
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  text-align: center;
  min-width: 180px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.srs-step:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.srs-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 auto var(--sp-md);
  color: var(--accent);
}

.srs-step-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: var(--sp-xxs);
}

.srs-step-desc {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.srs-arrow {
  color: var(--hairline);
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* --- Points Section --- */
.points-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-lg);
  max-width: 800px;
  margin: 0 auto;
}

.point-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-lg);
  padding: var(--sp-xl);
}

.point-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  background: var(--accent-soft);
}

.point-card .card-title {
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.point-card .body-sm {
  color: var(--ink-muted);
}

.point-delta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 6px;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--ink);
  border-radius: var(--r-2xl);
  padding: var(--sp-3xl) var(--sp-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(232, 93, 38, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner .headline {
  color: var(--on-primary);
  margin-bottom: var(--sp-md);
  position: relative;
}

.cta-banner .body-lg {
  color: rgba(250, 248, 245, 0.7);
  margin-bottom: var(--sp-xl);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-banner .btn {
  position: relative;
}

/* --- Footer --- */
.footer {
  padding: var(--sp-2xl) 0;
  border-top: 1px solid var(--hairline-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
}

.footer-brand span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  gap: var(--sp-xl);
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-subtle);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-tertiary);
  line-height: 1.6;
}

.footer-copy a {
  color: var(--ink-subtle);
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 2px;
  transition: all 0.2s;
}

.footer-copy a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.15s; }
.fade-in-delay-3 { transition-delay: 0.2s; }
.fade-in-delay-4 { transition-delay: 0.25s; }
.fade-in-delay-5 { transition-delay: 0.3s; }

/* --- Mobile Nav Overlay --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--canvas);
  z-index: 999;
  padding: var(--sp-xl);
  flex-direction: column;
  gap: var(--sp-lg);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ink);
  padding: var(--sp-md) 0;
  border-bottom: 1px solid var(--hairline-soft);
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ai-showcase {
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
  }
  .tech-stack-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --sp-section: 80px;
  }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-actions .btn { display: none; }
  .nav-actions .lang-toggle { display: inline-flex; }

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

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-sm);
  }

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

  .srs-flow {
    flex-direction: column;
  }

  .srs-arrow {
    transform: rotate(90deg);
  }

  .hero-app-icon {
    width: 80px;
    height: 80px;
  }

  .mockup-word {
    font-size: 2rem;
  }

  .mockup-actions {
    flex-direction: column;
    width: 100%;
  }

  .mockup-btn {
    width: 100%;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--sp-lg);
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .arch-layer-items {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .display-xl {
    font-size: 2.25rem;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-item {
    padding: var(--sp-lg) var(--sp-md);
  }
}

/* --- Reading Theme System --- */
.ai-reading-card {
  /* Default: Light theme */
  --reading-bg: #ffffff;
  --reading-text: #1a1a18;
  --reading-text-muted: #6b6860;
  --reading-toolbar-bg: #f0ece6;
  --reading-border: #d8d3cb;
  --reading-highlight-bg: rgba(232, 93, 38, 0.12);
  --reading-highlight-text: #e85d26;
  background: var(--reading-bg);
  border-color: var(--reading-border);
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

.ai-reading-card[data-theme="light"] {
  --reading-bg: #ffffff;
  --reading-text: #1a1a18;
  --reading-text-muted: #6b6860;
  --reading-toolbar-bg: #f0ece6;
  --reading-border: #d8d3cb;
  --reading-highlight-bg: rgba(232, 93, 38, 0.12);
  --reading-highlight-text: #e85d26;
}

.ai-reading-card[data-theme="sepia"] {
  --reading-bg: #f5f0e6;
  --reading-text: #5b4636;
  --reading-text-muted: #8a7a6a;
  --reading-toolbar-bg: #ebe5d8;
  --reading-border: #d4c9b5;
  --reading-highlight-bg: rgba(232, 93, 38, 0.15);
  --reading-highlight-text: #d14d1a;
}

.ai-reading-card[data-theme="dark"] {
  --reading-bg: #1c1c1e;
  --reading-text: #e5e5e7;
  --reading-text-muted: #a1a1a3;
  --reading-toolbar-bg: #2c2c2e;
  --reading-border: #3a3a3c;
  --reading-highlight-bg: rgba(255, 120, 50, 0.2);
  --reading-highlight-text: #ff9f5a;
}

.ai-reading-card .ai-reading-toolbar {
  background: var(--reading-toolbar-bg);
  border-bottom-color: var(--reading-border);
  transition: background 0.4s ease, border-color 0.4s ease;
}

.ai-reading-card .ai-reading-content {
  color: var(--reading-text);
  transition: color 0.4s ease;
}

.ai-reading-card .highlight-word {
  background: var(--reading-highlight-bg);
  color: var(--reading-highlight-text);
  transition: background 0.3s ease, color 0.3s ease;
  cursor: pointer;
  position: relative;
}

.ai-reading-card .highlight-word:hover {
  background: var(--reading-highlight-bg);
  filter: brightness(0.85);
}

/* Theme dot active state */
.theme-dot {
  position: relative;
  transition: all 0.2s ease;
}

.theme-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.theme-dot.active::after {
  border-color: var(--ink);
}

.theme-dot[data-theme="dark"].active::after {
  border-color: var(--hairline);
}

/* --- Word Definition Tooltip --- */
.word-tooltip {
  position: fixed;
  z-index: 10000;
  background: var(--ink);
  color: var(--on-primary);
  padding: 12px 18px;
  border-radius: var(--r-lg);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.word-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.word-tooltip .tooltip-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--accent);
}

.word-tooltip .tooltip-phonetic {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: rgba(250, 248, 245, 0.6);
  margin-bottom: 6px;
}

.word-tooltip .tooltip-meaning {
  font-size: 0.875rem;
  color: rgba(250, 248, 245, 0.9);
}

.word-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 6px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* --- Mobile-First Responsive --- */
@media (max-width: 480px) {
  :root {
    --nav-h: 56px;
    --sp-section: 64px;
  }

  .container {
    padding: 0 16px;
  }

  .display-xl {
    font-size: 2rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
  }

  .display-lg {
    font-size: 1.75rem;
    line-height: 1.15;
  }

  .display-md {
    font-size: 1.375rem;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 32px);
    padding-bottom: 64px;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
    margin-bottom: var(--sp-lg);
  }

  .hero .body-lg {
    font-size: 1rem;
    margin-bottom: var(--sp-xl);
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
    gap: var(--sp-sm);
  }

  .hero-ctas .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
  }

  .hero-app-icon {
    width: 72px;
    height: 72px;
    margin-bottom: var(--sp-lg);
  }

  .mockup-word {
    font-size: 1.75rem;
  }

  .mockup-phonetic {
    font-size: 0.875rem;
  }

  .mockup-meaning {
    font-size: 1rem;
  }

  .mockup-actions {
    flex-direction: column;
    width: 100%;
    gap: var(--sp-sm);
  }

  .mockup-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-sm);
  }

  .stat-item {
    padding: var(--sp-md);
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .section-header {
    margin-bottom: var(--sp-xl);
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
  }

  .feature-card {
    padding: var(--sp-lg);
  }

  .feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: var(--sp-sm);
  }

  .feature-card .card-title {
    font-size: 1.125rem;
  }

  .feature-card .body {
    font-size: 0.9375rem;
  }

  .ai-showcase {
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
  }

  .ai-showcase-text .display-md {
    font-size: 1.5rem;
  }

  .ai-feature-list {
    gap: var(--sp-sm);
  }

  .ai-reading-content {
    padding: var(--sp-lg);
    font-size: 0.9375rem;
    line-height: 1.7;
    min-height: 200px;
  }

  .srs-flow {
    flex-direction: column;
    gap: var(--sp-sm);
  }

  .srs-arrow {
    transform: rotate(90deg);
    font-size: 1.25rem;
  }

  .srs-step {
    min-width: unset;
    width: 100%;
    padding: var(--sp-lg);
  }

  .tech-stack-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
  }

  .tech-category {
    padding: var(--sp-lg);
  }

  .tech-items {
    gap: var(--sp-xs);
  }

  .tech-item {
    font-size: 0.75rem;
    padding: 5px 10px;
  }

  .arch-diagram {
    padding: var(--sp-lg);
  }

  .arch-layer {
    padding: var(--sp-md);
  }

  .arch-layer-items {
    gap: var(--sp-xs);
  }

  .arch-item {
    font-size: 0.8125rem;
    padding: 8px 12px;
  }

  .points-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
  }

  .point-card {
    padding: var(--sp-lg);
    gap: var(--sp-md);
  }

  .point-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .cta-banner {
    padding: var(--sp-2xl) var(--sp-lg);
    border-radius: var(--r-xl);
  }

  .cta-banner .headline {
    font-size: 1.375rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--sp-md);
    text-align: center;
  }

  .footer-links {
    gap: var(--sp-md);
  }

  .footer-copy {
    font-size: 0.6875rem;
  }

  /* Theme dots larger touch target on mobile */
  .theme-dot {
    width: 24px;
    height: 24px;
  }

  .theme-dot::after {
    inset: -6px;
  }

  /* Larger touch targets for nav */
  .nav-hamburger {
    padding: 12px;
    margin: -8px;
  }

  .nav-hamburger span {
    width: 22px;
    height: 2px;
  }

  .mobile-menu a {
    padding: var(--sp-md) 0;
    font-size: 1.25rem;
  }

  .lang-toggle {
    padding: 8px 16px;
    font-size: 0.875rem;
  }

  /* Tooltip mobile adjustments */
  .word-tooltip {
    max-width: 240px;
    font-size: 0.875rem;
    padding: 10px 14px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  :root {
    --sp-section: 80px;
  }

  .stats-bar {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

/* --- Smooth scrollbar for WebKit --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--hairline);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink-tertiary);
}

/* Touch-friendly interactive elements */
@media (hover: none) and (pointer: coarse) {
  /* Mobile touch devices */
  .btn {
    min-height: 48px;
    padding: 12px 24px;
  }

  .mockup-btn {
    min-height: 48px;
  }

  .theme-dot {
    width: 28px;
    height: 28px;
  }

  .highlight-word {
    padding: 2px 6px;
    border-radius: 4px;
  }

  .nav-links a {
    padding: 8px 0;
  }

  .feature-card {
    padding: var(--sp-xl);
  }

  .srs-step {
    padding: var(--sp-xl);
  }

  .point-card {
    padding: var(--sp-xl);
  }
}
