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

:root {
  --bg: #f8f9fa;
  --bg-elevated: #ffffff;
  --text: #202124;
  --text-secondary: #5f6368;
  --accent: #1a73e8;
  --accent-hover: #1557b0;
  --border: #e0e0e0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(60,64,67,0.12), 0 4px 8px rgba(60,64,67,0.08);
  --shadow-lg: 0 4px 16px rgba(60,64,67,0.16), 0 8px 32px rgba(60,64,67,0.08);
  --font: "Google Sans", "Product Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Header === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,249,250,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon { font-size: 24px; }
.logo-text { font-size: 20px; font-weight: 600; }

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

.nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.nav a:hover { color: var(--text); text-decoration: none; }

.nav-gh {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--text);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px !important;
  transition: opacity 0.15s;
}

.nav-gh:hover { opacity: 0.85; }
.nav-gh svg { fill: #fff; }

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

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.2s;
}

/* === Hero === */
.hero {
  padding: 80px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #1a73e8, #8ab4f8, #5865f2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,115,232,0.3);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #f1f3f4;
  text-decoration: none;
  transform: translateY(-1px);
}

.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 14px;
  background: #e8f0fe;
  color: var(--accent);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
}

/* === App Mockup === */
.preview-section {
  padding: 20px 0 80px;
}

.app-mockup {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: #fff;
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f1f3f4;
  border-bottom: 1px solid var(--border);
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.mockup-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mockup-dots span:nth-child(1) { background: #ff5f57; }
.mockup-dots span:nth-child(2) { background: #ffbd2e; }
.mockup-dots span:nth-child(3) { background: #28c840; }

.mockup-url {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  background: #fff;
  padding: 4px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  max-width: 300px;
  margin: 0 auto;
}

.mockup-body {
  display: flex;
  min-height: 520px;
  max-height: 520px;
  overflow: hidden;
}

/* Mock sidebar */
.mock-sidebar {
  width: 220px;
  min-width: 220px;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 12px 0;
  display: flex;
  flex-direction: column;
}

.mock-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 16px;
  font-weight: 600;
  font-size: 16px;
}

.mock-theme-toggle {
  font-size: 16px;
  cursor: default;
}

.mock-logo { font-size: 15px; }

.mock-nav-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mock-nav-item {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: default;
  border-radius: 0 25px 25px 0;
  margin-right: 12px;
  transition: background 0.15s;
}

.mock-nav-item.active {
  background: #feefc3;
  color: var(--text);
  font-weight: 600;
}

.mock-labels-section {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.mock-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.mock-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
  color: var(--text-secondary);
}

.mock-label-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Mock main content */
.mock-main {
  flex: 1;
  padding: 16px 20px;
  background: #f1f3f4;
  overflow: hidden;
}

.mock-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  max-width: 480px;
  margin: 0 auto 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.mock-creator {
  max-width: 480px;
  margin: 0 auto 20px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.mock-creator-title {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.mock-creator-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

.mock-save-btn {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* Mock note grid */
.mock-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mock-card {
  width: calc(33.333% - 8px);
  min-width: 140px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  position: relative;
  transition: box-shadow 0.15s;
}

.mock-card-pin {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
}

.mock-card-title {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 4px;
  color: rgba(0,0,0,0.8);
}

.mock-card-content {
  color: rgba(0,0,0,0.6);
  font-size: 11px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mock-card-media {
  margin-top: 6px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
  font-size: 10px;
  color: rgba(0,0,0,0.5);
}

.mock-card-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  margin-bottom: 4px;
}

.mock-card-badge.warn {
  background: #e8f0fe;
  color: #1a73e8;
}

.mock-card-enrichment {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  padding: 6px;
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
}

.mock-enrichment-thumb {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1a73e8 0%, #8ab4f8 100%);
  border-radius: 4px;
  flex-shrink: 0;
}

.mock-enrichment-title {
  font-size: 10px;
  font-weight: 600;
  color: rgba(0,0,0,0.7);
}

.mock-enrichment-desc {
  font-size: 9px;
  color: rgba(0,0,0,0.5);
  line-height: 1.3;
}

.mock-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.mock-chip {
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
}

.mock-date {
  font-size: 9px;
  color: rgba(0,0,0,0.4);
  margin-left: auto;
}

/* Mock chat panel */
.mock-chat {
  width: 260px;
  min-width: 260px;
  background: #fff;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.mock-chat-header {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mock-chat-close {
  color: var(--text-secondary);
  font-size: 16px;
  cursor: default;
}

.mock-chat-messages {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.mock-chat-msg {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.4;
  max-width: 90%;
}

.mock-chat-msg.user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.mock-chat-msg.assistant {
  background: #f1f3f4;
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.mock-chat-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
}

.mock-chat-send { font-size: 14px; }

/* === Features === */
.features {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* === Theme Preview === */
.themes-section {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--bg) 0%, #eef1f5 100%);
}

.theme-switcher {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.theme-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-elevated);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}

.theme-btn:hover { background: #f1f3f4; }

.theme-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.theme-preview {
  display: flex;
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  min-height: 260px;
  transition: background 0.3s, color 0.3s;
}

/* Light theme (default) */
.theme-preview {
  background: #f1f3f4;
  color: #202124;
}

.theme-preview .tp-sidebar {
  width: 160px;
  min-width: 160px;
  background: #ffffff;
  border-right: 1px solid #e0e0e0;
  padding: 16px 0;
}

.theme-preview .tp-nav {
  padding: 8px 16px;
  font-size: 13px;
  color: #5f6368;
  border-radius: 0 25px 25px 0;
  margin-right: 12px;
  transition: all 0.3s;
}

.theme-preview .tp-nav.active {
  background: #feefc3;
  color: #202124;
  font-weight: 600;
}

.theme-preview .tp-main {
  flex: 1;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

.theme-preview .tp-card {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  transition: all 0.3s;
}

.theme-preview .tp-card-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.theme-preview .tp-card-text {
  font-size: 12px;
  opacity: 0.7;
}

/* Theme colors */
.tp-color-yellow { background: #fff475; }
.tp-color-blue { background: #cbf0f8; }
.tp-color-default { background: #ffffff; }
.tp-color-green { background: #ccff90; }

/* Dim theme variant */
.theme-preview.dim { background: #313338; color: #dbdee1; }
.theme-preview.dim .tp-sidebar { background: #2b2d31; border-color: #3f4147; }
.theme-preview.dim .tp-nav { color: #949ba4; }
.theme-preview.dim .tp-nav.active { background: #5865f233; color: #dbdee1; }
.theme-preview.dim .tp-card { border-color: rgba(255,255,255,0.06); }
.theme-preview.dim .tp-color-yellow { background: #635d19; }
.theme-preview.dim .tp-color-blue { background: #28464c; }
.theme-preview.dim .tp-color-default { background: #383a40; }
.theme-preview.dim .tp-color-green { background: #345920; }
.theme-preview.dim .tp-card-title { color: #dbdee1; }
.theme-preview.dim .tp-card-text { color: #949ba4; }

/* Dark theme variant */
.theme-preview.dark { background: #111213; color: #e8eaed; }
.theme-preview.dark .tp-sidebar { background: #1a1c1e; border-color: #2d2f31; }
.theme-preview.dark .tp-nav { color: #9aa0a6; }
.theme-preview.dark .tp-nav.active { background: #8ab4f833; color: #e8eaed; }
.theme-preview.dark .tp-card { border-color: rgba(255,255,255,0.04); }
.theme-preview.dark .tp-color-yellow { background: #41331c; }
.theme-preview.dark .tp-color-blue { background: #1d3035; }
.theme-preview.dark .tp-color-default { background: #1e2022; }
.theme-preview.dark .tp-color-green { background: #1e3a13; }
.theme-preview.dark .tp-card-title { color: #e8eaed; }
.theme-preview.dark .tp-card-text { color: #9aa0a6; }

/* === Stack === */
.stack-section {
  padding: 80px 0;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.stack-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.stack-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 12px;
}

.stack-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack-items span {
  display: inline-block;
  padding: 4px 12px;
  background: #f1f3f4;
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* === Quick Start === */
.quickstart {
  padding: 80px 0;
  background: linear-gradient(180deg, #eef1f5 0%, var(--bg) 100%);
}

.terminal {
  max-width: 680px;
  margin: 0 auto 32px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #2d2d2d;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.terminal-body {
  background: #1e1e1e;
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: #d4d4d4;
}

.terminal-line { margin-bottom: 2px; }

.terminal-prompt {
  color: #28c840;
  margin-right: 8px;
  font-weight: 600;
}

.terminal-output {
  margin-top: 12px;
  padding: 12px 0;
  border-top: 1px solid #333;
  color: #888;
  font-size: 13px;
  line-height: 2;
}

.terminal-success { color: #28c840; font-weight: 600; }
.terminal-link { color: #8ab4f8; }

.quickstart-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}

.qs-note {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.qs-note strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

/* === Footer === */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

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

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-sep { opacity: 0.3; }

.footer-right a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

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

/* === Responsive === */
@media (max-width: 900px) {
  .mock-chat { display: none; }
  .mock-card { width: calc(50% - 6px); }
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }

  .nav.open { display: flex; }

  .hero h1 { font-size: 32px; }
  .hero-sub { font-size: 16px; }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .mockup-body { min-height: 400px; max-height: 400px; }
  .mock-sidebar { width: 160px; min-width: 160px; }
  .mock-sidebar .mock-nav-items .mock-nav-item { font-size: 11px; padding: 6px 12px; }

  .section-title { font-size: 28px; }

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

  .theme-preview { flex-direction: column; }
  .theme-preview .tp-sidebar {
    width: 100%;
    min-width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    padding: 8px 0;
    gap: 0;
  }
  .theme-preview.dim .tp-sidebar { border-bottom-color: #3f4147; }
  .theme-preview.dark .tp-sidebar { border-bottom-color: #2d2f31; }

  .quickstart-notes { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-left { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .mock-sidebar { display: none; }
  .mock-card { width: 100%; }
  .stack-grid { grid-template-columns: 1fr; }
}
