/* ChatFlow Landing — Clean, bold, Notion/Shuttle-inspired */

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

:root {
  --bg: #fafafa;
  --bg-dark: #0a0a0a;
  --surface: #ffffff;
  --surface-hover: #f5f5f5;
  --text: #0a0a0a;
  --text-secondary: #666;
  --text-tertiary: #999;
  --border: #e5e5e5;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-bg: #f0eeff;
  --green: #00b894;
  --green-bg: #e8faf5;
  --radius: 12px;
  --radius-lg: 20px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ─── NAV ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
}

.nav-icon {
  display: flex;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
}

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

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

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

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: var(--font);
}

.btn-primary {
  background: var(--text);
  color: white;
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: 10px;
}

/* ─── HERO ─── */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--green-bg);
  color: var(--green);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #e17055);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

/* ─── HERO VISUAL ─── */
.hero-visual {
  display: flex;
  justify-content: center;
}

.demo-window {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-tertiary);
}

.demo-dots {
  display: flex;
  gap: 5px;
}

.demo-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
}

.demo-dots i:first-child { background: #ff5f57; }
.demo-dots i:nth-child(2) { background: #ffbd2e; }
.demo-dots i:last-child { background: #28c840; }

.demo-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.demo-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.demo-them .demo-avatar { background: #74b9ff; }
.demo-them span:last-child {
  font-size: 14px;
  color: var(--text-secondary);
  padding-top: 4px;
}

.demo-cursor-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.demo-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: var(--accent);
  border-radius: 100px;
  flex-shrink: 0;
}

.pill-bar {
  width: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.8);
  animation: pulse-bar 1.2s ease-in-out infinite alternate;
}

.pill-bar:nth-child(2) { animation-delay: 0.1s; }
.pill-bar:nth-child(3) { animation-delay: 0.2s; }
.pill-bar:nth-child(4) { animation-delay: 0.3s; }
.pill-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes pulse-bar {
  0% { transform: scaleY(0.5); opacity: 0.5; }
  100% { transform: scaleY(1); opacity: 1; }
}

.demo-typing {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  padding-top: 2px;
}

/* ─── STRIP ─── */
.strip {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

/* ─── SECTIONS ─── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-header {
  margin-bottom: 60px;
  max-width: 600px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
}

/* ─── STEPS ─── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.step-card {
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.step-extra {
  max-width: 600px;
}

.step-extra-card {
  padding: 28px;
  background: var(--accent-bg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(108, 92, 231, 0.15);
}

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

.step-extra-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* ─── BUILDER NOTES ─── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.tech-card {
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  min-width: 0;
}

.tech-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.signal-flow {
  --flow-line: rgba(108, 92, 231, 0.28);
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 24px;
  list-style: none;
  background:
    linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(0, 184, 148, 0.06)),
    var(--surface);
  border: 1px solid rgba(108, 92, 231, 0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.signal-flow::before {
  content: "";
  position: absolute;
  left: 42px;
  right: 42px;
  top: 42px;
  height: 1px;
  background: linear-gradient(90deg, rgba(108, 92, 231, 0.72), rgba(0, 184, 148, 0.62));
}

.signal-step {
  position: relative;
  min-width: 0;
  padding-right: 8px;
}

.signal-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 13px;
  height: 13px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(108, 92, 231, 0.08);
}

.signal-copy {
  display: block;
  min-width: 0;
}

.signal-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.signal-copy small {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

/* ─── BENTO ─── */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.bento-card {
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.bento-card:hover {
  border-color: var(--accent-light);
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.08);
}

.bento-wide {
  grid-column: span 2;
}

.bento-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--surface-hover);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.bento-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.bento-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ─── INSTALL ─── */
.install-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.install-card {
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  min-width: 0;
}

.install-primary {
  background: var(--bg-dark);
  color: white;
  border-color: transparent;
}

.install-primary h3, .install-primary p {
  color: white;
}

.install-primary p {
  opacity: 0.6;
  margin-bottom: 20px;
}

.install-primary .btn-primary {
  background: white;
  color: var(--bg-dark);
}

.install-primary .btn-primary:hover {
  background: #e5e5e5;
}

.install-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.install-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.code-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.code-block code {
  display: block;
  padding: 10px 14px;
  background: var(--surface-hover);
  border-radius: 8px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: normal;
}

.install-note {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* ─── CTA ─── */
.cta {
  text-align: center;
  padding: 120px 24px 80px;
}

.cta-content h2 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 32px;
}

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

.cta-footer {
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.8;
}

.cta-footer a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.cta-footer a:hover {
  text-decoration: underline;
}

/* ─── DEMO POLISH ─── */
.demo-msg-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-msg-name {
  font-size: 13px;
  font-weight: 700;
  color: #74b9ff;
}

.demo-msg-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.demo-msg-time {
  font-size: 11px;
  color: var(--text-tertiary);
}

.demo-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.demo-dictating {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-dictating-label {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.demo-typing {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.demo-typing strong {
  background: var(--accent-bg);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* ─── SHOWCASE ─── */
.showcase-section {
  background: var(--bg-dark);
  max-width: none;
  padding: 100px 24px;
}

.showcase-section .eyebrow {
  color: var(--accent-light);
}

.showcase-section .section-header h2 {
  color: white;
}

.showcase-section .section-header {
  max-width: 1200px;
  margin: 0 auto 60px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.showcase-card {
  background: #141414;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #222;
  transition: border-color 0.3s;
}

.showcase-card:hover {
  border-color: #333;
}

.showcase-demo {
  padding: 20px;
}

.showcase-info {
  padding: 0 20px 24px;
}

.showcase-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.showcase-info p {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.mini-window {
  background: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #222;
}

.mini-terminal {
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.mini-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #222;
  font-size: 11px;
  color: #555;
}

.mini-dots {
  display: flex;
  gap: 4px;
}

.mini-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
}

.mini-body {
  padding: 14px;
}

.mini-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-input span:last-child,
.mini-code span:last-child,
.mini-cmd span:last-child {
  font-size: 13px;
  color: #ccc;
  line-height: 1.5;
}

.mini-code span:last-child {
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  color: #aaa;
}

.mini-code strong {
  color: #e17055;
}

.mini-cmd span:last-child {
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  color: #28c840;
}

.mini-pill-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 20px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 60px 24px 40px;
    gap: 40px;
    overflow: hidden;
  }

  .hero-visual {
    transform: none !important;
    transition: none;
  }

  .hero-title {
    font-size: 44px;
    letter-spacing: 0;
  }

  .hero-desc {
    font-size: 16px;
  }

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

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

  .signal-flow {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 22px;
  }

  .signal-flow::before {
    left: 28px;
    right: auto;
    top: 30px;
    bottom: 30px;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.72), rgba(0, 184, 148, 0.62));
  }

  .signal-step {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
  }

  .signal-dot {
    margin: 3px 0 0;
  }

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

  .bento-wide {
    grid-column: span 1;
  }

  .install-cards {
    grid-template-columns: 1fr;
  }

  .cta-content h2 {
    font-size: 40px;
  }

  .section-header h2 {
    font-size: 32px;
  }

  .nav-links {
    display: none;
  }

  .strip {
    gap: 16px;
    padding: 20px 16px;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 36px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

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

/* ─── ANIMATIONS ─── */

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal]:nth-child(2) { transition-delay: 0.15s; }
[data-reveal]:nth-child(3) { transition-delay: 0.3s; }
[data-reveal]:nth-child(4) { transition-delay: 0.45s; }

/* Gradient text animation */
.gradient-text {
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Typing cursor */
.typing-cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
  font-weight: 300;
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Floating pill glow */
.demo-pill {
  animation: pill-glow 2s ease-in-out infinite alternate;
}

@keyframes pill-glow {
  0% { box-shadow: 0 0 8px rgba(108, 92, 231, 0.3); }
  100% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.6); }
}

/* Card hover lift */
.bento-card,
.step-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s,
              box-shadow 0.3s;
}

.bento-card:hover,
.step-card:hover {
  transform: translateY(-4px);
}

/* Badge pulse */
.hero-badge {
  animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 184, 148, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(0, 184, 148, 0); }
}

/* Strip items slide in */
.strip span {
  display: inline-flex;
  align-items: center;
  animation: slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.strip span:nth-child(1) { animation-delay: 0.1s; }
.strip span:nth-child(2) { animation-delay: 0.2s; }
.strip span:nth-child(3) { animation-delay: 0.3s; }
.strip span:nth-child(4) { animation-delay: 0.4s; }
.strip span:nth-child(5) { animation-delay: 0.5s; }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Nav scroll state */
.nav-scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}

/* Subtle grain overlay */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  opacity: 0.015;
  z-index: 9999;
  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");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Dot grid background for hero */
.hero {
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle, #ddd 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.4;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 1;
}

/* Hero visual parallax */
.hero-visual {
  transition: transform 0.1s linear;
}

/* Smooth transitions for everything */
a, button {
  transition: all 0.2s ease;
}
