/* ==========================================================================
   Ask Gemini / Quote Reply for Gemini — Design System v3.0
   Engineered UI tailored for Google Gemini power workflows.
   Clean, accessible, high-contrast, zero-slop architecture.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Core Brand Tokens */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Primary Accent Tokens (Modern Google Blue) */
  --gemini-blue: #2563eb;
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: rgba(37, 99, 235, 0.08);
  --primary-border: rgba(37, 99, 235, 0.25);

  /* Light Theme (Default fallback) */
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --border-glass: #e2e8f0;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 9999px;
}

[data-theme="dark"] {
  /* Deep Slate Dark Theme */
  --bg-base: #090d16;
  --bg-surface: #0f1523;
  --bg-surface-elevated: #161f33;
  --bg-surface-subtle: #1c273e;
  --bg-glass: rgba(15, 21, 35, 0.95);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-focus: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

p {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Accent Text */
.gradient-text,
.text-accent {
  color: var(--primary-color);
  display: inline-block;
}

/* Badges & Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.pill-glow {
  border-color: var(--primary-border);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

/* Header & Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

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

.nav-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  border-radius: var(--radius-full);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-color);
  color: #ffffff !important;
  border: 1px solid var(--primary-hover);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-glass);
}

.btn-secondary:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

/* Theme Toggle Button */
.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.theme-btn .sun-icon { display: none; }
.theme-btn .moon-icon { display: block; }

[data-theme="dark"] .theme-btn .sun-icon { display: block; }
[data-theme="dark"] .theme-btn .moon-icon { display: none; }

/* Hero Section */
.hero {
  padding: 140px 0 80px;
  text-align: center;
  position: relative;
}

.hero-pill-wrap {
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 800;
  max-width: 900px;
  margin: 0 auto 24px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  max-width: 760px;
  margin: 0 auto 36px;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-social-proof svg {
  vertical-align: middle;
  color: var(--primary-color);
}

/* Playground Window Frame */
.playground-wrap {
  max-width: 1040px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  text-align: left;
}

.playground-header {
  height: 48px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 16px;
}

.browser-dots {
  display: flex;
  gap: 7px;
}

.browser-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border-glass);
}

.browser-dots span:nth-child(1) { background: #ef4444; }
.browser-dots span:nth-child(2) { background: #f59e0b; }
.browser-dots span:nth-child(3) { background: #10b981; }

.browser-bar {
  flex: 1;
  max-width: 440px;
  margin: 0 auto;
  height: 28px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.playground-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 480px;
}

.playground-sidebar {
  background: var(--bg-surface-subtle);
  border-right: 1px solid var(--border-glass);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}

.toc-mock-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-mock-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-mock-item:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

.toc-mock-item.active {
  background: var(--primary-subtle);
  color: var(--primary-color);
  font-weight: 600;
  border-left: 3px solid var(--primary-color);
}

.playground-chat {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  background: var(--bg-surface);
}

.chat-turn {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-bubble {
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  line-height: 1.65;
  position: relative;
  max-width: 90%;
}

.chat-bubble-user {
  background: var(--bg-surface-elevated);
  align-self: flex-end;
  border: 1px solid var(--border-glass);
}

.chat-bubble-ai {
  background: var(--bg-surface-subtle);
  align-self: flex-start;
  border: 1px solid var(--border-glass);
}

.highlight-sample {
  background: rgba(37, 99, 235, 0.18);
  color: var(--text-main);
  padding: 2px 4px;
  border-radius: 4px;
  position: relative;
  cursor: text;
}

.float-btn-mock {
  position: absolute;
  top: -42px;
  left: 50%;
  transform: translateX(-50%);
  background: #181c24;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  white-space: nowrap;
}

.chat-input-area {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chip-mock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 600;
}

.input-mock-text {
  font-size: 0.9375rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Feature Grid / Cards */
.section {
  padding: 100px 0;
  position: relative;
}

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

.section-tag {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.feature-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.feature-mini-badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-surface-subtle);
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Comparison Matrix (Vanilla vs Ask Gemini) */
.comparison-table-wrap {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-top: 40px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th, .comparison-table td {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
}

.comparison-table th {
  background: var(--bg-surface-elevated);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

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

.col-feature { width: 40%; font-weight: 600; color: var(--text-main); }
.col-vanilla { width: 30%; color: var(--text-dim); }
.col-power { width: 30%; font-weight: 600; color: var(--primary-color); }

.status-bad { color: #ef4444; display: inline-flex; align-items: center; gap: 6px; }
.status-good { color: #10b981; display: inline-flex; align-items: center; gap: 6px; }

/* FAQ Accordion */
.faq-wrap {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-card:hover {
  border-color: var(--border-focus);
}

.faq-trigger {
  width: 100%;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: var(--text-dim);
  flex-shrink: 0;
}

.faq-card.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.faq-content {
  padding: 0 26px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  display: none;
}

.faq-card.open .faq-content {
  display: block;
}

/* Call to Action Banner */
.cta-banner {
  margin: 80px 0 100px;
  padding: 64px 40px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--text-main);
  margin-bottom: 16px;
}

.cta-banner p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

.cta-banner .btn-white {
  background: var(--primary-color);
  color: #ffffff !important;
  border: 1px solid var(--primary-hover);
  box-shadow: var(--shadow-sm);
}

.cta-banner .btn-white:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Support Search Input */
.support-search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 1rem;
  font-family: var(--font-sans);
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.support-search-input:focus-visible {
  border-color: var(--border-focus);
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Footer */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-glass);
  padding: 70px 0 30px;
  font-size: 0.9375rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand p {
  margin-top: 14px;
  max-width: 320px;
  font-size: 0.875rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 18px;
  color: var(--text-main);
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-glass);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.8125rem;
}

/* Mobile Sticky Bottom Tab Bar */
.mobile-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-glass);
  z-index: 100;
  align-items: center;
  justify-content: space-around;
  padding: 0 12px;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}

.dock-item.active {
  color: var(--primary-color);
}

.dock-item svg {
  width: 20px;
  height: 20px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .playground-body {
    grid-template-columns: 1fr;
  }
  .playground-sidebar {
    display: none;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .navbar .nav-links {
    display: none;
  }
  .mobile-dock {
    display: flex;
  }
  body {
    padding-bottom: 74px;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
}
