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

:root {
  --bg: #FAFAF8;
  --bg-alt: #F1F0EC;
  --bg-card: #FFFFFF;
  --text: #1A1A18;
  --text-secondary: #6B6B64;
  --text-tertiary: #9B9B94;
  --accent: #E8430A;
  --accent-glow: rgba(232, 67, 10, 0.12);
  --accent-soft: #FFF0EA;
  --border: #E4E3DF;
  --border-strong: #D0CFC9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Satoshi', -apple-system, sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1140px;
}

[data-theme="dark"] {
  --bg: #111110;
  --bg-alt: #1A1A18;
  --bg-card: #1E1E1C;
  --text: #EDEDEB;
  --text-secondary: #A0A098;
  --text-tertiary: #6B6B64;
  --accent: #F05A24;
  --accent-glow: rgba(240, 90, 36, 0.15);
  --accent-soft: #2A1810;
  --border: #2C2C28;
  --border-strong: #3A3A35;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.15);
}

html { scroll-behavior: smooth; }

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

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

/* ── Animated background grain ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  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");
}

[data-theme="dark"] body::before { opacity: 0.04; }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: var(--transition);
}

.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 900;
  font-family: var(--font-mono);
  box-shadow: 0 2px 8px rgba(232, 67, 10, 0.3);
}

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

.nav-links a {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: var(--transition);
}

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

.theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: var(--transition);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text);
  transform: scale(1.05);
}

/* ── Hero ── */
.hero {
  padding: 160px 24px 100px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.8s ease-out;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: #2ecc40;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 400;
  max-width: 800px;
  margin: 0 auto 28px;
  animation: fadeUp 0.8s ease-out 0.1s both;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.18rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 44px;
  line-height: 1.7;
  animation: fadeUp 0.8s ease-out 0.2s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s ease-out 0.3s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn svg { width: 18px; height: 18px; }

/* ── App Preview / Demo ── */
.preview-section {
  padding: 0 24px 100px;
  animation: fadeUp 0.8s ease-out 0.4s both;
}

.app-preview {
  max-width: 960px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

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

.preview-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-strong);
}

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

.preview-title {
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.preview-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 340px;
}

.preview-panel {
  padding: 24px;
  position: relative;
}

.preview-panel + .preview-panel {
  border-left: 1px solid var(--border);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.panel-model {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.panel-model.claude { color: #D97706; }
.panel-model.gpt { color: #10A37F; }

.panel-status {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-left: auto;
  font-family: var(--font-mono);
}

.panel-text {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.panel-text .line {
  display: block;
  height: 12px;
  background: var(--bg-alt);
  border-radius: 4px;
  margin-bottom: 10px;
}

.panel-text .line:nth-child(1) { width: 95%; animation: shimmer 2s ease-in-out infinite; }
.panel-text .line:nth-child(2) { width: 88%; animation: shimmer 2s ease-in-out 0.15s infinite; }
.panel-text .line:nth-child(3) { width: 92%; animation: shimmer 2s ease-in-out 0.3s infinite; }
.panel-text .line:nth-child(4) { width: 78%; animation: shimmer 2s ease-in-out 0.45s infinite; }
.panel-text .line:nth-child(5) { width: 84%; animation: shimmer 2s ease-in-out 0.6s infinite; }
.panel-text .line:nth-child(6) { width: 60%; animation: shimmer 2s ease-in-out 0.75s infinite; }

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

.panel-footer {
  position: absolute;
  bottom: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.panel-footer .cost {
  padding: 3px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  font-weight: 500;
}

/* ── Models Ticker ── */
.models-section {
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.models-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 28px;
}

.ticker-wrapper {
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker {
  display: flex;
  gap: 16px;
  animation: scroll 40s linear infinite;
  width: max-content;
}

.ticker:hover { animation-play-state: paused; }

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ticker-item .model-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Features ── */
.features-section {
  padding: 80px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

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

.feature-card {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover::before { transform: scaleX(1); }

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

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── How It Works ── */
.how-section {
  padding: 80px 24px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  counter-reset: step;
}

.step {
  counter-increment: step;
  position: relative;
  text-align: center;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 500;
  color: var(--border-strong);
  display: block;
  margin-bottom: 20px;
  line-height: 1;
}

[data-theme="dark"] .step::before {
  color: var(--border);
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 280px;
  margin: 0 auto;
}

/* ── Pricing Highlight ── */
.pricing-section {
  padding: 100px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.pricing-left h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 18px;
}

.pricing-left p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.pricing-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pricing-option {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
}

.pricing-option:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.pricing-option.featured {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pricing-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.pricing-option h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.pricing-option .tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 3px 9px;
  border-radius: 5px;
}

.pricing-option p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

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

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
}

.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 18px;
}

.cta-inner p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

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

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  transition: var(--transition);
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links a:not(.theme-toggle-wrap) { display: none; }
  
  .hero { padding: 130px 20px 70px; }
  .hero h1 { font-size: 2.6rem; }
  .hero-sub { font-size: 1.05rem; }
  
  .preview-body { grid-template-columns: 1fr; }
  .preview-panel + .preview-panel { border-left: none; border-top: 1px solid var(--border); }
  
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  
  .pricing-card {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 36px;
  }
  
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile nav toggle ── */
.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

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