/* ============================================================================
   The commercial pathway: one button, one field, one tap target.

   Loaded by page/marketing_base.html, so it reaches every page a prospect can
   land on except the apex (home_modern.html extends layouts/base.html with its
   own `.eqx` system and never loads marketing.css either).

   WHY THIS FILE EXISTS, AND WHY IT IS NOT marketing.css
   -----------------------------------------------------
   Measured on 2026-11-27, a prospect crossed SIX primary-button treatments,
   five radii and two cases between `/` and the first app screen, and two of
   those treatments failed WCAG AA:

       pricing cards     38px tall, 3.68:1   <- the only self-serve door
       marketing nav     42px, UPPERCASE, 3.66:1
       .btn-cta          58px, UPPERCASE, 3.66:1 (purple ink on white)
       signup            48px, 6.70:1        <- the one that was right
       wizard            37px, UPPERCASE, 3.68:1
       login             44px, 11.63:1

   `marketing.css` defines `.marketing-*` and two bespoke CTAs but NO `.btn`
   base at all, which is why the money button fell through to whatever the app
   shell happened to be painting that week. It is also held by another agent
   (static/styles/** is off limits in this change), so the component layer
   lands here instead and overrides by scope rather than by `!important`.

   CASCADE — the one thing to understand before editing
   ----------------------------------------------------
   layouts/base.html loads, in order:
       :79  styles/main.css
       :88  {% block style %}   <- marketing.css, then THIS FILE
       :91  styles/background-override.css
       :97  styles/app-shell.css        <- declares bare `.btn`, `.btn-primary`
       :101 styles/dashboard-common.css

   So a marketing stylesheet is loaded BEFORE the app shell and a bare `.btn`
   rule here would lose. Every component rule below is therefore scoped to
   `body.marketing-page` (0,2,0 against the shell's 0,1,0). That is deliberate
   and must survive any tidy-up: unscope a rule and the app shell silently
   takes the button back. It also means no `!important` is needed except where
   marketing.css already used one (`.btn-demo-nav`'s colour and padding).

   COLOUR — purple stays, the action does not
   -------------------------------------------
   Marketing keeps its purple identity: the hero band, section accents, card
   icons and the ink on `.btn-cta` are all still #667eea/#764ba2. What changed
   is the PRIMARY ACTION, which is now the same #1d4ed8 the homepage hero,
   /signup/ and the app already use. The point of the convergence is that the
   button a prospect presses looks identical on /pricing/ and on /signup/ —
   it is not a repaint of the brand.

   Every colour pair below is annotated with its measured contrast. Nothing in
   this file is allowed under 4.5:1 for text.
   ========================================================================== */

body.marketing-page {
  /* The one source for the funnel button. Changing these four values
     restyles every CTA on all thirteen marketing pages. */
  --mk-action:#1d4ed8;        /* white on this = 6.70:1 */
  --mk-action-hover:#1a45c8;  /* white on this = 7.69:1 */
  --mk-action-ink:#1d4ed8;    /* as text on white = 6.70:1 */
  /* The identity purple is retired (owner's decision, 2026-11-29): four
     directions were built as real pages and the category standard won, so
     marketing uses the product's own accent and carries no second brand
     colour. Both tokens now alias the action blue, which means every call
     site keeps working and nothing can quietly reintroduce the purple by
     reading --mk-brand. */
  --mk-brand:var(--mk-action);
  --mk-brand-ink:var(--mk-action-ink);

  /* ---- INK vs FILL, the distinction this file already made for buttons ----
     Added 2026-11-28 after an external scan of the LIVE site found the same
     two literals failing as TEXT on 40 painted elements across / , /pricing/
     and /compare/. The hex is not the problem; the JOB is. #667eea behind
     white text and #667eea as a gradient stop are fine and stay. #667eea
     *as words on white* is 3.66:1 and never was.

     Light surfaces (white, #f8f9fa, the #f0f2fd tint): go DARKER.
     The #0f172a footer: go LIGHTER. Darkening #718096 there would have
     taken it from 4.45:1 to 3.29:1 — the same mistake in the other
     direction, which is why these are three tokens and not one. */
  --mk-ink-brand:#4f5fc4;     /* brand purple AS WORDS on white = 5.58:1.
                                 Hue is +2.7° from --mk-brand; --mk-brand-ink
                                 is +17.3° and stays on .btn-cta, where a
                                 heavy pill label can carry the extra weight. */
  --mk-ink-muted:#5f6b7a;     /* secondary text on white 5.43:1, on #f8f9fa 5.15:1 */
  --mk-ink-muted-dk:#94a3b8;  /* secondary text ON THE DARK FOOTER = 6.96:1 on
                                 #0f172a. Already the value .footer-tagline
                                 uses, so this names an existing choice
                                 rather than adding a colour. */
  --mk-radius:12px;
  --mk-tap:48px;              /* primary; secondary controls use 44px */
  --mk-ring:0 0 0 3px rgba(37,99,235,.45);
}

/* ---- 1. The button -------------------------------------------------------
   One geometry for every CTA class marketing uses: Bootstrap's .btn (the
   pricing cards), .btn-cta (the closing bands), .btn-demo-nav (the nav pill)
   and .marketing-form .btn-submit. Sentence case, 12px, 48px, visible focus. */
body.marketing-page .btn,
body.marketing-page .btn-cta,
body.marketing-page .btn-demo-nav,
body.marketing-page .marketing-form .btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: var(--mk-tap);
  padding: .75rem 1.4rem;
  border-radius: var(--mk-radius);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-transform: none;      /* was UPPERCASE on three of the four */
  letter-spacing: normal;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .18s ease, box-shadow .2s ease, transform .15s ease;
}

body.marketing-page .btn:focus-visible,
body.marketing-page .btn-cta:focus-visible,
body.marketing-page .btn-demo-nav:focus-visible,
body.marketing-page .marketing-form .btn-submit:focus-visible,
body.marketing-page .marketing-nav .nav-link:focus-visible {
  outline: 2px solid var(--mk-action);
  outline-offset: 2px;
  box-shadow: var(--mk-ring);
}

/* -- primary: the action. 6.70:1 ------------------------------------------ */
body.marketing-page .btn-primary,
body.marketing-page .btn-demo-nav.is-primary,
body.marketing-page .marketing-form .btn-submit {
  background: var(--mk-action);
  background-image: none;    /* beats the app shell's gradient, whose light
                                end (#3b82f6) is 3.68:1 — below AA */
  border-color: var(--mk-action);
  /* !important because marketing.css:102 sets `color: white !important` on
     .btn-demo-nav, so the secondary rule below has to carry !important too
     and would otherwise paint this blue-on-blue (1.0:1). */
  color: #fff !important;
  box-shadow: 0 8px 18px -10px rgba(29,78,216,.7);
}
body.marketing-page .btn-primary:hover,
body.marketing-page .btn-primary:focus,
body.marketing-page .btn-demo-nav.is-primary:hover,
body.marketing-page .marketing-form .btn-submit:hover {
  background: var(--mk-action-hover);
  border-color: var(--mk-action-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgba(29,78,216,.75);
}

/* -- secondary: the quote / demo asks. 6.70:1 ink on white ---------------- */
body.marketing-page .btn-secondary,
body.marketing-page .btn-outline-primary,
body.marketing-page .btn-demo-nav:not(.is-primary) {
  background: #fff;
  background-image: none;
  border-color: var(--mk-action);
  color: var(--mk-action-ink) !important;  /* .btn-demo-nav sets colour !important */
  box-shadow: none;
}
body.marketing-page .btn-secondary:hover,
body.marketing-page .btn-outline-primary:hover,
body.marketing-page .btn-demo-nav:not(.is-primary):hover {
  background: #eef3fe;
  border-color: var(--mk-action-hover);
  color: var(--mk-action-hover) !important;
  transform: translateY(-1px);
  box-shadow: none;
}
body.marketing-page .btn-demo-nav.is-primary:hover {
  background: var(--mk-action-hover);
  border-color: var(--mk-action-hover);
}

/* marketing.css sets `padding: 10px 24px !important` on the nav pill. */
body.marketing-page .btn-demo-nav {
  padding: .6rem 1.1rem !important;
  min-height: 44px;
  margin-left: 8px;
}

/* -- .btn-cta: the closing band, which sits ON the purple gradient --------
   White fill with the identity purple darkened from #667eea (3.66:1 — fails)
   to #4c3fb8 (7.75:1). The band stays purple; only the ink moved. */
body.marketing-page .btn-cta {
  background: #fff;
  color: var(--mk-brand-ink);
  border-color: #fff;
  box-shadow: 0 8px 20px -10px rgba(0,0,0,.35);
}
body.marketing-page .btn-cta:hover {
  background: #f4f2ff;
  color: var(--mk-brand-ink);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.4);
}

/* A second, quieter action beside .btn-cta on the same purple band. */
body.marketing-page .btn-cta-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.65);
}
body.marketing-page .btn-cta-ghost:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-color: #fff;
}

/* A `.btn` with no variant class still has to be a button, not bare text. */
body.marketing-page .btn:not([class*="btn-"]) {
  background: #fff;
  border-color: #cbd5e1;
  color: #1f2937;
}

/* ---- 2. Fields -----------------------------------------------------------
   16px is not a type choice. Below it, iOS Safari zooms the page on focus and
   leaves it zoomed — the same rule onboarding/_anon_base.html documents and
   the rest of the funnel never inherited. 44px is the tap-target floor. */
body.marketing-page .form-control,
body.marketing-page .marketing-form .form-control,
body.marketing-page input[type=text],
body.marketing-page input[type=email],
body.marketing-page input[type=tel],
body.marketing-page input[type=number],
body.marketing-page select,
body.marketing-page textarea {
  font-size: 1rem;
  min-height: 44px;
  border-radius: 10px;
}
body.marketing-page textarea {
  min-height: 7rem;
}
body.marketing-page .form-control:focus,
body.marketing-page .marketing-form .form-control:focus {
  border-color: var(--mk-action);
  box-shadow: var(--mk-ring);
  outline: none;
}
/* The spam honeypots are off-screen and must stay untouchable. */
body.marketing-page input[name=website],
body.marketing-page .form-hp input {
  min-height: 0;
}

/* ---- 3. Navigation at phone width ---------------------------------------
   The collapsed Bootstrap menu rendered 39px rows and carried no route to
   signup. Both are fixed here rather than in the template so all thirteen
   pages get it from one place. */
body.marketing-page .navbar-toggler {
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
}
body.marketing-page .navbar-toggler:focus-visible {
  outline: 2px solid var(--mk-action);
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  body.marketing-page .marketing-nav .navbar-nav {
    padding: .5rem 0 .75rem;
  }
  body.marketing-page .marketing-nav .nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .5rem .25rem;
  }
  body.marketing-page .marketing-nav .nav-item {
    width: 100%;
  }
  /* Stacked, the two CTAs are full-width rows, not inline pills. */
  body.marketing-page .btn-demo-nav {
    display: flex;
    width: 100%;
    margin: .4rem 0 0;
  }
}

/* ---- 4. Phone gutter and overflow ----------------------------------------
   16px each side, and nothing may push the document wider than the viewport. */
@media (max-width: 575.98px) {
  body.marketing-page .container,
  body.marketing-page .container-fluid {
    padding-left: 16px;
    padding-right: 16px;
  }
  body.marketing-page {
    overflow-x: hidden;
  }
  /* A CTA alone on a line reads better full-width than centred and narrow. */
  body.marketing-page .btn-cta,
  body.marketing-page .marketing-form .btn-submit {
    display: flex;
    width: 100%;
  }
}

/* ---- 5. Footer links -----------------------------------------------------
   Measured 101x39 at 390px — under the 44px floor, on every marketing page. */
body.marketing-page .footer-action-link,
body.marketing-page .footer-legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* The one footer entry that is an action rather than a destination. */
body.marketing-page .footer-start-free {
  font-weight: 700;
  color: #93b4ff;
}
body.marketing-page .footer-start-free:hover {
  color: #fff;
}

/* ---- 6. Print ------------------------------------------------------------
   A prospect printing the price list should not get white-on-white CTAs. */
@media print {
  body.marketing-page .btn,
  body.marketing-page .btn-cta,
  body.marketing-page .btn-demo-nav {
    background: none !important;
    color: #1d4ed8 !important;
    border: 1px solid #1d4ed8 !important;
    box-shadow: none !important;
  }
}
