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

:root {
  --color-brand: #6C5CE7;
  --color-brand-hover: #5A4BD1;
  --color-brand-light: #EDE9FE;
  --color-brand-glow: rgba(108, 92, 231, 0.08);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --bg-card: #FFFFFF;

  --border: #E2E8F0;
  --border-light: #F1F5F9;

  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --max-width: 1120px;
  --nav-height: 64px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

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

img {
  max-width: 100%;
  display: block;
}

code {
  font-family: var(--font-mono);
}

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

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.nav-logo img {
  width: 28px;
  height: 28px;
}

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

.nav-links a {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: color 0.15s, background 0.15s;
}

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

.nav-cta {
  background: var(--color-brand) !important;
  color: #fff !important;
  padding: 8px 20px !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--color-brand-hover) !important;
}

/* ===== Language Switcher ===== */
.lang-switcher {
  position: relative;
  display: inline-block;
}

.lang-btn {
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
}

.lang-btn:hover {
  color: var(--text-primary);
  border-color: var(--color-brand);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 130px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.lang-dropdown.open { display: block; }

.lang-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.12s, background 0.12s;
}

.lang-dropdown a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.lang-dropdown a.active {
  color: var(--color-brand);
  font-weight: 600;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 8px;
  cursor: pointer;
}

.mobile-toggle svg { width: 24px; height: 24px; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, var(--color-brand-glow) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--color-brand) 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* ===== Install Block ===== */
.install-block {
  display: inline-flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.install-block code {
  padding: 12px 20px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow-x: auto;
}

.install-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.install-copy:hover { background: var(--color-brand-hover); }
.install-copy.copied { background: var(--success); }

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  border: none;
  line-height: 1;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--color-brand);
  color: #fff;
  box-shadow: 0 4px 14px var(--color-brand-glow);
}

.btn-primary:hover {
  background: var(--color-brand-hover);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.25);
}

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

.btn-secondary:hover {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-sm);
}

/* ===== Sections ===== */
.section {
  padding: 96px 0;
}

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

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.section-alt {
  background: var(--bg-secondary);
}

/* ===== Social Proof ===== */
.social-proof {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 24px 0;
}

.social-stat {
  text-align: center;
}

.social-stat .number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.social-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== Flow / How It Works ===== */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}

.flow-step {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.flow-step:hover {
  transform: translateY(-4px);
  border-color: var(--color-brand);
  box-shadow: var(--shadow-lg);
}

.flow-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: var(--color-brand-glow);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.flow-step h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.flow-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-muted);
  padding: 0 8px;
  margin-top: 48px;
}

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

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

.feature-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  background: var(--color-brand-glow);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

.feature-card .example {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Dual Mode ===== */
.modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mode-card {
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-brand);
  box-shadow: var(--shadow-lg);
}

.mode-card .badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-brand-glow);
  color: var(--color-brand);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.mode-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.mode-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.mode-card .example {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Email Providers ===== */
.providers-scroll {
  overflow: hidden;
  padding: 20px 0;
  position: relative;
}

.providers-scroll::before,
.providers-scroll::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.providers-scroll::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-primary), transparent);
}

.providers-scroll::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-primary), transparent);
}

.providers-track {
  display: flex;
  gap: 16px;
  animation: scroll-providers 30s linear infinite;
  width: fit-content;
}

.provider-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.provider-logo svg { width: 24px; height: 24px; }

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

/* ===== Use Cases ===== */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.usecase-card {
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.usecase-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-brand);
  box-shadow: var(--shadow-lg);
}

.usecase-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.usecase-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.pro {
  border-color: var(--color-brand);
  transform: scale(1.04);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.12);
  z-index: 1;
}

.pricing-card.pro:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.18);
}

.pricing-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--color-brand);
  color: #fff;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.pricing-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.pricing-card .price-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pricing-price {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.pricing-price .currency {
  font-size: 1.4rem;
  font-weight: 600;
  vertical-align: super;
}

.pricing-price .period {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 28px 0;
}

.pricing-features li {
  padding: 10px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}

.pricing-features li:last-child { border-bottom: none; }

.pricing-features .check {
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.pricing-features .dash {
  color: var(--border);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
}

/* ===== Tabs (Install) ===== */
.tabs {
  max-width: 700px;
  margin: 0 auto;
}

.tab-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 4px;
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 24px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--text-primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.tab-content {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 28px;
}

.tab-content.active { display: block; }

.tab-content pre {
  background: #1E293B;
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #E2E8F0;
  position: relative;
}

.tab-content pre code { color: #E2E8F0; }

.tab-content .copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  color: #94A3B8;
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.tab-content .copy-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

.tab-content .copy-btn.copied {
  color: var(--success);
  border-color: var(--success);
}

.tab-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 16px;
  line-height: 1.6;
}

/* ===== CTA ===== */
.cta-section {
  text-align: center;
  padding: 96px 0;
}

.cta-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
  line-height: 1.7;
}

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

.cta-section .hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
}

.footer-brand img { width: 24px; height: 24px; }

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

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

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

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

/* ===== Scroll Animation ===== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .flow {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .flow-arrow { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .pricing-card.pro { transform: none; }
  .pricing-card.pro:hover { transform: translateY(-4px); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    gap: 2px;
    box-shadow: var(--shadow-lg);
  }
  .mobile-toggle { display: block; }

  .modes-grid,
  .features-grid,
  .usecases-grid {
    grid-template-columns: 1fr;
  }
  .flow { grid-template-columns: 1fr; }

  .social-proof { gap: 24px; flex-wrap: wrap; }

  .install-block {
    flex-direction: column;
    width: 100%;
  }
  .install-block code {
    width: 100%;
    text-align: center;
  }
  .install-copy {
    width: 100%;
    justify-content: center;
  }

  .section { padding: 64px 0; }
  .section-header { margin-bottom: 40px; }
  .pricing-card { padding: 32px 24px; }
  .tab-content { padding: 20px; }
  .tab-content pre { font-size: 0.75rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
