/* ══════════════════════════════════════════════════════════════════
   CaratOS Marketing Theme — shared across all public marketing pages.

   Differentiation note: karatos.in (direct trademark-dispute competitor)
   uses cream+gold+serif in light mode and black+gold in dark mode. This
   theme deliberately avoids gold entirely — graphite/ink base, emerald
   accent (already the app's own "active/success" semantic color, see
   css/styles.css --emerald), bold geometric sans display type instead of
   a delicate serif, and floating real-product UI cards instead of
   abstract badges/line-art.
   ══════════════════════════════════════════════════════════════════ */

:root, body.mkt[data-theme="light"] {
  --mkt-ink: #ffffff;
  --mkt-surface: #f6f6f3;
  --mkt-surface-2: #edece7;
  --mkt-border: rgba(20, 17, 10, 0.12);
  --mkt-text: #14110a;
  --mkt-text-dim: #66604f;
  --mkt-accent: #059669;
  --mkt-accent-dim: rgba(5, 150, 105, 0.10);
  --mkt-accent-ink: #ffffff;
  --mkt-radius: 14px;
  --mkt-radius-lg: 22px;
  --mkt-font-display: 'Inter', -apple-system, sans-serif;

  /* Repoint the shared semantic tokens (css/styles.css) that existing
     marketing pages already build on (var(--background), var(--primary),
     var(--surface-container-low), etc.) so every page that already uses
     those tokens re-skins for free, without rewriting its structure.
     The app dashboard's own styles.css light/dark toggle is untouched —
     this override only applies where marketing-theme.css is loaded. */
  --background: var(--mkt-ink);
  --on-background: var(--mkt-text);
  --surface-container-lowest: var(--mkt-ink);
  --surface-container-low: var(--mkt-surface);
  --surface-container: var(--mkt-surface-2);
  --surface: var(--mkt-surface);
  --on-surface: var(--mkt-text);
  --on-surface-variant: var(--mkt-text-dim);
  --outline: var(--mkt-border);
  --primary: var(--mkt-accent);
  --on-primary: var(--mkt-accent-ink);
  --gold: var(--mkt-accent);
  --emerald: var(--mkt-accent);
  --emerald-dim: var(--mkt-accent-dim);
}

/* Dark mode — opt-in via the toggle, not the default anymore. Same
   graphite/emerald direction as before, just no longer the default state. */
body.mkt[data-theme="dark"] {
  --mkt-ink: #100e0a;
  --mkt-surface: #17140f;
  --mkt-surface-2: #1e1a14;
  --mkt-border: rgba(255, 255, 255, 0.10);
  --mkt-text: #f5f3ee;
  --mkt-text-dim: #a8a196;
  --mkt-accent: #34d399;
  --mkt-accent-dim: rgba(52, 211, 153, 0.14);
  --mkt-accent-ink: #052e1f;

  --background: var(--mkt-ink);
  --on-background: var(--mkt-text);
  --surface-container-lowest: var(--mkt-ink);
  --surface-container-low: var(--mkt-surface);
  --surface-container: var(--mkt-surface-2);
  --surface: var(--mkt-surface);
  --on-surface: var(--mkt-text);
  --on-surface-variant: var(--mkt-text-dim);
  --outline: var(--mkt-border);
  --primary: var(--mkt-accent);
  --on-primary: var(--mkt-accent-ink);
  --gold: var(--mkt-accent);
  --emerald: var(--mkt-accent);
  --emerald-dim: var(--mkt-accent-dim);
}

/* ── Theme toggle button ── */
.mkt-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--mkt-border);
  background: transparent;
  color: var(--mkt-text);
  cursor: pointer;
  margin-right: 4px;
  flex-shrink: 0;
}
.mkt-theme-toggle:hover { border-color: var(--mkt-text-dim); }
.mkt-theme-toggle .material-symbols-outlined { font-size: 19px; }
body.mkt[data-theme="dark"] .mkt-theme-toggle .mkt-theme-toggle__icon-dark,
body.mkt:not([data-theme="dark"]) .mkt-theme-toggle .mkt-theme-toggle__icon-light { display: none; }

/* Headings stay Playfair Display serif (reverted -- the bold sans swap
   didn't land well). Differentiation from KaratOS comes from the
   graphite/light + emerald palette and floating product-UI mockups,
   not from abandoning the serif. */
body.mkt h1, body.mkt h2, body.mkt h3, body.mkt .lp-hero h1,
body.mkt [style*="Playfair"] {
  font-family: 'Playfair Display', serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

body.mkt {
  background: var(--mkt-ink);
  color: var(--mkt-text);
  font-family: 'Inter', -apple-system, sans-serif;
}

/* CTA buttons (.lp-primary-btn / .lp-ghost-btn) are duplicated inline
   across several marketing pages (landing/blog/gst-billing/retail-gold/
   guides -- all near-identical page templates) with non-standard weight
   values (750/800/850) and a font-size that falls to 12px on mobile via
   the shared app .btn rule -- below the 16px minimum for readable mobile
   CTA text and too small for a comfortable touch target. Normalized here,
   once, for every page; !important matches this file's existing pattern
   for overriding those per-page inline blocks. */
body.mkt .lp-primary-btn,
body.mkt .lp-ghost-btn {
  font-size: 15px !important;
  font-weight: 700 !important;
  min-height: 48px;
}
@media (max-width: 760px) {
  body.mkt .lp-primary-btn,
  body.mkt .lp-ghost-btn {
    font-size: 16px !important;
    padding: 14px 22px !important;
  }
}

/* :where() keeps this at zero specificity so it only affects plain inline
   text links (nav items, footer links, body copy). Without :where(), the
   type+class combo "body.mkt a" (specificity 0,1,1) was silently beating
   every single-class button color rule across every marketing page --
   .lp-primary-btn, .lp-ghost-btn, .pr-plan__cta, .pr-final-cta -- all of
   which declare a single class selector (0,1,0). Every CTA button on the
   site was rendering with the same dark ink body-text color instead of
   its own intended (usually white) text, regardless of its background. */
:where(body.mkt a) { color: inherit; }

.mkt-display {
  font-family: var(--mkt-font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--mkt-text);
}

.mkt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mkt-accent);
}
.mkt-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mkt-accent);
  box-shadow: 0 0 0 4px var(--mkt-accent-dim);
}

/* ── Nav ── */
.mkt-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: color-mix(in srgb, var(--mkt-ink) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--mkt-border);
}
.mkt-nav__logo {
  font-family: var(--mkt-font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--mkt-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mkt-nav__logo .mkt-nav__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--mkt-accent);
  box-shadow: 0 0 0 5px var(--mkt-accent-dim);
}
.mkt-nav__logo .mkt-nav__gem { width: 18px; height: 18px; color: var(--mkt-text); flex-shrink: 0; }
.mkt-nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.mkt-nav__links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--mkt-text-dim);
  text-decoration: none;
  transition: color 150ms ease;
}
.mkt-nav__links a:hover,
.mkt-nav__links a.is-active { color: var(--mkt-text); }
.mkt-nav__links a.mkt-nav__cta {
  color: var(--mkt-accent-ink);
  background: var(--mkt-accent);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
}
.mkt-nav__links a.mkt-nav__cta:hover { filter: brightness(1.08); }
.mkt-nav__menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--mkt-border);
  border-radius: 10px;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--mkt-text);
  cursor: pointer;
}

.mkt-nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: var(--mkt-ink);
  padding: 88px 28px 28px;
  flex-direction: column;
  gap: 4px;
}
.mkt-nav__mobile.is-open { display: flex; }
.mkt-nav__mobile a {
  padding: 16px 4px;
  font-size: 18px;
  font-weight: 600;
  color: var(--mkt-text);
  text-decoration: none;
  border-bottom: 1px solid var(--mkt-border);
}
.mkt-nav__mobile a.mkt-nav__cta {
  margin-top: 16px;
  text-align: center;
  background: var(--mkt-accent);
  color: var(--mkt-accent-ink);
  border-radius: 999px;
  border-bottom: none;
}

@media (max-width: 860px) {
  .mkt-nav__links { display: none; }
  .mkt-nav__menu-btn { display: inline-flex; }
}

/* ── Hero ── */
.mkt-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 88px 24px 40px;
}
.mkt-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.mkt-hero h1 { font-size: clamp(36px, 5vw, 56px); margin: 18px 0 20px; }
.mkt-hero p.mkt-hero__sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--mkt-text-dim);
  max-width: 46ch;
  margin-bottom: 28px;
}
@media (max-width: 900px) {
  .mkt-hero__grid { grid-template-columns: 1fr; }
}

/* ── Floating UI card stack (the KaratOS-differentiating hero device) ── */
.mkt-float-stack {
  position: relative;
  min-height: 360px;
}
.mkt-float-card {
  position: absolute;
  background: var(--mkt-surface);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55);
  padding: 16px 18px;
}
.mkt-float-card--1 { top: 0; left: 6%; width: 78%; transform: rotate(-2.5deg); z-index: 3; }
.mkt-float-card--2 { top: 34%; right: 0; width: 62%; transform: rotate(3deg); z-index: 2; }
.mkt-float-card--3 { bottom: 0; left: 0; width: 58%; transform: rotate(-4deg); z-index: 1; }
.mkt-float-card__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mkt-text-dim); margin-bottom: 8px; font-weight: 700; }
.mkt-float-card__value { font-family: var(--mkt-font-display); font-weight: 800; font-size: 24px; color: var(--mkt-text); }
.mkt-float-card__delta { font-size: 12px; color: var(--mkt-accent); margin-top: 4px; }
.mkt-float-card__chat { display: flex; flex-direction: column; gap: 8px; }
.mkt-float-card__bubble { background: var(--mkt-surface-2); border-radius: 12px; padding: 8px 12px; font-size: 13px; color: var(--mkt-text); max-width: 90%; }
.mkt-float-card__bubble--accent { background: var(--mkt-accent-dim); color: var(--mkt-accent); align-self: flex-end; }

@media (prefers-reduced-motion: no-preference) {
  .mkt-float-card { animation: mkt-float 6s ease-in-out infinite; }
  .mkt-float-card--2 { animation-delay: -2s; }
  .mkt-float-card--3 { animation-delay: -4s; }
}
@keyframes mkt-float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-8px) rotate(var(--r, 0deg)); }
}
.mkt-float-card--1 { --r: -2.5deg; }
.mkt-float-card--2 { --r: 3deg; }
.mkt-float-card--3 { --r: -4deg; }

/* ── Buttons ── */
.mkt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease;
  cursor: pointer;
  border: none;
}
.mkt-btn:hover { transform: translateY(-1px); }
.mkt-btn--primary { background: var(--mkt-accent); color: var(--mkt-accent-ink); }
.mkt-btn--primary:hover { filter: brightness(1.08); }
.mkt-btn--ghost { background: transparent; color: var(--mkt-text); border: 1px solid var(--mkt-border); }
.mkt-btn--ghost:hover { border-color: var(--mkt-text-dim); }

/* ── Sections, cards, content pages ── */
.mkt-section { max-width: 1024px; margin: 0 auto; padding: 64px 24px; }
.mkt-section--narrow { max-width: 760px; }
.mkt-section h2 { font-size: clamp(26px, 3.5vw, 34px); margin-bottom: 12px; }
.mkt-section__sub { color: var(--mkt-text-dim); font-size: 15.5px; max-width: 56ch; margin-bottom: 36px; }

.mkt-card {
  background: var(--mkt-surface);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
  padding: 22px;
}
.mkt-card h4 { color: var(--mkt-text); font-size: 15.5px; margin: 10px 0 4px; }
.mkt-card p { color: var(--mkt-text-dim); font-size: 13.5px; line-height: 1.55; margin: 0; }
.mkt-card .material-symbols-outlined { color: var(--mkt-accent); font-size: 22px; }

.mkt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.mkt-faq details {
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
  background: var(--mkt-surface);
  overflow: hidden;
  margin-bottom: 10px;
}
.mkt-faq summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--mkt-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mkt-faq summary::-webkit-details-marker { display: none; }
.mkt-faq summary .material-symbols-outlined { transition: transform 200ms ease; color: var(--mkt-text-dim); flex-shrink: 0; }
.mkt-faq details[open] summary .material-symbols-outlined { transform: rotate(180deg); }
.mkt-faq__answer { padding: 0 20px 18px; font-size: 14.5px; color: var(--mkt-text-dim); line-height: 1.65; }

/* Plain content pages (about/contact/security/etc) that used to be .lg-wrap */
.mkt-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.mkt-page h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.mkt-page p { color: var(--mkt-text-dim); font-size: 15.5px; line-height: 1.7; }
.mkt-page h2 { font-size: 22px; margin: 36px 0 12px; color: var(--mkt-text); }
.mkt-page ul, .mkt-page ol { color: var(--mkt-text-dim); font-size: 15px; line-height: 1.8; padding-left: 20px; }
.mkt-page a { color: var(--mkt-accent); }

.mkt-footer-links { max-width: 1024px; margin: 40px auto 80px; padding: 0 24px; display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.mkt-footer-links a { font-size: 13.5px; color: var(--mkt-text-dim); text-decoration: none; }
.mkt-footer-links a:hover { color: var(--mkt-text); }

.mkt-trust-strip {
  max-width: 1024px; margin: 0 auto; padding: 8px 24px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px;
}
.mkt-trust-item { text-align: center; }
.mkt-trust-item .material-symbols-outlined { color: var(--mkt-accent); font-size: 22px; margin-bottom: 6px; }
.mkt-trust-item__label { font-size: 12.5px; color: var(--mkt-text-dim); line-height: 1.4; }
