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

:root {
  --bg: #E6DCCB;
  --bg-elevated: #EDE4D3;
  --bg-card: #F5EEE0;
  --accent: #B07A14;
  --accent-light: rgba(176, 122, 20, 0.08);
  --accent-glow: rgba(176, 122, 20, 0.22);
  --text: #4A4035;
  --text-secondary: #8A7E70;
  --text-muted: #A89E90;
  --border: #D4C9B5;
  --white: #FFFFFF;
  --radius: 14px;
  --radius-lg: 22px;
  --max-w: 1200px;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
code { font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; font-size: 0.9em; }

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(230, 220, 203, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.nav-logo span { margin-left: 6px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 600;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.9; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; }

/* ===== Hero ===== */
.hero {
  padding: calc(var(--nav-h) + 80px) 32px 60px;
  text-align: center;
  max-width: var(--max-w);
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: var(--accent-light);
  border: 1px solid var(--accent-glow);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 32px;
}
.hero-title {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--text);
}
.hero-sub {
  font-size: clamp(17px, 2.5vw, 20px);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(176, 122, 20, 0.25);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(176, 122, 20, 0.35); transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 18px 40px; font-size: 18px; }

/* ===== Phone Mockup ===== */
.hero-visual { display: flex; justify-content: center; }
.phone-mockup {
  width: 320px;
  background: #1a1a1a;
  border-radius: 40px;
  padding: 16px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.1);
  position: relative;
}
.phone-notch {
  width: 120px;
  height: 28px;
  background: #1a1a1a;
  border-radius: 0 0 18px 18px;
  margin: -16px auto 12px;
  position: relative;
  z-index: 2;
}
.phone-screen {
  background: #2B2D31;
  border-radius: 28px;
  padding: 24px 16px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-end;
}
.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 85%;
  animation: bubbleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.chat-bubble.user {
  background: #B07A14;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  animation-delay: 0.3s;
}
.chat-bubble.ai {
  background: #383A40;
  color: #F2F3F5;
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  animation-delay: 0.8s;
}
.chat-bubble.ai.done { animation-delay: 1.3s; }

.typing-indicator {
  display: inline-flex;
  gap: 4px;
  margin-right: 8px;
  vertical-align: middle;
}
.typing-indicator span {
  width: 6px; height: 6px;
  background: #949BA4;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Social Proof ===== */
.social-proof {
  text-align: center;
  padding: 40px 32px 60px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.social-proof p {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 600;
}
.logo-strip {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}
.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* ===== Features ===== */
.features {
  padding: 80px 32px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s;
}
.feature-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}
.feature-icon { font-size: 32px; margin-bottom: 16px; }
.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.feature-card code {
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--accent);
  font-size: 13px;
}

/* ===== How It Works ===== */
.how-it-works {
  padding: 80px 32px;
  max-width: 720px;
  margin: 0 auto;
}
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.step-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  min-width: 80px;
  letter-spacing: -2px;
}
.step-content h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.step-content p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.step-line {
  width: 2px;
  height: 48px;
  background: var(--border);
  margin-left: 39px;
}

/* ===== Self-Host ===== */
.self-host {
  padding: 80px 32px;
  background: var(--bg-elevated);
}
.self-host-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.install-block {
  max-width: 640px;
  margin: 0 auto 48px;
}
.install-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.code-block {
  display: flex;
  align-items: center;
  background: var(--text);
  border-radius: var(--radius);
  padding: 18px 24px;
  gap: 16px;
}
.code-block code {
  flex: 1;
  color: var(--bg);
  font-size: 15px;
  word-break: break-all;
}
.copy-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--bg);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.copy-btn:hover { background: rgba(255,255,255,0.2); }
.copy-btn.copied { color: #43B581; }

.self-host-features {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.sh-feature {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
.sh-feature strong { font-size: 15px; color: var(--text); }
.sh-feature span { font-size: 13px; color: var(--text-secondary); }

/* ===== Pricing ===== */
.pricing {
  padding: 80px 32px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 8px 40px rgba(176, 122, 20, 0.12);
  transform: scale(1.02);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--white);
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pricing-tier {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.pricing-price {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.pricing-price span {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0;
}
.pricing-features {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pricing-features li {
  font-size: 15px;
  color: var(--text-secondary);
  padding-left: 24px;
  position: relative;
}
.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== Final CTA ===== */
.final-cta {
  text-align: center;
  padding: 100px 32px;
}
.final-cta h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}
.final-cta p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 60px 32px 32px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.footer-brand { max-width: 240px; }
.footer-logo {
  font-size: 20px;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}
.footer-brand p { font-size: 14px; color: var(--text-secondary); }
.footer-links { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--bg); flex-direction: column; padding: 24px 32px; gap: 20px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-cards { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .pricing-card.featured { transform: none; }
  .step { gap: 20px; }
  .step-number { font-size: 36px; min-width: 56px; }
  .footer-inner { flex-direction: column; }
  .footer-links { gap: 32px; }
  .self-host-features { flex-direction: column; gap: 24px; }
  .phone-mockup { width: 280px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
