/* ============================================================
   Trupoint Health — Marketing Design System (shared chrome)
   Scoped under body.tpt-mkt-page. Tokens adapted from the
   Claude Design "Trupoint Health" mock, re-palette'd to the
   existing site's navy + teal (var(--tp-accent)) accent (no orange).
   Used by: home, platform, shop (category), product templates.
   ============================================================ */

body.tpt-mkt-page {
/* Token values are generated from design/tokens/ into tpt-tokens.css, which     is enqueued immediately before this stylesheet. Do not redeclare them here:     a second declaration is exactly the drift this pipeline exists to remove. */

  margin: 0;
  padding: 0;
  /* !important guards against the active theme painting the body a non-white
     colour (eye-care sets body { background: var(--cmsmasters-body-bg-color) }),
     which otherwise bleeds through transparent white sections. */
  background: var(--tp-white) !important;
  color: var(--tp-text-primary);
  font-family: var(--tp-sans);
  font-size: 16px;
  /* The parent theme sets body weight from --cmsmasters-base-font-weight, which
     is 300. Geist at 300 is materially lighter than Inter at 300 was, and body
     copy came out thin on the live page. State it. */
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

/* Paint the content canvas white so transparent (white) sections never reveal
   the theme's body colour, regardless of CSS load order / cache. */
body.tpt-mkt-page main { background: var(--tp-soft-grey-bg); }

body.tpt-mkt-page * { box-sizing: border-box; }
/* The default link colour, deliberately weak.
   As `body.tpt-mkt-page a` this was (0,1,2), which outranked every page
   rule that colours a link through a single class - and that is most of
   them. A ghost-white button on a dark band, the category marker chips and
   the category step links were all being repainted this accent colour
   instead of their own. :where() drops the selector to (0,1,0): still
   stronger than the parent theme's bare `a`, but weaker than any page
   style, which is what a default should be. */
.tpt-mkt-page :where(a) { color: var(--tp-accent); text-decoration: none; }
.tpt-mkt-page :where(a:hover) { color: var(--tp-accent-press); }
body.tpt-mkt-page img { max-width: 100%; display: block; }
body.tpt-mkt-page svg.lucide,
body.tpt-mkt-page [data-lucide] { width: 20px; height: 20px; stroke-width: 1.9; vertical-align: middle; }

/* Hide the theme admin bar spacing quirks on standalone pages */
body.tpt-mkt-page { min-height: 100vh; position: relative; }

/* The parent theme paints all headings with its own face. Claim them, so a
   template that does not name a face gets the system sans rather than the
   theme's. Rules that opt into the display serif are more specific and are
   unaffected. */
.tpt-mkt-page h1, .tpt-mkt-page h2, .tpt-mkt-page h3,
.tpt-mkt-page h4, .tpt-mkt-page h5, .tpt-mkt-page h6,
.tpt-mkt-page th, .tpt-mkt-page td, .tpt-mkt-page dt, .tpt-mkt-page dd,
.tpt-mkt-page figcaption, .tpt-mkt-page blockquote,
.tpt-mkt-page label, .tpt-mkt-page legend,
.tpt-mkt-page input, .tpt-mkt-page select, .tpt-mkt-page textarea,
.tpt-mkt-page button { font-family: var(--tp-sans); }

/* ---- Shared layout helpers ---- */
.tpt-mkt-page .tpt-container { max-width: var(--tp-max); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.tpt-mkt-page .tpt-eyebrow {
  font-family: var(--tp-mono);
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  /* accent-press, not accent: at 12px the eyebrow needs 4.5:1 on every
     surface it sits on, and accent measured 4.45 on the cream band. */
  color: var(--tp-accent-press);
}
.tpt-mkt-page .tpt-h2 {
  font-family: var(--tp-display); font-weight: 400; font-size: 38px; letter-spacing: -0.02em;
  color: var(--tp-primary-navy); margin: 10px 0 0; line-height: 1.08;
}

/* Inline spans inside a heading must keep the heading's face. Editors emit
   <h2>Know your <span style="color:#0F7B6C">numbers</span></h2>, and without
   this the span falls back to the body sans and the serif breaks mid-line.
   Colour is deliberately not inherited: the inline style should still win. */
.tpt-mkt-page h1 span, .tpt-mkt-page h2 span,
.tpt-mkt-page h3 span, .tpt-mkt-page .tpt-h2 span { font-family: inherit; font-weight: inherit; }

/* The header and footer render inside whatever page wrapper a template uses,
   so a page stylesheet's blanket rules reach them. product-page.css repainting
   every p/span/li with !important is what turned the footer ink-on-ink. These
   sit at (0,2,1) so they win on specificity rather than on load order. */
.tpt-mkt-page .tpt-footer p, .tpt-mkt-page .tpt-footer span,
.tpt-mkt-page .tpt-footer li, .tpt-mkt-page .tpt-footer div,
.tpt-mkt-page .tpt-footer a { color: var(--tp-on-dark-muted) !important; }
.tpt-mkt-page .tpt-footer .tpt-footer__col-title,
.tpt-mkt-page .tpt-footer .tpt-footer__word,
.tpt-mkt-page .tpt-footer h2, .tpt-mkt-page .tpt-footer h3,
.tpt-mkt-page .tpt-footer strong { color: var(--tp-white) !important; }
.tpt-mkt-page .tpt-footer .tpt-footer__badge { color: var(--tp-accent-on-dark) !important; }

/* ---- Buttons ---- */
.tpt-mkt-page .tpt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  cursor: pointer; border: 0; font-family: var(--tp-sans); font-weight: 600;
  border-radius: 11px; transition: background .15s, transform .15s, box-shadow .15s;
  text-align: center; white-space: nowrap; appearance: none;
  background-image: none !important; text-shadow: none !important;
}
.tpt-mkt-page .tpt-btn--primary {
  background: var(--tp-accent) !important; color: #fff !important; padding: 15px 26px; font-size: 16px;
  box-shadow: 0 10px 26px var(--tp-accent-glow);
}
.tpt-mkt-page .tpt-btn--primary:hover { background: var(--tp-accent-press) !important; color: #fff !important; }
.tpt-mkt-page .tpt-btn--ghost {
  background: rgba(255,255,255,0.10) !important; color: #fff !important; padding: 15px 24px; font-size: 16px;
  border: 1.5px solid rgba(255,255,255,0.28); backdrop-filter: blur(6px);
}
.tpt-mkt-page .tpt-btn--ghost:hover { background: rgba(255,255,255,0.18) !important; color: #fff !important; }
.tpt-mkt-page .tpt-btn--nav {
  background: var(--tp-accent) !important; color: #fff !important; padding: 11px 18px; font-size: 14px; border-radius: 9px;
  box-shadow: 0 6px 16px var(--tp-accent-glow);
}
.tpt-mkt-page .tpt-btn--nav:hover { background: var(--tp-accent-press) !important; color: #fff !important; }

/* ============================================================ MICROBAR */
.tpt-microbar { background: var(--tp-primary-navy); color: var(--tp-on-dark-muted); font-size: 12.5px; }
.tpt-microbar__row {
  max-width: var(--tp-max); margin: 0 auto; padding: 8px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.tpt-microbar__group { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.tpt-microbar__item { display: inline-flex; align-items: center; gap: 7px; }
.tpt-microbar__item i { width: 15px; height: 15px; color: var(--tp-accent-on-dark); }
.tpt-microbar__eta { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 600; }
.tpt-microbar__eta i { width: 15px; height: 15px; }

/* ============================================================ NAV */
.tpt-nav {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--tp-border-grey);
}
.tpt-nav__row {
  max-width: var(--tp-max); margin: 0 auto; padding: 0 24px; height: var(--tp-topnav-h);
  display: flex; align-items: center; gap: 28px;
}
.tpt-nav__brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.tpt-nav__logo {
  width: 34px; height: 34px; border-radius: 9999px; background: var(--tp-primary-navy);
  display: inline-flex; align-items: center; justify-content: center;
}
.tpt-nav__logo span { width: 11px; height: 11px; border-radius: 9999px; background: var(--tp-accent-dot); }
.tpt-mkt-page .tpt-nav__logo-img {
  display: block; width: 42px !important; height: 42px !important;
  min-width: 42px; max-width: 42px !important; object-fit: contain !important;
}
.tpt-nav__word {
  font-family: var(--tp-sans); font-weight: 700; font-size: 20px; color: var(--tp-primary-navy);
  letter-spacing: -0.02em;
}
.tpt-nav__word b { color: var(--tp-accent-dot); font-weight: 700; }
.tpt-nav__links { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.tpt-nav__links a,
.tpt-nav__links button {
  all: unset; box-sizing: border-box; cursor: pointer; padding: 9px 12px; font-size: 14.5px;
  font-weight: 600; color: var(--tp-text-primary) !important; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 5px; position: relative;
}
.tpt-nav__links a:hover,
.tpt-nav__links button:hover { background: var(--tp-soft-grey-bg); color: var(--tp-primary-navy) !important; }
.tpt-nav__links a[aria-current="page"] { color: var(--tp-primary-navy) !important; }
.tpt-nav__links .chev { width: 15px; height: 15px; color: var(--tp-text-secondary); transition: transform .18s; }
.tpt-nav[data-mega="open"] .tpt-nav__links .chev { transform: rotate(180deg); }
.tpt-nav__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tpt-nav__login {
  display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600;
  color: var(--tp-text-primary); padding: 9px 12px; border-radius: 8px;
}
.tpt-nav__login:hover { background: var(--tp-soft-grey-bg); color: var(--tp-primary-navy); }
.tpt-nav__burger {
  all: unset; box-sizing: border-box; cursor: pointer; display: none; width: 42px; height: 42px;
  border-radius: 9px; align-items: center; justify-content: center;
  border: 1px solid var(--tp-border-grey); color: var(--tp-primary-navy);
}

/* ---- Header cart ---- */
.tpt-nav__cart { position: relative; flex-shrink: 0; }
.tpt-nav__cart-btn {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 9px; color: var(--tp-primary-navy);
}
.tpt-nav__cart-btn:hover { background: var(--tp-soft-grey-bg); }
.tpt-nav__cart-btn:focus-visible { outline: 2px solid var(--tp-accent); outline-offset: 2px; }
.tpt-nav__cart-count {
  position: absolute; top: 2px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--tp-accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.tpt-nav__cart-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 340px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid var(--tp-border-grey); border-radius: 12px;
  box-shadow: var(--tp-shadow-card); padding: 16px; z-index: 55;
  display: none; animation: tpRise .18s ease;
}
.tpt-nav__cart[data-open="true"] .tpt-nav__cart-panel { display: block; }

.tpt-cart-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.tpt-cart-head strong { font-size: 15px; color: var(--tp-primary-navy); }
.tpt-cart-head span { font-size: 12.5px; color: var(--tp-text-secondary); }

.tpt-cart-lines { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.tpt-cart-line { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--tp-border-soft); }
.tpt-cart-line:first-child { border-top: 0; padding-top: 0; }
.tpt-cart-line__media { flex-shrink: 0; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--tp-soft-grey-bg); }
.tpt-cart-line__media img { width: 100%; height: 100%; object-fit: cover; }
.tpt-cart-line__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tpt-cart-line__body a,
.tpt-cart-line__body > span { font-size: 13.5px; font-weight: 600; color: var(--tp-primary-navy); line-height: 1.35; }
.tpt-cart-line__body small { font-size: 12.5px; color: var(--tp-text-secondary); }
.tpt-cart-line__remove {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px; color: var(--tp-text-secondary);
}
.tpt-cart-line__remove:hover { background: var(--tp-soft-grey-bg); color: var(--tp-primary-navy); }

.tpt-cart-subtotal {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tp-border-grey);
  font-size: 14px; color: var(--tp-text-secondary);
}
.tpt-cart-subtotal strong { font-size: 16px; color: var(--tp-primary-navy); }

.tpt-cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.tpt-cart-actions .tpt-btn { width: 100%; justify-content: center; font-size: 14px; padding: 11px 12px; }
.tpt-btn--cart-ghost {
  background: #fff !important; color: var(--tp-primary-navy) !important; border: 1px solid var(--tp-border-grey);
}
.tpt-btn--cart-ghost:hover { background: var(--tp-soft-grey-bg) !important; color: var(--tp-primary-navy) !important; }

.tpt-cart-empty { text-align: center; padding: 14px 8px 6px; color: var(--tp-text-secondary); }
.tpt-cart-empty svg { margin: 0 auto 10px; color: var(--tp-border-grey); width: 26px; height: 26px; }
.tpt-cart-empty p { margin: 0 0 14px; font-size: 14px; }
.tpt-cart-empty .tpt-btn { width: 100%; justify-content: center; }

.tpt-drawer__count {
  display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px;
  border-radius: 999px; background: var(--tp-accent); color: #fff;
  font-family: var(--tp-sans); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}

/* ---- Mega menu ---- */
.tpt-mega {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff;
  border-bottom: 1px solid var(--tp-border-grey); box-shadow: var(--tp-shadow-card);
  animation: tpRise .18s ease; display: none;
}
.tpt-nav[data-mega="open"] .tpt-mega { display: block; }
.tpt-mega__inner {
  max-width: var(--tp-max); margin: 0 auto; padding: 26px 24px 30px;
  display: grid; grid-template-columns: 1.4fr 1fr 1.1fr; gap: 30px;
}
.tpt-mega__label {
  font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--tp-text-secondary); margin-bottom: 14px;
}
.tpt-mega__cats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.tpt-mega__cats a,
.tpt-mega__goals a {
  padding: 7px 8px; margin: 0 -8px; border-radius: 7px; font-size: 14px;
  color: var(--tp-text-primary); font-weight: 500;
}
.tpt-mega__cats a:hover,
.tpt-mega__goals a:hover { background: var(--tp-soft-grey-bg); }
.tpt-mega__goals { display: flex; flex-direction: column; gap: 2px; }
.tpt-mega__goals a { display: flex; align-items: center; gap: 10px; }
.tpt-mega__goal-ic {
  width: 28px; height: 28px; border-radius: 8px; background: var(--tp-info-soft);
  display: inline-flex; align-items: center; justify-content: center; color: var(--tp-clinical-blue);
}
.tpt-mega__goal-ic i { width: 16px; height: 16px; }
.tpt-mega__promo {
  background: linear-gradient(160deg, var(--tp-primary-navy), var(--tp-navy-2));
  border-radius: 16px; padding: 22px; color: #fff; display: flex; flex-direction: column;
}
.tpt-mega__promo h4 { font-family: var(--tp-sans); font-weight: 700; font-size: 19px; margin: 0 0 8px; }
.tpt-mega__promo p { font-size: 13.5px; color: var(--tp-on-dark-muted); line-height: 1.55; margin: 0 auto 0 0; }
.tpt-mega__promo .tpt-btn { margin-top: 18px; background: var(--tp-accent); color: #fff; padding: 10px 16px; font-size: 13.5px; border-radius: 8px; box-shadow: none; }

/* ============================================================ MOBILE DRAWER */
.tpt-drawer {
  position: fixed; inset: 0; z-index: 60; background: #fff; padding: 20px;
  display: none; flex-direction: column; animation: tpRise .18s ease;
}
.tpt-drawer[data-open="true"] { display: flex; }
.tpt-drawer__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.tpt-drawer__word { font-family: var(--tp-sans); font-weight: 700; font-size: 20px; color: var(--tp-primary-navy); }
.tpt-drawer__word b { color: var(--tp-accent-dot); }
.tpt-drawer__close {
  all: unset; cursor: pointer; width: 42px; height: 42px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--tp-border-grey);
}
.tpt-drawer a {
  padding: 15px 4px; font-size: 19px; font-weight: 600; color: var(--tp-primary-navy);
  border-bottom: 1px solid var(--tp-border-grey); font-family: var(--tp-sans);
}
.tpt-drawer .tpt-btn { margin-top: 24px; font-size: 16px; padding: 15px; border-radius: 10px; width: 100%; }

/* ============================================================ FOOTER */
.tpt-footer { background: var(--tp-primary-navy); color: var(--tp-on-dark-muted); }
.tpt-footer__inner { max-width: var(--tp-max); margin: 0 auto; padding: 56px 24px 30px; }
.tpt-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.tpt-footer__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tpt-footer__logo { width: 32px; height: 32px; border-radius: 9999px; background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.tpt-footer__logo span { width: 10px; height: 10px; border-radius: 9999px; background: var(--tp-accent-dot); }
.tpt-footer__logo-img { height: 44px; width: auto; max-width: 220px; display: block; margin-bottom: 14px; }
.tpt-footer__word { font-family: var(--tp-sans); font-weight: 700; font-size: 19px; color: #fff; }
.tpt-footer__word b { color: var(--tp-accent-dot); }
.tpt-footer p { font-size: 13.5px; line-height: 1.6; max-width: 280px; }
.tpt-footer__badges { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.tpt-footer__badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--tp-accent-on-dark); border: 1px solid rgba(127,227,199,.3); padding: 6px 11px; border-radius: 8px; }
.tpt-footer__col-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.tpt-footer__links { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.tpt-footer__links a { color: var(--tp-on-dark-muted) !important; }
.tpt-footer__links a:hover { color: #fff !important; }
.tpt-footer__bar {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px;
}
.tpt-footer__bar-links { display: flex; gap: 18px; }
.tpt-footer__bar-links a { color: var(--tp-on-dark-muted) !important; }
.tpt-footer__bar-links a:hover { color: #fff !important; }

/* ============================================================ STICKY MOBILE CTA */
.tpt-mcta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--tp-border-grey); padding: 11px 16px; align-items: center; gap: 12px;
}
.tpt-mcta__from { flex: 1; }
.tpt-mcta__from small { font-size: 11px; color: var(--tp-text-secondary); display: block; }
.tpt-mcta__from strong { font-family: var(--tp-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; color: var(--tp-primary-navy); }
.tpt-mcta .tpt-btn { padding: 13px 22px; font-size: 15px; border-radius: 10px; box-shadow: none; }

/* ============================================================ KEYFRAMES + REVEAL */
@keyframes tpDraw   { to { stroke-dashoffset: 0; } }
@keyframes tpFloat  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes tpMarquee{ from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tpRise   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tpBar    { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes tpHiwBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tpKen    { from { transform: scale(1) translate(0,0); } to { transform: scale(1.12) translate(-1.5%,-1%); } }

.tpt-mkt-page [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}
.tpt-mkt-page [data-reveal].is-in { opacity: 1; transform: none; }
body.tpt-mkt-page.tpt-reduce-motion [data-reveal] { opacity: 1; transform: none; transition: none; }
body.tpt-mkt-page.tpt-reduce-motion * { animation-duration: .001ms !important; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1024px) {
  .tpt-nav__links { display: none !important; }
  .tpt-nav__burger { display: inline-flex !important; }
}
@media (max-width: 900px) {
  .tpt-mega__inner { grid-template-columns: 1fr !important; gap: 20px !important; }
  .tpt-footer__grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 620px) {
  .tpt-microbar { display: none; }
  .tpt-mcta { display: flex; }
  .tpt-footer__grid { grid-template-columns: 1fr !important; }
  body.tpt-mkt-page { padding-bottom: 76px; }
  .tpt-nav__login { display: none; }
}
