/* ============================================================
   Marketing landing — TypeUI "Clean Design System"
   Tokens, type scale, and components translated from the
   clean-design-system skill spec (colors/typography/buttons/
   cards/badges/layout/radius/shadows) into plain CSS.
   Scoped under .mkt so it never collides with the app shell (.bm).
   Dark mode resolves automatically via prefers-color-scheme.
   ============================================================ */

.mkt {
  /* Neutral surfaces */
  --neutral-primary-soft: #ffffff;
  --neutral-secondary-soft: #fafbfc;
  --neutral-secondary-medium: #f2f2f5;
  /* Brand */
  --brand: #6c47ff;
  --brand-strong: #5535dc;
  --brand-softer: #f4f0ff;
  /* Accent (for hero gradient keyword) */
  --purple: #a855f7;
  /* Text */
  --heading: #131316;
  --body: #5e5f6e;
  --body-subtle: #747686;
  --white: #ffffff;
  --dark: #131316;
  --dark-strong: #0d0d12;
  /* Brand text */
  --fg-brand: #6c47ff;
  --fg-brand-strong: #5535dc;
  /* Status (checkmarks / "no charge" accents) */
  --success-soft: #ecfdf5;
  --fg-success-strong: #047857;
  --border-success-subtle: #a7f3d0;
  /* Borders */
  --border-default: #e8e8ec;
  --border-default-medium: #e2e2e8;
  --border-default-strong: #d7d7de;
  --border-brand-subtle: #d4c4ff;
  /* Glint */
  --color-1-400: rgba(255, 255, 255, 0.15);
  --color-1-700: rgba(0, 0, 0, 0.08);
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.08);
  /* Radius */
  --r-base: 12px;
  --r-default: 8px;
  --r-sm: 4px;
  --r-full: 9999px;

  background: var(--neutral-primary-soft);
  color: var(--body);
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: dark) {
  .mkt {
    --neutral-primary-soft: #111116;
    --neutral-secondary-soft: #0d0d12;
    --neutral-secondary-medium: #1a1a21;
    --brand: #7c5cff;
    --brand-strong: #6c47ff;
    --brand-softer: #1a0f36;
    --heading: #f5f5f7;
    --body: #9394a1;
    --body-subtle: #9394a1;
    --fg-brand: #a78bff;
    --fg-brand-strong: #d4c4ff;
    --success-soft: #052e1c;
    --fg-success-strong: #10b981;
    --border-success-subtle: #064e3b;
    --border-default: #1f1f25;
    --border-default-medium: #2c2c35;
    --border-default-strong: #3f3f48;
    --border-brand-subtle: #2d1b69;
    --color-1-400: rgba(255, 255, 255, 0.08);
    --color-1-700: rgba(0, 0, 0, 0.15);
  }
}

/* ---- Reset (scoped) ------------------------------------- */
.mkt *, .mkt *::before, .mkt *::after { box-sizing: border-box; }
.mkt { margin: 0; }
.mkt img { max-width: 100%; display: block; }

/* ---- Typography ----------------------------------------- */
.mkt :where(h1, h2, h3, h4) { margin: 0; color: var(--heading); font-weight: 700; }
.mkt h1 { font-size: 32px; line-height: 1.05; letter-spacing: -1.2px; margin-bottom: 24px; }
.mkt h2 { font-size: 28px; line-height: 1.1; letter-spacing: -0.5px; }
.mkt h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.2px; }
.mkt p { margin: 0 0 16px; }
.mkt p:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .mkt h1 { font-size: 48px; }
  .mkt h2 { font-size: 36px; }
  .mkt h3 { font-size: 24px; }
}
@media (min-width: 1024px) {
  .mkt h1 { font-size: 64px; }
  .mkt h2 { font-size: 44px; }
}

.mkt .text-lead { font-size: 20px; line-height: 1.6; color: var(--body); max-width: 70ch; }
.mkt .text-small { font-size: 14px; line-height: 1.5; color: var(--body-subtle); }

.mkt .section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--fg-brand);
  letter-spacing: 0.02em; margin-bottom: 12px;
}

.mkt a { color: var(--fg-brand); text-decoration: none; }
.mkt a:hover { text-decoration: underline; }
.mkt .accent-grad {
  background: linear-gradient(90deg, var(--brand), var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- Layout --------------------------------------------- */
.mkt .container { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.mkt .section { padding-block: 96px; }
.mkt .section--alt { background: var(--neutral-secondary-soft); }
.mkt .section-header { max-width: 760px; margin: 0 auto 64px; text-align: center; }
.mkt .section-header .text-lead { margin-inline: auto; margin-top: 16px; }

/* ---- Buttons -------------------------------------------- */
.mkt .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1;
  padding: 10px 16px; border-radius: var(--r-default); border: 1px solid transparent;
  box-shadow: var(--shadow-xs), inset var(--color-1-400) 0 6px 0px -5px, var(--color-1-700) 0 4px 10px -5px;
  cursor: pointer; text-decoration: none; transition: all 0.15s ease; box-sizing: border-box;
}
.mkt .btn:hover { text-decoration: none; }
.mkt .btn--lg { font-size: 15px; padding: 12px 24px; }
.mkt .btn--xl { font-size: 16px; padding: 14px 24px; }

.mkt .btn--brand {
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  border-color: transparent; color: var(--white);
}
.mkt .btn--brand:hover {
  background: linear-gradient(180deg, var(--brand-strong), var(--brand-strong));
  color: var(--white);
  box-shadow: var(--shadow-sm), inset var(--color-1-400) 0 6px 0px -5px, 0 4px 16px -4px rgba(108, 71, 255, 0.3);
}
.mkt .btn--brand:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--border-brand-subtle); }

.mkt .btn--secondary {
  background: var(--neutral-primary-soft); border-color: var(--border-default-medium); color: var(--heading);
}
.mkt .btn--secondary:hover { background: var(--neutral-secondary-medium); border-color: var(--border-default-strong); color: var(--heading); }
.mkt .btn--secondary:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--neutral-secondary-medium); }

.mkt .btn--ghost {
  background: transparent; border-color: transparent; color: var(--heading); box-shadow: none;
}
.mkt .btn--ghost:hover { background: var(--neutral-secondary-medium); }

/* ---- Badges --------------------------------------------- */
.mkt .badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; line-height: 1;
  padding: 4px 8px; border-radius: var(--r-default); border: 1px solid var(--border-default);
  background: var(--neutral-primary-soft); color: var(--heading);
}
.mkt .badge--pill { border-radius: var(--r-full); }
.mkt .badge--brand { background: var(--brand-softer); border-color: var(--border-brand-subtle); color: var(--fg-brand-strong); }
.mkt .badge--success { background: var(--success-soft); border-color: var(--border-success-subtle); color: var(--fg-success-strong); }
.mkt .badge__dot {
  width: 8px; height: 8px; border-radius: var(--r-full); background: var(--brand);
  animation: mkt-pulse 2s ease-in-out infinite;
}
@keyframes mkt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- Cards ---------------------------------------------- */
.mkt .card {
  background: var(--neutral-primary-soft); border: 1px solid var(--border-default);
  border-radius: var(--r-base); box-shadow: var(--shadow-xs); padding: 32px;
}
.mkt .card--feature .icon-box {
  width: 48px; height: 48px; border-radius: var(--r-default);
  background: var(--brand-softer); border: 1px solid var(--border-brand-subtle);
  color: var(--fg-brand-strong); display: grid; place-items: center; font-size: 22px;
  margin-bottom: 24px;
}
.mkt .card--feature h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; letter-spacing: 0; }
.mkt .card--feature p { color: var(--body); margin: 0; }

.mkt .card-testimonial {
  background: var(--neutral-primary-soft); border: 1px solid var(--border-default);
  border-radius: var(--r-base); padding: 32px; display: flex; flex-direction: column; gap: 24px;
}
.mkt .card-testimonial__quote { font-size: 15px; line-height: 1.7; color: var(--body); margin: 0; }
.mkt .card-testimonial__author { display: flex; align-items: center; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border-default); }
.mkt .card-testimonial__avatar {
  width: 40px; height: 40px; border-radius: var(--r-full); background: var(--brand-softer);
  color: var(--fg-brand-strong); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none;
}
.mkt .card-testimonial__name { font-size: 14px; font-weight: 500; color: var(--heading); }
.mkt .card-testimonial__role { font-size: 12px; color: var(--body-subtle); }

/* ---- Nav ------------------------------------------------ */
.mkt-nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--neutral-primary-soft) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-default); }
.mkt-nav__inner { max-width: 1200px; margin-inline: auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mkt-nav__brand { display: inline-flex; align-items: baseline; gap: 8px; font-weight: 700; color: var(--heading); font-size: 16px; }
.mkt-nav__brand:hover { text-decoration: none; }
.mkt-nav__sub { font-weight: 500; font-size: 13px; color: var(--body-subtle); }
.mkt-nav__links { display: none; gap: 28px; }
.mkt-nav__links a { color: var(--body); font-size: 14px; font-weight: 500; }
.mkt-nav__links a:hover { color: var(--heading); text-decoration: none; }
.mkt-nav__actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 900px) { .mkt-nav__links { display: flex; } }

/* ---- Hero ----------------------------------------------- */
.mkt .hero { text-align: center; padding-block: 88px 64px; position: relative; overflow: hidden; }
.mkt .hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%),
    linear-gradient(var(--border-default) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-default) 1px, transparent 1px);
  background-size: 100% 100%, 28px 28px, 28px 28px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent 80%);
          mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent 80%);
  opacity: 0.6;
}
.mkt .hero > * { position: relative; z-index: 1; }
.mkt .hero__inner { max-width: 880px; margin-inline: auto; }
.mkt .hero h1 { margin-top: 24px; }
.mkt .hero .text-lead { margin: 0 auto; }
.mkt .hero__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }

/* ---- Trust / logo bar ----------------------------------- */
.mkt .logo-bar { margin-top: 80px; padding-top: 48px; border-top: 1px solid var(--border-default); }
.mkt .logo-bar__label { font-size: 14px; color: var(--body-subtle); font-weight: 500; text-align: center; margin-bottom: 32px; }
.mkt .logo-bar__row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 32px; opacity: 0.5; transition: opacity 0.15s ease; }
.mkt .logo-bar__row:hover { opacity: 0.7; }
.mkt .logo-bar__logo { font-weight: 700; font-size: 18px; color: var(--heading); letter-spacing: -0.01em; }

/* ---- Grids ---------------------------------------------- */
.mkt .grid { display: grid; gap: 24px; }
.mkt .grid--3 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .mkt .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .mkt .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.mkt .grid--2 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .mkt .grid--2 { grid-template-columns: repeat(2, 1fr); } }

/* ---- Steps ---------------------------------------------- */
.mkt .step__num {
  width: 32px; height: 32px; border-radius: var(--r-full); background: var(--brand-softer);
  color: var(--fg-brand-strong); display: grid; place-items: center; font-weight: 700; font-size: 14px; margin-bottom: 16px;
}

/* ---- GA4 product mock (placeholder; swap for real screenshot) ---- */
.mkt .ga-mock { max-width: 920px; margin: 56px auto 0; border: 1px solid var(--border-default); border-radius: var(--r-base); box-shadow: var(--shadow-xl); overflow: hidden; background: var(--neutral-primary-soft); }
.mkt .ga-mock__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border-default); background: var(--neutral-secondary-soft); }
.mkt .ga-mock__dot { width: 10px; height: 10px; border-radius: var(--r-full); background: var(--border-default-strong); }
.mkt .ga-mock__title { margin-left: 8px; font-size: 13px; color: var(--body-subtle); }
.mkt .ga-mock__body { padding: 20px; }
.mkt .ga-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px; border-bottom: 1px solid var(--border-default); font-size: 14px; }
.mkt .ga-row:last-child { border-bottom: 0; }
.mkt .ga-row__name { color: var(--heading); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.mkt .ga-row__val { color: var(--body); font-variant-numeric: tabular-nums; }
.mkt .ga-row--hl { background: var(--brand-softer); border-radius: var(--r-default); }
.mkt .ga-row--hl .ga-row__name { color: var(--fg-brand-strong); }

/* ---- Pricing -------------------------------------------- */
.mkt .pricing-grid { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .mkt .pricing-grid { grid-template-columns: repeat(3, 1fr); } }
.mkt .price-card { display: flex; flex-direction: column; gap: 20px; }
.mkt .price-card--featured { border-color: var(--border-brand-subtle); box-shadow: var(--shadow-lg); position: relative; }
.mkt .price-card__name { font-size: 18px; font-weight: 700; color: var(--heading); display: flex; align-items: center; gap: 8px; }
.mkt .price-card__price { display: flex; align-items: baseline; gap: 8px; }
.mkt .price-card__retail { color: var(--body-subtle); text-decoration: line-through; font-size: 18px; }
.mkt .price-card__amount { font-size: 40px; font-weight: 700; color: var(--heading); letter-spacing: -1px; }
.mkt .price-card__per { font-size: 14px; color: var(--body-subtle); }
.mkt .price-card__special { font-size: 12px; font-weight: 600; color: var(--fg-brand-strong); }
.mkt .price-card__blurb { color: var(--body); font-size: 14px; margin: 0; }
.mkt .price-card .btn { width: 100%; margin-top: auto; }

/* ---- FAQ ------------------------------------------------ */
.mkt .faq { max-width: 760px; margin-inline: auto; }
.mkt .faq__item { padding: 24px 0; border-bottom: 1px solid var(--border-default); }
.mkt .faq__item:first-child { border-top: 1px solid var(--border-default); }
.mkt .faq__q { font-size: 18px; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.mkt .faq__a { color: var(--body); margin: 0; }

/* ---- Final CTA band ------------------------------------- */
.mkt .cta-band { text-align: center; }
.mkt .cta-band__inner { background: var(--dark); border-radius: var(--r-base); padding: 64px 32px; box-shadow: var(--shadow-lg); }
.mkt .cta-band__inner h2 { color: var(--white); }
.mkt .cta-band__inner .text-lead { color: color-mix(in srgb, var(--white) 80%, transparent); margin: 16px auto 0; }
.mkt .cta-band__cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---- Footer --------------------------------------------- */
.mkt-footer { border-top: 1px solid var(--border-default); background: var(--neutral-secondary-soft); }
.mkt-footer__inner { max-width: 1200px; margin-inline: auto; padding: 40px 24px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.mkt-footer__brand { font-weight: 700; color: var(--heading); }
.mkt-footer__links { display: flex; flex-wrap: wrap; gap: 24px; }
.mkt-footer__links a { color: var(--body); font-size: 14px; font-weight: 500; }
.mkt-footer__links a:hover { color: var(--heading); text-decoration: none; }

/* ---- Utilities ------------------------------------------ */
.mkt .check { color: var(--fg-success-strong); display: inline-flex; align-items: center; gap: 8px; }
.mkt .feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mkt .feature-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--body); }
.mkt .feature-list svg { flex: none; margin-top: 2px; color: var(--fg-success-strong); }
