/* ============================================================
   Landing page — light theme, Stripe-inspired
   Scoped under `body.landing` so the rest of the app stays dark.
   ============================================================ */

body.landing {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-tinted: #f1f5f9;
  --text: #0a1929;
  --text-dim: #5a6b80;
  --text-faint: #94a3b8;
  --border: #e5e9f0;
  --border-strong: #cbd5e1;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --accent-text: #ffffff;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --code-keyword: #c4b5fd;
  --code-string: #86efac;
  --success: #16a34a;

  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body.landing * { box-sizing: border-box; }

body.landing a { color: var(--accent); text-decoration: none; }
body.landing a:hover { color: var(--accent-hover); }

/* ----- Layout primitives ----- */

.landing-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.landing-section.tinted {
  background: var(--bg-soft);
  max-width: none;
  padding-left: max(1.5rem, calc((100vw - 1080px) / 2));
  padding-right: max(1.5rem, calc((100vw - 1080px) / 2));
}

.landing h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  font-weight: 700;
  color: var(--text);
}

.landing h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.landing h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.landing p { margin: 0 0 1rem; color: var(--text-dim); }

.landing .lead { font-size: 1.125rem; max-width: 640px; }

/* ----- Header ----- */

.landing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem max(1.5rem, calc((100vw - 1080px) / 2));
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.landing-header .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.landing-header .brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
}

.landing-header .main-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: 2rem;
  flex: 1;
}

.landing-header .main-nav a {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.landing-header .main-nav a:hover { color: var(--text); }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.78rem;
}

.lang-toggle a {
  padding: 0.25rem 0.7rem;
  color: var(--text-dim);
  font-weight: 500;
}

.lang-toggle a.active {
  background: var(--text);
  color: white;
}

.header-cta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 0.5rem;
}

.btn-ghost, .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-ghost {
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--text); background: var(--bg-tinted); }

.btn-primary {
  background: var(--text);
  color: white;
}
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); color: white; }

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ----- Hero ----- */

.hero {
  padding-top: 5rem;
  padding-bottom: 5rem;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.hero p.lead { margin: 0 auto 2rem; }

.hero-form {
  display: flex;
  gap: 0.5rem;
  max-width: 580px;
  margin: 0 auto 0.75rem;
  background: white;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.4rem 0.4rem 0.4rem 0.4rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(15, 23, 42, 0.04);
}

.hero-form input[type="url"] {
  flex: 1;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

.hero-form input[type="url"]::placeholder { color: var(--text-faint); }

.hero-form button {
  padding: 0.75rem 1.4rem;
  background: var(--text);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
}

.hero-form button:hover { background: var(--accent); }

.hero-trust {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin: 0.5rem 0 1.5rem;
}

.hero-sub-cta {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ----- Section header (shared) ----- */

.section-eyebrow {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-title-center { text-align: center; margin-bottom: 2rem; }

/* ----- How it works ----- */

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.how-step {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
}

.how-step .step-num {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* ----- Use cases ----- */

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.usecase {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
}

.usecase .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* ----- Dev section ----- */

.devs {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.devs-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.devs-side h2 { margin-bottom: 1rem; }

.devs-side ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.devs-side li {
  padding: 0.4rem 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.devs-side li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  margin-right: 0.6rem;
}

.devs-code {
  background: var(--code-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.devs-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.devs-tabs button {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.devs-tabs button.active {
  background: rgba(255, 255, 255, 0.07);
  color: white;
}

.devs-tabs button:hover:not(.active) { color: rgba(255, 255, 255, 0.85); }

.devs-code pre {
  margin: 0;
  padding: 1.25rem 1.5rem;
  color: var(--code-text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
}

.devs-code .k { color: var(--code-keyword); }
.devs-code .s { color: var(--code-string); }

/* ----- Pricing ----- */

.landing-pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 760px;
  margin: 2.5rem auto 1.5rem;
}

.landing-price-card {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
}

.landing-price-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, white, var(--accent-soft));
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.1);
}

.landing-price-card.featured::before {
  content: attr(data-recommended);
  position: absolute;
  top: -0.7rem;
  left: 1.5rem;
  background: var(--accent);
  color: white;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.landing-price-card h3 { font-size: 1rem; color: var(--text-dim); font-weight: 500; }

.landing-price-amount {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.4rem 0 0.2rem;
  letter-spacing: -0.02em;
}

.landing-price-amount small {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-left: 0.3rem;
}

.landing-price-card ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.75rem;
}

.landing-price-card li {
  padding: 0.35rem 0;
  font-size: 0.95rem;
}
.landing-price-card li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  margin-right: 0.6rem;
}

.landing-price-card .price-cta {
  display: block;
  text-align: center;
  padding: 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  background: var(--text);
  color: white;
}

.landing-price-card.featured .price-cta {
  background: var(--accent);
}

.landing-price-card .price-cta:hover { opacity: 0.92; color: white; }

.pricing-extra-cta { text-align: center; margin-top: 0.5rem; font-size: 0.9rem; }

/* ----- FAQ ----- */

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

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.faq-item summary {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--text-faint);
  transition: transform 0.15s;
}

.faq-item[open] summary::after { content: '−'; }

.faq-item p {
  margin: 0.6rem 0 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ----- Footer ----- */

.landing-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 3rem max(1.5rem, calc((100vw - 1080px) / 2)) 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.footer-brand p { font-size: 0.9rem; color: var(--text-dim); max-width: 280px; }

.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  font-weight: 600;
  margin: 0 0 0.85rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li { margin: 0.3rem 0; font-size: 0.9rem; }

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ----- Mobile ----- */

@media (max-width: 820px) {
  body.landing { font-size: 15px; }
  .landing-header { padding: 0.7rem 1rem; gap: 0.6rem; flex-wrap: wrap; }
  .landing-header .main-nav { display: none; }
  .landing-header .brand { flex: 1; }
  .header-cta .btn-ghost { display: none; }
  .lang-toggle { order: 99; }
  .landing-section { padding: 3.5rem 1.25rem; }
  .hero { padding-top: 3rem; padding-bottom: 3rem; }
  .hero-form { flex-direction: column; padding: 0.5rem; }
  .hero-form button { width: 100%; padding: 0.85rem; }
  .how-grid { grid-template-columns: 1fr; }
  .usecases-grid { grid-template-columns: 1fr; }
  .devs-grid { grid-template-columns: 1fr; gap: 2rem; }
  .landing-pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
