/* ============================================================================
   EstimateNext — Public marketing site · "THE MEASURED SHEET"
   ----------------------------------------------------------------------------
   The brand's shop window: landing/signup, features, pricing. Same craft-led
   language as the in-app refresh (static/css/ui_refresh.css) — ink on vellum,
   hairline rules, the dimension-line signature, Space Grotesk display, IBM Plex
   Mono tabular figures, burnt-sienna marking accent as the primary CTA.

   HEADLINE VOICE: velocity to bid — these pages lead with the outcome, the
   measured sheet is the texture beneath it.

   EVERY rule is scoped under `body.ui-refresh`. These three pages carry their
   OWN <body> (no shared base), each gates this stylesheet + the webfonts +
   the `ui-refresh` body class on the global `ui_refresh` flag (follows the
   app default / `?ui=refresh` per session). With the flag OFF the class is
   absent, this file is never linked, and the pages render byte-identically to
   today. apps/publicapi is out of scope. Prices come from template context /
   existing markup — never hardcoded here.

   Tokens mirror the in-app sheet so the marketing skin and the product read as
   one brand (re-declared locally because these pages don't load ui_refresh.css):
   ink #15181C · vellum #FBFAF6 · graphite #5C636B · rule #E4E0D8
   mark (sienna) #C45A28 · measured #2F7D5B
   ========================================================================== */

body.ui-refresh {
  --ms-ink:        #15181C;
  --ms-ink-2:      #2A2F37;
  --ms-graphite:   #5C636B;
  --ms-vellum:     #FBFAF6;
  --ms-vellum-2:   #F4F1EA;   /* recessed surface */
  --ms-paper:      #FFFFFF;   /* raised card face */
  --ms-rule:       #E4E0D8;   /* hairline / drawing border */
  --ms-rule-ink:   #C9C3B6;   /* stronger rule */
  --ms-mark:       #C45A28;   /* sienna marking accent — primary CTA */
  --ms-mark-700:   #A8481F;   /* sienna pressed */
  --ms-mark-soft:  #F6E7DD;
  --ms-measured:   #2F7D5B;   /* confirmed/included (semantic) */
  --ms-needs:      #B6852A;
  --ms-error:      #B23B3B;
  --ms-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --ms-body: "Inter", system-ui, -apple-system, sans-serif;
  --ms-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  background: var(--ms-vellum);
  color: var(--ms-ink);
  font-family: var(--ms-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv01" 1;
}

body.ui-refresh h1, body.ui-refresh h2, body.ui-refresh h3,
body.ui-refresh h4, body.ui-refresh h5, body.ui-refresh h6 {
  font-family: var(--ms-display);
  letter-spacing: -0.015em;
  color: var(--ms-ink);
}
body.ui-refresh a { color: var(--ms-mark); }
body.ui-refresh a:hover { color: var(--ms-mark-700); }

/* a reusable mono eyebrow — the QS's uppercase annotation hand */
body.ui-refresh .ms-eyebrow {
  font-family: var(--ms-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ms-graphite);
  font-weight: 500;
}

/* the dimension-line signature:  |————————————| value |————————————|
   a centred hairline capped by tick marks, used as a section divider */
body.ui-refresh .ms-dimline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  justify-content: center;
  margin: 1.1rem auto 0;
  max-width: 460px;
}
body.ui-refresh .ms-dimline::before,
body.ui-refresh .ms-dimline::after {
  content: "";
  flex: 1 1 auto;
  height: 7px;
  background: linear-gradient(var(--ms-rule-ink), var(--ms-rule-ink)) center / 100% 1.5px no-repeat;
}
body.ui-refresh .ms-dimline::before { border-left: 1.5px solid var(--ms-rule-ink); }
body.ui-refresh .ms-dimline::after  { border-right: 1.5px solid var(--ms-rule-ink); }
body.ui-refresh .ms-dimline-label {
  font-family: var(--ms-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ms-graphite);
  white-space: nowrap;
}

/* =========================================================================
   LANDING / SIGNUP  (templates/marketing/landing.html — has its own inline
   <style>; these rules override it by the higher specificity of the body
   class prefix). Left = value prop on an ink title-block; right = the form.
   ========================================================================= */

/* the split canvas → ink panel, not the blue SaaS gradient */
body.ui-refresh .en-landing {
  background: var(--ms-ink) !important;
}
body.ui-refresh .en-landing::before {
  /* drop the radial glows; a faint engineered grid does the texture */
  background:
    radial-gradient(circle at 18% 88%, rgba(196,90,40,0.10) 0%, transparent 46%) !important;
}
body.ui-refresh .en-landing-grid {
  opacity: 0.05 !important;
  background-image:
    linear-gradient(rgba(228,224,216,.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(228,224,216,.6) 1px, transparent 1px) !important;
  background-size: 44px 44px !important;
}

/* left value-prop column */
body.ui-refresh .en-logo {
  font-family: var(--ms-display) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  color: #FBFAF6 !important;
}
body.ui-refresh .en-logo i { color: var(--ms-mark) !important; }

body.ui-refresh .en-left h1 {
  font-family: var(--ms-display) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  color: #FBFAF6 !important;
}
/* the highlighted clause is marked in sienna, like a redline */
body.ui-refresh .en-left h1 span { color: var(--ms-mark) !important; }
body.ui-refresh .en-left-sub { color: rgba(251,250,246,0.72) !important; }

/* feature list → squared sienna ticks */
body.ui-refresh .en-features-list li { color: rgba(251,250,246,0.84) !important; }
body.ui-refresh .en-features-list li i { color: var(--ms-mark) !important; }

/* trust strip = measured figures in mono tabular, a row off a tally sheet */
body.ui-refresh .en-trust {
  border-top: 1px solid #2A2F37;
  padding-top: 1.4rem;
}
body.ui-refresh .en-trust-item { color: rgba(251,250,246,0.5) !important; }
body.ui-refresh .en-trust-item strong {
  font-family: var(--ms-mono) !important;
  font-weight: 600 !important;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
  color: #FBFAF6 !important;
}

/* right form panel → vellum paper, hairline edge instead of the soft shadow */
body.ui-refresh .en-right {
  background: var(--ms-paper) !important;
  box-shadow: none !important;
  border-left: 1px solid var(--ms-rule) !important;
}
body.ui-refresh .en-form-header h2 {
  font-family: var(--ms-display) !important;
  font-weight: 600 !important;
  color: var(--ms-ink) !important;
}
body.ui-refresh .en-form-header p {
  font-family: var(--ms-mono) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ms-graphite) !important;
}
body.ui-refresh .en-right .form-label {
  font-family: var(--ms-mono) !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ms-graphite) !important;
  font-weight: 500 !important;
}
body.ui-refresh .en-right .form-control {
  border-radius: 2px !important;
  border: 1px solid var(--ms-rule-ink) !important;
  background: var(--ms-vellum) !important;
  color: var(--ms-ink) !important;
}
body.ui-refresh .en-right .form-control:focus {
  border-color: var(--ms-mark) !important;
  background: var(--ms-paper) !important;
  box-shadow: 0 0 0 3px rgba(196,90,40,0.12) !important;
}

/* primary CTA = the marking accent */
body.ui-refresh .en-btn-signup {
  background: var(--ms-mark) !important;
  color: #fff !important;
  border-radius: 2px !important;
  font-family: var(--ms-display) !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
}
body.ui-refresh .en-btn-signup:hover { background: var(--ms-mark-700) !important; }

/* GC / Trade-Sub selector cards → square title-block tiles */
body.ui-refresh .en-mode-card {
  border: 1px solid var(--ms-rule-ink) !important;
  border-radius: 2px !important;
}
body.ui-refresh .en-mode-card:hover { border-color: var(--ms-mark) !important; }
body.ui-refresh .btn-check:checked + .en-mode-card {
  background: var(--ms-mark-soft) !important;
  border-color: var(--ms-mark) !important;
  color: var(--ms-mark) !important;
}
body.ui-refresh .en-mode-card strong { font-family: var(--ms-display); }

body.ui-refresh .en-login-link a {
  color: var(--ms-mark) !important;
  font-weight: 600;
}
body.ui-refresh .en-footer-note { color: var(--ms-graphite) !important; }

/* keep the form-error alert legible on vellum */
body.ui-refresh .en-right .alert-danger {
  border-radius: 2px !important;
  border: 1px solid var(--ms-error) !important;
  background: #FBEDED !important;
  color: var(--ms-error) !important;
}

/* =========================================================================
   SHARED CHROME for features + pricing (navbar + footer)
   ========================================================================= */
body.ui-refresh .navbar {
  background: var(--ms-ink) !important;
  border-bottom: 1px solid #2A2F37;
}
body.ui-refresh .navbar .en-brand,
body.ui-refresh .navbar .navbar-brand {
  font-family: var(--ms-display) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  color: #FBFAF6 !important;
}
/* ghost-on-ink nav buttons */
body.ui-refresh .navbar .btn-outline-light {
  border: 1px solid #343A43 !important;
  color: #EDEAE3 !important;
  border-radius: 2px !important;
  font-family: var(--ms-mono);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}
body.ui-refresh .navbar .btn-outline-light:hover {
  border-color: var(--ms-mark) !important;
  color: #fff !important;
  background: transparent !important;
}
/* the "Get Started" warning button → the sienna primary CTA */
body.ui-refresh .navbar .btn-warning {
  background: var(--ms-mark) !important;
  border-color: var(--ms-mark) !important;
  color: #fff !important;
  border-radius: 2px !important;
  font-family: var(--ms-display) !important;
  font-weight: 500 !important;
}
body.ui-refresh .navbar .btn-warning:hover {
  background: var(--ms-mark-700) !important;
  border-color: var(--ms-mark-700) !important;
}

body.ui-refresh footer { background: var(--ms-vellum); }
body.ui-refresh footer.border-top { border-top: 1px solid var(--ms-rule) !important; }
body.ui-refresh footer .text-muted {
  font-family: var(--ms-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ms-graphite) !important;
}

/* =========================================================================
   FEATURES  (templates/marketing/features.html)
   ========================================================================= */
body.ui-refresh section { background: var(--ms-vellum); }

body.ui-refresh section > .container > h1 {
  font-family: var(--ms-display) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  color: var(--ms-ink) !important;
}

/* feature cards → title-block panels: hairline frame, ink top-rule, sienna on
   hover, squared icon plate. (matches the in-app .en-kpi treatment) */
body.ui-refresh .en-feature-card {
  background: var(--ms-paper) !important;
  border: 1px solid var(--ms-rule) !important;
  border-top: 2px solid var(--ms-ink) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  height: 100%;
  transition: border-color .15s, transform .15s;
}
body.ui-refresh .en-feature-card:hover {
  border-top-color: var(--ms-mark) !important;
  transform: translateY(-2px);
  box-shadow: none !important;
}
body.ui-refresh .en-feature-card i {
  color: var(--ms-mark) !important;
}
body.ui-refresh .en-feature-card h5 {
  font-family: var(--ms-display) !important;
  font-weight: 600 !important;
  color: var(--ms-ink) !important;
}
body.ui-refresh .en-feature-card p { color: var(--ms-graphite) !important; }

/* =========================================================================
   PRICING  (templates/marketing/pricing.html)
   Figures are the hero — every price is mono tabular. The "Popular" plan is
   the marked-up column (sienna top-rule). Prices stay in the template markup.
   ========================================================================= */
body.ui-refresh .en-card {
  background: var(--ms-paper) !important;
  border: 1px solid var(--ms-rule) !important;
  border-top: 2px solid var(--ms-ink) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}
/* the highlighted (border-primary) plan → the marked column */
body.ui-refresh .en-card.border-primary {
  border: 1px solid var(--ms-rule) !important;
  border-top: 3px solid var(--ms-mark) !important;
  box-shadow: 0 0 0 1px var(--ms-mark-soft) !important;
}
body.ui-refresh .en-card h5 {
  font-family: var(--ms-display) !important;
  font-weight: 600 !important;
  color: var(--ms-ink) !important;
}
/* the price figure — IBM Plex Mono, tabular, ink */
body.ui-refresh .en-card .display-6 {
  font-family: var(--ms-mono) !important;
  font-weight: 600 !important;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.02em;
  color: var(--ms-ink) !important;
}
body.ui-refresh .en-card .display-6 + .text-muted,
body.ui-refresh .en-card .my-3 .text-muted {
  font-family: var(--ms-mono) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ms-graphite) !important;
}
/* plan feature lists: sienna-on-paper check = included; muted x = excluded */
body.ui-refresh .en-card ul li { color: var(--ms-ink) !important; }
body.ui-refresh .en-card ul li.text-muted { color: var(--ms-graphite) !important; }
body.ui-refresh .en-card ul li .bi-check-circle,
body.ui-refresh .en-card ul li .text-success { color: var(--ms-measured) !important; }
body.ui-refresh .en-card ul li .bi-x-circle { color: var(--ms-rule-ink) !important; }

/* the "Popular" pill */
body.ui-refresh .en-badge {
  border-radius: 2px !important;
  font-family: var(--ms-mono) !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
body.ui-refresh .en-badge-uploaded {
  background: var(--ms-mark-soft) !important;
  color: var(--ms-mark) !important;
}

/* plan CTAs */
body.ui-refresh .en-card .btn-en-primary,
body.ui-refresh .en-card .btn-primary {
  background: var(--ms-mark) !important;
  border-color: var(--ms-mark) !important;
  color: #fff !important;
  border-radius: 2px !important;
  font-family: var(--ms-display) !important;
  font-weight: 500 !important;
}
body.ui-refresh .en-card .btn-en-primary:hover,
body.ui-refresh .en-card .btn-primary:hover {
  background: var(--ms-mark-700) !important;
  border-color: var(--ms-mark-700) !important;
}
body.ui-refresh .en-card .btn-en-secondary {
  border-radius: 2px !important;
  border: 1px solid var(--ms-rule-ink) !important;
  background: var(--ms-paper) !important;
  color: var(--ms-ink) !important;
  font-family: var(--ms-display) !important;
  font-weight: 500 !important;
}
body.ui-refresh .en-card .btn-en-secondary:hover {
  background: var(--ms-ink) !important;
  border-color: var(--ms-ink) !important;
  color: #fff !important;
}

/* pricing intro subline → mono annotation */
body.ui-refresh section > .container > p.text-muted {
  font-family: var(--ms-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ms-graphite) !important;
}
