/* ═══════════════════════════════════════════════
   recall landing — system theme, no dependencies
   ═══════════════════════════════════════════════ */

/* ── Theme variables ── */
:root {
  color-scheme: dark light;

  /* Dark theme (default for auto) */
  --bg:          #0a0a0a;
  --bg-elevated: #151515;
  --bg-card:     #1a1a1a;
  --text:        #e8e8e8;
  --text-muted:  #8b8b8b;
  --border:      #2a2a2a;
  --accent:      #7c5cfc;
  --accent-soft: rgba(124, 92, 252, 0.12);
  --accent-glow: rgba(124, 92, 252, 0.35);
  --green:       #2dd4bf;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);

  --radius:      12px;
  --max-w:       1120px;
  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:        "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:          #fafafa;
    --bg-elevated: #ffffff;
    --bg-card:     #ffffff;
    --text:        #1a1a1f;
    --text-muted:  #6b6b76;
    --border:      #e5e5ea;
    --accent:      #6d4aff;
    --accent-soft: rgba(109, 74, 255, 0.08);
    --accent-glow: rgba(109, 74, 255, 0.2);
    --shadow:      0 4px 24px rgba(0,0,0,0.08);
  }
}

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

html { scroll-behavior: smooth; }

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

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

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.25rem; }
.logo-icon { font-size: 1.4rem; }

.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s; }
.header-nav a:hover { color: var(--text); }

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }

.btn-ghost {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Hero ── */
.hero { padding: 48px 0 64px; }

/* ── Segment tabs (= carousel controls) ── */
.segment-tabs {
  position: relative;
  display: inline-flex;
  gap: 0;
  margin: 0 auto 0;
  padding: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.segment-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.25s;
  white-space: nowrap;
}
.segment-tab:hover { color: var(--text); }
.segment-tab.active { color: #fff; }
@media (prefers-color-scheme: light) { .segment-tab.active { color: var(--text); } }

.tab-icon { font-size: 1rem; }

/* sliding indicator */
.tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  background: var(--accent);
  border-radius: 8px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

/* progress bar */
.carousel-progress {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  margin: 16px auto 0;
  max-width: 240px;
  overflow: hidden;
}
.carousel-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.1s linear;
}
.carousel-progress.paused .carousel-progress-bar { animation: none; opacity: 0; }
.carousel-progress.paused { opacity: 0; transition: opacity 0.3s; }

/* ── Carousel ── */
.carousel {
  position: relative;
  margin-top: 40px;
  min-height: 420px;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 48px;
  opacity: 0;
  transform: translateX(30px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.slide-content { flex: 1; min-width: 0; }
.slide-headline {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

/* SEO H1 — accessible but visually hidden */
.seo-h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.slide-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 24px;
}

.slide-features { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }

.chip {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

/* ── Slide visuals (mock cards) ── */
.slide-visual { flex: 0 0 420px; }

.mock-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mock-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.mock-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}
.mock-body { padding: 16px; font-size: 0.85rem; }

/* chat mock */
.mock-query { font-weight: 600; margin-bottom: 12px; }
.mock-snippet {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
}

/* team mock */
.mock-row { display: flex; gap: 8px; padding: 6px 0; align-items: flex-start; }
.mock-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}
.mock-avatar.mock-bot { background: var(--green); color: var(--bg); }
.mock-answer { color: var(--text-muted); }

/* code mock */
.mock-terminal { font-family: var(--mono); font-size: 0.8rem; line-height: 1.7; }
.code-line { white-space: pre; }
.code-keyword { color: var(--accent); }
.code-string { color: var(--green); }
.code-comment { color: var(--text-muted); opacity: 0.6; }

/* ── Features section ── */
.features, .how { padding: 80px 0; border-top: 1px solid var(--border); }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ── How it works ── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.step { text-align: center; max-width: 260px; }
.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700;
  margin: 0 auto 16px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: 0.9rem; color: var(--text-muted); }
.step-arrow { font-size: 1.5rem; color: var(--border); }

/* ── Section lead text ── */
.section-lead {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Impact section (AI business cases) ── */
.impact { padding: 80px 0; border-top: 1px solid var(--border); }

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.impact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.impact-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.impact-source {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.impact-stat {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}

.impact-stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.impact-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.impact-cta-text {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 40px;
  color: var(--text);
}

/* ── Use Cases section ── */
.usecases { padding: 80px 0; border-top: 1px solid var(--border); }

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.usecase-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.usecase-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.usecase-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.usecase-card p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.65; }

/* ── FAQ section ── */
.faq { padding: 80px 0; border-top: 1px solid var(--border); }

.faq-list { max-width: 760px; margin: 0 auto; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 24px 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── CTA section ── */
.cta-section { padding: 64px 0 80px; }

.cta-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
}
.cta-box h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.cta-box p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.btn-large { padding: 14px 36px; font-size: 1.05rem; }

/* ── Footer ── */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.footer-tagline { color: var(--text-muted); font-weight: 400; font-size: 0.9rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .slide { flex-direction: column; gap: 32px; }
  .slide-visual { flex: 0 0 auto; width: 100%; max-width: 420px; }
  .carousel { min-height: 600px; }
  .header-nav a:not(.btn-ghost) { display: none; }
}

@media (max-width: 480px) {
  .segment-tab { padding: 8px 14px; font-size: 0.82rem; }
  .segment-tab .tab-icon { display: none; }
  .hero { padding: 24px 0 40px; }
  .features, .how { padding: 48px 0; }
  .step-arrow { display: none; }
}

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

/* ── Chat slide (full-width iframe, not a marketing slide) ── */
.slide-chat {
  display: flex;
  flex-direction: column;
}
.chat-iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elevated, #111);
}
/* Grow carousel when chat slide is active (has() supported since 2023) */
.carousel:has(.slide-chat.active) {
  min-height: 620px;
}
.slide.active .chat-iframe { display: block; }

/* Chat tab gets a distinct accent so users see it's interactive */
.segment-tab-chat.active {
  color: #6ee7b7;
}
@media (prefers-color-scheme: light) {
  .segment-tab-chat.active { color: #059669; }
}
