/* ============================================================
   FULCRUM design system — global override layer.
   Replaces the old "Prism" glassmorphism tokens with the flat,
   editorial Fulcrum palette + Jost / IBM Plex Mono typography.
   Loaded LAST on every page so it wins over Prism.
   ============================================================ */

:root,
html[data-theme="light"],
html[data-theme="dark"] {
  /* --- Fulcrum core tokens --- */
  --fc-bg:        #EDF2F4;
  --fc-bg-dark:   #2B2D42;
  --fc-panel:     #DCE4E9;
  --fc-text:      #2B2D42;
  --fc-text-2:    #545975;
  --fc-text-3:    #6E7690;
  --fc-accent:    #EF233C;
  --fc-line:      rgba(43,45,66,0.12);
  --fc-line-2:    rgba(43,45,66,0.24);
  --fc-body:      "Jost", Helvetica, Arial, sans-serif;
  --fc-mono:      "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* --- Remap every legacy Prism token onto Fulcrum --- */
  --bg:        #EDF2F4;
  --bg-soft:   #DCE4E9;
  --bg-tint:   #DCE4E9;
  --void:      #EDF2F4;
  --field:     #DCE4E9;
  --ink-card:  #DCE4E9;
  --ink-900:   #2B2D42;
  --ink-700:   #545975;
  --ink-500:   #6E7690;
  --ink-300:   #8A90A6;
  --text-0:    #2B2D42;
  --text-1:    #545975;
  --text-2:    #6E7690;
  --line:      rgba(43,45,66,0.12);
  --line-2:    rgba(43,45,66,0.24);
  --glass-stroke: rgba(43,45,66,0.14);
  --glass-a:   #DCE4E9;
  --glass-b:   #DCE4E9;
  --glass-hi:  #EDF2F4;
  --ghost-hover: rgba(43,45,66,0.06);
  --shadow-col: rgba(43,45,66,0.10);
  --nav-bg:    rgba(237,242,244,0.90);
  --menu-bg:   #EDF2F4;
  --band-a:    #DCE4E9;
  --band-b:    #EDF2F4;

  /* Prism signal hues collapse to the Fulcrum accent / neutrals */
  --coral:     #EF233C;
  --lavender:  #545975;
  --iris:      #545975;
  --cyan:      #2B2D42;
  --azure:     #2B2D42;
  --green:     #2B2D42;
  --mint:      #2B2D42;

  --mesh-az: transparent;
  --mesh-ir: transparent;
  --mesh-mi: transparent;
  --blob-op: 0;
  --blob-op2: 0;
  --blob-dim: 0;

  --display: "Jost", Helvetica, Arial, sans-serif;
  --body:    "Jost", Helvetica, Arial, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: "Jost", Helvetica, Arial, sans-serif;
  --font-body: "Jost", Helvetica, Arial, sans-serif;

  --r-sm: 3px; --r-md: 4px; --r-lg: 4px; --r-xl: 4px; --r-pill: 999px;
}

html, body {
  background: var(--fc-bg) !important;
  color: var(--fc-text) !important;
  font-family: var(--fc-body) !important;
  -webkit-font-smoothing: antialiased;
}

body, p, li, span, div, td, th, label, input, textarea, select, button {
  font-family: var(--fc-body);
}

h1, h2, h3, .display, .display-xl, .display-l, .display-m,
.hp-h1, .hp-h2, .manifesto h2 {
  font-family: var(--fc-body) !important;
  font-weight: 300 !important;
  letter-spacing: -0.03em !important;
  color: var(--fc-text);
}
h4, h5, h6 { font-family: var(--fc-body) !important; font-weight: 500 !important; letter-spacing: -0.01em; }

em { font-style: italic; font-weight: 400; }

a { color: var(--fc-text); text-decoration: none; }
a:hover { color: var(--fc-accent); }

.eyebrow, .sec-tag, .mono, .num, .chip, code, kbd, pre,
[class*="eyebrow"], [class*="-mono"], [class*="label-"] {
  font-family: var(--fc-mono) !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fc-text-3) !important;
}

/* ---------- KILL ALL GLASS / BLUR / GLOW ----------
   (cookie-consent iframes/widgets are excluded below) */
*:not(.iub-cs-content):not([id*="iubenda"]):not([class*="iubenda"]):not([id*="iub"]) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
[class*="glass"], [class*="prism"], .card, .panel, .feat, .mod, .dash,
.box, .tile, .surface {
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
.blob, .hero-bg, .prism-atmos, .prism-grid, .prism-grain,
[class*="blob"], [class*="orb"], [class*="glow"], [class*="aurora"], [class*="mesh"] {
  display: none !important;
  opacity: 0 !important;
  filter: none !important;
}
.prism-glass, .prism-page { background: var(--fc-bg) !important; }

/* ---------- FLAT PANELS ---------- */
.card, .panel, .feat, .mod, .dash, .tile, .box,
[class*="-card"], [class*="-panel"], [class*="-tile"] {
  background: var(--fc-panel) !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 4px !important;
  color: var(--fc-text) !important;
  backdrop-filter: none !important;
}

/* ---------- BUTTONS: pill, navy -> red hover ---------- */
.btn, .button, button.btn, a.btn, input[type="submit"], .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px !important;
  font-family: var(--fc-body) !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  box-shadow: none !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  cursor: pointer;
}
.btn:hover, .button:hover, input[type="submit"]:hover { transform: none !important; box-shadow: none !important; }

.btn-dark, .btn-primary, .btn-mint, .btn-coral, .btn-cyan,
input[type="submit"], .wp-block-button__link {
  background: var(--fc-text) !important;
  color: var(--fc-bg) !important;
  border-color: var(--fc-text) !important;
}
.btn-dark:hover, .btn-primary:hover, .btn-mint:hover, .btn-coral:hover,
.btn-cyan:hover, input[type="submit"]:hover, .wp-block-button__link:hover {
  background: var(--fc-accent) !important;
  border-color: var(--fc-accent) !important;
  color: #EDF2F4 !important;
}
.btn-ghost, .btn-outline, .btn-secondary {
  background: transparent !important;
  color: var(--fc-text) !important;
  border: 1px solid var(--fc-line-2) !important;
}
.btn-ghost:hover, .btn-outline:hover, .btn-secondary:hover {
  background: var(--fc-panel) !important;
  border-color: var(--fc-text) !important;
  color: var(--fc-text) !important;
}

/* ---------- NAV / HEADER ---------- */
.nav, header.nav, .site-header {
  background: rgba(237,242,244,0.90) !important;
  border-bottom: 1px solid var(--fc-line) !important;
  box-shadow: none !important;
}
.nav-links a, .nav a { color: var(--fc-text-2); font-size: 14.5px; }
.nav-links a:hover, .nav a:hover { color: var(--fc-accent); }

/* ---------- DARK BANDS ---------- */
.manifesto, .band-dark, .dark, [class*="--dark"], .hp-dark {
  background: var(--fc-bg-dark) !important;
  color: #EDF2F4 !important;
}
.manifesto h2, .band-dark h2, .hp-dark h2,
.manifesto h3, .band-dark h3 { color: #EDF2F4 !important; }
.manifesto p, .band-dark p, .hp-dark p { color: rgba(237,242,244,0.72) !important; }

/* ---------- FORMS ---------- */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="tel"], input[type="url"], textarea, select {
  background: #EDF2F4 !important;
  border: 1px solid var(--fc-line-2) !important;
  border-radius: 3px !important;
  color: var(--fc-text) !important;
  font-family: var(--fc-body) !important;
  box-shadow: none !important;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--fc-text) !important;
}

/* ---------- FOOTER ---------- */
footer, .site-footer, .footer {
  background: var(--fc-bg) !important;
  color: var(--fc-text-2) !important;
  border-top: 1px solid var(--fc-line) !important;
}
footer a, .site-footer a { color: var(--fc-text) !important; }
footer a:hover, .site-footer a:hover { color: var(--fc-accent) !important; }

/* ---------- MISC ---------- */
hr { border: 0; border-top: 1px solid var(--fc-line); }
::selection { background: #2B2D42; color: #EDF2F4; }
::-moz-selection { background: #2B2D42; color: #EDF2F4; }
blockquote { border-left: 2px solid var(--fc-accent); padding-left: 20px; color: var(--fc-text-2); }

/* ---------- Chat widget (ihm-chat.js) — Fulcrum skin ---------- */
.ihm-fab {
  background: #2B2D42 !important;
  color: #EDF2F4 !important;
  font-family: var(--fc-body) !important;
  font-weight: 400 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  border: 1px solid #2B2D42 !important;
}
.ihm-fab:hover { background: #EF233C !important; border-color: #EF233C !important; color: #EDF2F4 !important; }
.ihm-head, .ihm-foot { background: #2B2D42 !important; color: #EDF2F4 !important; font-family: var(--fc-body) !important; }
.ihm-log, .ihm-form { background: #EDF2F4 !important; font-family: var(--fc-body) !important; }
.ihm-send { background: #2B2D42 !important; color: #EDF2F4 !important; border-radius: 999px !important; }
.ihm-send:hover { background: #EF233C !important; }
.ihm-badge, .ihm-dot { background: #EF233C !important; }

/* ============================================================
   .prism-page — the old scoped Prism chrome (Subscribe, Account,
   Countdown, Start, Teardown, single post). It redeclares its own
   tokens at higher specificity than :root, so it must be overridden
   at the same scope. Flatten it onto Fulcrum.
   ============================================================ */
.prism-page,
html[data-theme="light"] .prism-page,
html[data-theme="dark"] .prism-page {
  --mint:#2B2D42; --coral:#EF233C; --iris:#545975; --azure:#2B2D42;
  --mint-hot:#EF233C; --coral-hot:#EF233C; --iris-hot:#2B2D42; --azure-hot:#EF233C;
  --text-0:#2B2D42; --text-1:#545975; --text-2:#6E7690; --text-3:#6E7690;
  --ink-700:#2B2D42;
  --glass-fill: none;
  --glass-fill-soft: none;
  --glass-stroke: rgba(43,45,66,0.14);
  --glass-stroke-strong: rgba(43,45,66,0.24);
  --glass-hi: none;
  --field:#EDF2F4; --well:#DCE4E9; --track:rgba(43,45,66,0.10);
  --line: rgba(43,45,66,0.12); --hover: rgba(43,45,66,0.06);
  --shadow-1: none; --shadow-2: none; --shadow-3: none;
  --font-display: "Jost", Helvetica, Arial, sans-serif;
  --font-sans:    "Jost", Helvetica, Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;
  --r-sm:3px; --r-md:4px; --r-lg:4px; --r-xl:4px; --r-2xl:4px; --r-pill:999px; --r-btn:999px;
  --orb-op:0; --grain-op:0; --grid-ink: transparent;
  background: #EDF2F4 !important;
  background-image: none !important;
  color: #2B2D42 !important;
  font-family: "Jost", Helvetica, Arial, sans-serif !important;
}

/* Kill the ambient orb/grid/grain layers entirely */
.prism-page .prism-atmos,
.prism-page .prism-grid,
.prism-page .prism-grain,
.prism-page .prism-orb,
.prism-page [class*="orb"] { display: none !important; }

/* Text inside prism pages */
.prism-page, .prism-page p, .prism-page li, .prism-page span,
.prism-page label, .prism-page td, .prism-page div { color: #545975; }
.prism-page h1, .prism-page h2, .prism-page h3,
.prism-page .prism-display, .prism-page [class*="display"] {
  color: #2B2D42 !important;
  font-family: "Jost", Helvetica, Arial, sans-serif !important;
  font-weight: 300 !important;
  letter-spacing: -0.03em !important;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #2B2D42 !important;
}
.prism-page h4, .prism-page h5, .prism-page h6 { color: #2B2D42 !important; font-weight: 500 !important; }

/* Gradient-clipped <em> emphasis -> plain navy italic */
.prism-page em, .prism-page [style*="background-clip"], .prism-page [style*="text-fill"] {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #2B2D42 !important;
  color: #2B2D42 !important;
  font-style: italic;
  font-weight: 400;
}

/* Kickers / eyebrows were near-white on light bg */
.prism-page .kicker, .prism-page .eyebrow, .prism-page [class*="kicker"] {
  color: #6E7690 !important;
  -webkit-text-fill-color: #6E7690 !important;
  font-family: "IBM Plex Mono", ui-monospace, monospace !important;
}

/* Glass panels -> flat Fulcrum panels */
.prism-page .glass, .prism-page [class*="glass"], .prism-page [class*="prism-card"],
.prism-page .card, .prism-page .panel {
  background: #DCE4E9 !important;
  background-image: none !important;
  border: 1px solid rgba(43,45,66,0.14) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #2B2D42 !important;
}

/* Buttons inside prism pages */
.prism-page .btn, .prism-page button, .prism-page a.btn,
.prism-page input[type="submit"] {
  border-radius: 999px !important;
  font-family: "Jost", Helvetica, Arial, sans-serif !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  background-image: none !important;
}
.prism-page .btn-primary, .prism-page .btn-mint, .prism-page .btn-azure,
.prism-page .btn-coral, .prism-page input[type="submit"], .prism-page button[type="submit"] {
  background: #2B2D42 !important; color: #EDF2F4 !important; border: 1px solid #2B2D42 !important;
  -webkit-text-fill-color: #EDF2F4 !important;
}
.prism-page .btn-primary:hover, .prism-page .btn-mint:hover, .prism-page .btn-azure:hover,
.prism-page .btn-coral:hover, .prism-page input[type="submit"]:hover, .prism-page button[type="submit"]:hover {
  background: #EF233C !important; border-color: #EF233C !important; color: #EDF2F4 !important;
}
.prism-page .btn-ghost, .prism-page .btn-secondary {
  background: transparent !important; color: #2B2D42 !important;
  border: 1px solid rgba(43,45,66,0.24) !important; -webkit-text-fill-color: #2B2D42 !important;
}

/* Inputs */
.prism-page input, .prism-page textarea, .prism-page select {
  background: #EDF2F4 !important; color: #2B2D42 !important;
  border: 1px solid rgba(43,45,66,0.24) !important; border-radius: 3px !important;
  -webkit-text-fill-color: #2B2D42 !important;
}
.prism-page ::placeholder { color: #8A90A6 !important; -webkit-text-fill-color: #8A90A6 !important; }

/* ---------- Logo swap: old IHM mark -> Fulcrum wordmark ---------- */
.logo-link img,
html[data-theme="light"] .logo-link img,
html[data-theme="dark"] .logo-link img {
  content: url("/wp-content/themes/ihatemarketing/assets/images/fulcrum-logo.svg") !important;
  max-height: 30px !important;
  max-width: 190px !important;
}
@media (max-width: 640px) {
  .logo-link img, html[data-theme="light"] .logo-link img { max-height: 26px !important; }
}

/* Site nav "Sign up" pill on legacy header */
.nav .btn-mint, .nav-ctas .btn-mint {
  background: #2B2D42 !important; color: #EDF2F4 !important; border: 1px solid #2B2D42 !important;
}
.nav .btn-mint:hover, .nav-ctas .btn-mint:hover { background: #EF233C !important; border-color: #EF233C !important; }

/* ============================================================
   SPECIFICITY FIX — prism-glass.php prints its <style> inside the
   BODY, so at equal specificity it wins on document order over this
   head stylesheet. Re-declare with higher specificity + !important.
   ============================================================ */
html body .prism-page,
html[data-theme="light"] body .prism-page,
html[data-theme="dark"] body .prism-page {
  --text-0:#2B2D42 !important; --text-1:#545975 !important;
  --text-2:#6E7690 !important; --text-3:#6E7690 !important;
  --mint:#2B2D42 !important; --coral:#EF233C !important;
  --iris:#545975 !important; --azure:#2B2D42 !important;
  --mint-hot:#EF233C !important; --coral-hot:#EF233C !important;
  --iris-hot:#2B2D42 !important; --azure-hot:#EF233C !important;
  --glass-fill: none !important; --glass-fill-soft: none !important;
  --glass-stroke: rgba(43,45,66,0.14) !important;
  --glass-stroke-strong: rgba(43,45,66,0.24) !important;
  --glass-hi: none !important;
  --field:#EDF2F4 !important; --well:#DCE4E9 !important;
  --track:rgba(43,45,66,0.10) !important;
  --line: rgba(43,45,66,0.12) !important; --hover: rgba(43,45,66,0.06) !important;
  --shadow-1: none !important; --shadow-2: none !important; --shadow-3: none !important;
  --font-display:"Jost",Helvetica,Arial,sans-serif !important;
  --font-sans:"Jost",Helvetica,Arial,sans-serif !important;
  --font-mono:"IBM Plex Mono",ui-monospace,monospace !important;
  --r-sm:3px !important; --r-md:4px !important; --r-lg:4px !important;
  --r-xl:4px !important; --r-2xl:4px !important; --r-btn:999px !important;
  --orb-op:0 !important; --grain-op:0 !important; --grid-ink: transparent !important;
  background: #EDF2F4 !important; background-image: none !important;
  color: #545975 !important;
}

/* Hard-force readable text on every descendant that isn't on a dark plate */
html body .prism-page p,
html body .prism-page li,
html body .prism-page label,
html body .prism-page span,
html body .prism-page dd, html body .prism-page dt,
html body .prism-page td, html body .prism-page th,
html body .prism-page small, html body .prism-page figcaption {
  color: #545975 !important;
  -webkit-text-fill-color: #545975 !important;
}
html body .prism-page h1, html body .prism-page h2, html body .prism-page h3,
html body .prism-page h4, html body .prism-page h5, html body .prism-page h6,
html body .prism-page strong, html body .prism-page b, html body .prism-page em {
  color: #2B2D42 !important;
  -webkit-text-fill-color: #2B2D42 !important;
}
html body .prism-page a:not(.btn) { color: #2B2D42 !important; -webkit-text-fill-color: #2B2D42 !important; }
html body .prism-page a:not(.btn):hover { color: #EF233C !important; -webkit-text-fill-color: #EF233C !important; }

/* Buttons keep their own contrast */
html body .prism-page .btn,
html body .prism-page .btn span,
html body .prism-page button,
html body .prism-page button span,
html body .prism-page input[type="submit"] { -webkit-text-fill-color: currentColor !important; }
html body .prism-page .btn-primary, html body .prism-page .btn-mint,
html body .prism-page .btn-azure, html body .prism-page .btn-coral,
html body .prism-page button[type="submit"], html body .prism-page input[type="submit"],
html body .prism-page .btn-primary span, html body .prism-page .btn-mint span {
  color: #EDF2F4 !important; -webkit-text-fill-color: #EDF2F4 !important;
}

/* Signal pills (pill-mint / pill-coral / pill-azure / pill-iris) -> Fulcrum accent */
html body .prism-page .pill,
html body .prism-page [class*="pill-"] {
  background: rgba(239,35,60,0.08) !important;
  border: 1px solid rgba(239,35,60,0.35) !important;
  border-radius: 999px !important;
  font-family: "IBM Plex Mono", ui-monospace, monospace !important;
}
html body .prism-page .pill, html body .prism-page .pill span,
html body .prism-page [class*="pill-"], html body .prism-page [class*="pill-"] span {
  color: #EF233C !important; -webkit-text-fill-color: #EF233C !important;
}
html body .prism-page .pill .dot, html body .prism-page [class*="pill-"] .dot { background: #EF233C !important; }

/* Multi-color prism "swatch"/spectrum bars -> single accent rule */
html body .prism-page [class*="spectrum"],
html body .prism-page [class*="swatch"],
html body .prism-page [class*="-bar"] > span,
html body .prism-page [style*="linear-gradient"] {
  background-image: none !important;
}
html body .prism-page [class*="spectrum"],
html body .prism-page [class*="swatch"] { background: #EF233C !important; }

/* Checkmark ticks that were mint green */
html body .prism-page [class*="tick"],
html body .prism-page [class*="check"],
html body .prism-page svg[class*="check"] {
  color: #EF233C !important; -webkit-text-fill-color: #EF233C !important;
  background: transparent !important; border-color: rgba(239,35,60,0.4) !important;
}

/* Scroll-reveal elements: never leave content stuck at opacity 0 */
html body .prism-page .reveal { opacity: 1 !important; transform: none !important; }
