/* === Design Tokens === */
:root {
  --accent: #007AFF;
  --accent-hover: #0062CC;
  --accent-light: #E8F2FF;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f4;
  --gray-200: #e8eaed;
  --gray-300: #dadce0;
  --gray-500: #9aa0a6;
  --gray-700: #5f6368;
  --gray-900: #1d1d1f;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 2px 6px rgba(0,0,0,0.04), 0 10px 30px rgba(0,0,0,0.08);
  --max-width: 880px;
}

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

html { scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: -apple-system, 'SF Pro Display', BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* === Nav === */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 100;
  height: 52px;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-logo {
  font-weight: 700; font-size: 17px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-logo:hover { color: var(--accent); }
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex; list-style: none; gap: 2px; align-items: center;
}
.nav-links a {
  display: block;
  padding: 5px 12px;
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--gray-100); color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px; font-weight: 600;
  background: var(--accent);
  color: #fff !important;
  border-radius: 6px;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-hover); }

.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 1px; transition: transform 0.2s, opacity 0.2s; }

/* === Hero === */
.hero {
  padding: 100px 0 72px;
  text-align: center;
  background: linear-gradient(180deg, #f0f4fa 0%, #f5f5f7 50%, #ffffff 100%);
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-light);
  border: 1px solid rgba(0,122,255,0.15);
  border-radius: 16px;
  font-size: 13px; font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: 17px; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 32px;
  line-height: 1.6;
}
.hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
}
.hero-stat {
  font-size: 14px; color: var(--text-secondary);
}
.hero-stat strong {
  display: block;
  font-size: 28px; font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 11px 24px;
  font-size: 15px; font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  letter-spacing: -0.01em;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--gray-300);
}
.btn-outline:hover { background: var(--accent-light); border-color: var(--accent); }

/* === Sections === */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  position: relative;
}
.section h2::after {
  content: '';
  display: block;
  width: 40px; height: 3px;
  border-radius: 2px;
  margin-top: 10px;
  background: var(--accent);
}

.section h3 {
  font-size: 20px; font-weight: 600;
  margin: 36px 0 12px;
  letter-spacing: -0.01em;
}
.section h4 {
  font-size: 16px; font-weight: 600;
  margin: 20px 0 8px;
  color: var(--text-secondary);
}
.section-lead {
  font-size: 17px; color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}
.section p { margin-bottom: 16px; color: var(--text); }

/* === Badges === */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px; font-weight: 500;
  vertical-align: middle;
}
.badge-green { background: #e6f4ea; color: #137333; }
.badge-yellow { background: #fef7e0; color: #b06000; }

/* === Note === */
.note {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  color: var(--text-secondary);
  margin: 16px 0;
}

/* === Tables === */
.table-wrap { overflow-x: auto; margin: 24px 0; }
table {
  width: 100%; border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
thead { background: var(--text); color: #fff; }
th, td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
}
th { font-weight: 600; }
td { border-bottom: 1px solid var(--gray-200); }
tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--gray-50); }
td code { font-size: 13px; background: var(--gray-100); padding: 2px 6px; border-radius: 4px; }

/* === Code blocks === */
pre {
  margin: 16px 0;
  border-radius: var(--radius);
  overflow-x: auto;
}
pre code { font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace; font-size: 13px; line-height: 1.6; }
code { font-family: 'SF Mono', 'Menlo', 'Monaco', monospace; font-size: 13px; }

/* === Reasons Grid === */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.reason-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.reason-card:hover { box-shadow: var(--shadow); }
.reason-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.reason-note {
  font-size: 14px; color: var(--text-secondary);
  background: var(--gray-50);
  padding: 10px; border-radius: var(--radius-sm);
  margin-top: 12px;
}

/* === Compare Grid === */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
.compare-grid > div {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
}
.compare-grid ul { padding-left: 20px; }
.compare-grid li { margin-bottom: 8px; font-size: 15px; }

/* === Limitations Grid === */
.limitations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.limit-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
}
.limit-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #ff3b30;
}
.limit-card p { font-size: 14px; margin: 0; }

/* === Use Cases Grid === */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.usecase-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.usecase-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }

/* === Anti Use Cases === */
.anti-title { margin-top: 44px; color: #ff3b30; }
.anti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.anti-item {
  background: #fff;
  border: 1px solid #fce8e6;
  border-radius: var(--radius);
  padding: 16px;
}
.anti-item strong { display: block; margin-bottom: 4px; font-size: 14px; color: #ff3b30; font-weight: 600; }
.anti-item p { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* === FAQ === */
.faq-list { margin-top: 28px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.faq-item:hover { box-shadow: var(--shadow); }
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  padding: 18px 22px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 20px; font-weight: 400;
  color: var(--gray-500);
  transition: transform 0.2s;
  flex-shrink: 0; margin-left: 12px;
}
.faq-item[open] summary::after {
  content: '\2212';
  color: var(--accent);
}
.faq-answer {
  padding: 0 22px 18px;
  font-size: 15px; color: var(--text-secondary);
}
.faq-answer p { margin-bottom: 12px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* === Footer === */
.footer {
  background: var(--bg-alt);
  color: var(--text-secondary);
  padding: 36px 0;
  text-align: center;
  font-size: 13px;
  border-top: 1px solid var(--gray-200);
}
.footer p { margin-bottom: 8px; color: var(--text-secondary); }

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === Accessibility === */
.nav-links a:focus-visible,
.btn:focus-visible,
.faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* === Responsive === */
@media (max-width: 480px) {
  .reasons-grid,
  .usecases-grid,
  .limitations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 52px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 12px; border-bottom: 1px solid var(--gray-200); gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { border-radius: 8px; padding: 10px 16px; }
  .nav-toggle { display: flex; }
  .hero { padding: 80px 0 48px; }
  .hero-stats { gap: 20px; }
  .compare-grid { grid-template-columns: 1fr; }
  .reasons-grid, .usecases-grid, .limitations-grid { grid-template-columns: 1fr; }
}
