/* ══════════════════════════════════════════════════════════════
   CNP-PRAXIS.CSS — CostandProfitability.com Design System
   Direction: Praxis (Editorial Authority)
   Version: 1.0 — 31 May 2026

   This file contains ALL shared design tokens, typography,
   layout primitives, and animations for the Praxis redesign.
   Enqueued globally via functions.php.
   ══════════════════════════════════════════════════════════════ */

/* ─── 1. Design Tokens ─────────────────────── */
:root {
  /* Data language — use ONLY for profit/loss semantics */
  --red:          #D11F4B;
  --green:        #1C7A57;
  --green-bright: #1D9E75;

  /* Brand spine */
  --orange:        #C75B22;
  --orange-bright: #E2761A;

  /* Ink / neutrals (warm) */
  --ink:    #1A1714;
  --ink-2:  #4A4138;
  --muted:  #756859;
  --muted-2:#9A8E7E;

  /* Surfaces (warm paper) */
  --paper:   #F3EEE4;
  --paper-2: #EDE6D8;
  --surface: #FBF9F3;

  /* Hairlines */
  --line:   #DCD3C2;
  --line-2: #C9BEAA;
}

/* ─── 2. Reset & Base ──────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.praxis {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  font-size: 16px;
}

.praxis a { color: inherit; text-decoration: none; }
.praxis img { display: block; max-width: 100%; }
.praxis button { font-family: inherit; cursor: pointer; }
.praxis ::selection { background: var(--orange); color: #fff; }

/* ─── 3. Typography ────────────────────────── */
.praxis h1, .praxis h2, .praxis h3,
.praxis .serif { font-family: 'Newsreader', Georgia, serif; }
.praxis .mono  { font-family: 'IBM Plex Mono', monospace; }

/* Hero H1 */
.praxis .h1-hero {
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.022em;
}

/* Section H2 */
.praxis .h2-section {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

/* Card H3 */
.praxis .h3-card {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.2;
}

/* Body text */
.praxis .body-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* Emphasis word (italic orange in headings) */
.praxis .em-orange {
  font-style: italic;
  color: var(--orange);
}
.praxis .em-orange-bright {
  font-style: italic;
  color: var(--orange-bright);
}

/* ─── 4. Layout Primitives ──────────────────── */
.praxis .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
}
.praxis .container-narrow {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Section padding */
.praxis .section-pad {
  padding: 110px 0;
}
.praxis .section-pad-sm {
  padding: 80px 0;
}

/* ─── 5. Eyebrow & Section Number ───────────── */
.praxis .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  font-family: 'IBM Plex Mono', monospace;
}
.praxis .eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--orange);
  flex-shrink: 0;
}
.praxis .eyebrow-dark {
  color: rgba(255,255,255,0.55);
}

.praxis .section-num {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  font-family: 'IBM Plex Mono', monospace;
}
.praxis .section-num .n {
  color: var(--orange);
}
.praxis .section-num .rule {
  flex: 0 0 36px;
  height: 1px;
  background: var(--line-2);
}
.praxis .section-num-dark {
  color: rgba(255,255,255,0.5);
}
.praxis .section-num-dark .rule {
  background: rgba(255,255,255,0.2);
}

/* ─── 6. Buttons ────────────────────────────── */
.praxis .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16,0.8,0.3,1);
  border-radius: 2px;
  font-family: 'Hanken Grotesk', sans-serif;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.praxis .btn-primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.praxis .btn-primary:hover {
  background: #A8481A;
  border-color: #A8481A;
}

.praxis .btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.praxis .btn-ghost:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.praxis .btn-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}
.praxis .btn-dark:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

/* Arrow glyph for buttons */
.praxis .btn-arrow {
  width: 15px;
  height: 11px;
  flex-shrink: 0;
}

/* ─── 7. Navigation ─────────────────────────── */
.praxis .nav-praxis {
  position: sticky;
  top: 0;
  z-index: 500;
  transition: all 0.4s;
}
.praxis .nav-praxis.transparent {
  background: transparent;
  border-bottom: 1px solid transparent;
}
.praxis .nav-praxis.solid {
  background: rgba(243,238,228,0.86);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.praxis .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.praxis .nav-logo { height: 52px; cursor: pointer; }
.praxis .nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.praxis .nav-link {
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-2);
  transition: color 0.2s;
  text-decoration: none;
}
.praxis .nav-link:hover,
.praxis .nav-link.active {
  color: var(--orange);
}
.praxis .nav-lang {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 2px;
}
.praxis .nav-lang-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(26,23,20,0.12);
  z-index: 20;
}
.praxis .nav-lang-option {
  display: block;
  width: 78px;
  text-align: left;
  padding: 9px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  background: transparent;
  border: none;
  color: var(--ink-2);
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
}
.praxis .nav-lang-option:hover { background: var(--paper-2); }
.praxis .nav-lang-option.active { background: var(--paper-2); color: var(--orange); }

/* Mobile nav */
.praxis .nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.praxis .nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: all 0.3s;
}

/* ─── 8. Footer ─────────────────────────────── */
.praxis .footer-praxis {
  background: #14110D;
  color: #fff;
  padding-top: 84px;
}
.praxis .footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.1fr;
  gap: 48px;
  padding-bottom: 64px;
}
.praxis .footer-col-title {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 22px;
  font-weight: 500;
  font-family: 'IBM Plex Mono', monospace;
}
.praxis .footer-link {
  display: block;
  font-size: 15px;
  margin-bottom: 13px;
  color: rgba(255,255,255,0.66);
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
}
.praxis .footer-link:hover { color: #fff; }
.praxis .footer-tagline {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 21px;
  line-height: 1.45;
  color: rgba(255,255,255,0.8);
  max-width: 330px;
  font-weight: 300;
  font-style: italic;
}
.praxis .footer-powered {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.praxis .footer-powered span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  font-family: 'IBM Plex Mono', monospace;
}
.praxis .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 26px 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.praxis .footer-copy {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.35);
  font-family: 'IBM Plex Mono', monospace;
}

/* ─── 9. Cards & Panels ─────────────────────── */
.praxis .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.praxis .card-raised {
  box-shadow: 0 30px 60px -40px rgba(26,23,20,0.3);
}

/* Window chrome (for CostCTRL screenshots) */
.praxis .window-chrome {
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.praxis .window-chrome-dark {
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6);
}
.praxis .window-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  background: #F6F2E9;
}
.praxis .window-dots-dark {
  background: #211D17;
  border-bottom-color: rgba(255,255,255,0.08);
}
.praxis .window-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.praxis .window-dot-r { background: var(--red); }
.praxis .window-dot-o { background: var(--orange); }
.praxis .window-dot-g { background: var(--green); }
.praxis .window-caption {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
  font-family: 'IBM Plex Mono', monospace;
}
.praxis .window-dots-dark .window-caption {
  color: rgba(255,255,255,0.5);
}

/* ─── 10. Dark Sections ─────────────────────── */
.praxis .dark-section {
  background: var(--ink);
  color: #fff;
}
.praxis .dark-section .body-text {
  color: rgba(255,255,255,0.66);
}

/* CTA Band (before footer) */
.praxis .cta-band {
  background: var(--ink);
  color: #fff;
  padding: 110px 0;
  position: relative;
  overflow: hidden;
}
.praxis .cta-band .glow {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: radial-gradient(120% 90% at 85% 10%, rgba(199,91,34,0.22), transparent 55%);
  pointer-events: none;
}

/* ─── 11. Reveal Animation ──────────────────── */
.praxis .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.1s cubic-bezier(0.16,0.8,0.3,1),
              transform 1.1s cubic-bezier(0.16,0.8,0.3,1);
}
.praxis .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .praxis .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── 12. Scrollbar ─────────────────────────── */
.praxis ::-webkit-scrollbar { width: 11px; height: 11px; }
.praxis ::-webkit-scrollbar-track { background: var(--paper-2); }
.praxis ::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 0;
  border: 3px solid var(--paper-2);
}

/* ─── 13. Range Slider (Scenario Studio) ────── */
.praxis .lever-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FBF9F3;
  border: 2px solid var(--orange);
  box-shadow: 0 2px 8px rgba(199,91,34,0.35);
  cursor: pointer;
  margin-top: 0;
}
.praxis .lever-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FBF9F3;
  border: 2px solid var(--orange);
  box-shadow: 0 2px 8px rgba(199,91,34,0.35);
  cursor: pointer;
}
.praxis .lever-input::-webkit-slider-runnable-track {
  background: transparent;
}

/* ─── 14. Responsive ────────────────────────── */
@media (max-width: 1080px) {
  .praxis .nav-links { display: none !important; }
  .praxis .nav-hamburger { display: block; }
  .praxis .studio-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 760px) {
  .praxis .container { padding: 0 20px; }
  .praxis .container-narrow { padding: 0 20px; }
  .praxis .section-pad { padding: 70px 0; }
  .praxis .hero-grid { grid-template-columns: 1fr !important; }
  .praxis .split-2 { grid-template-columns: 1fr !important; }
  .praxis .cols-3 { grid-template-columns: 1fr !important; }
  .praxis .cols-4 { grid-template-columns: 1fr 1fr !important; }
  .praxis .footer-grid { grid-template-columns: 1fr 1fr; }
  .praxis .h1-hero { font-size: clamp(32px, 8vw, 48px); }
  .praxis .nav-inner { height: 64px; }
  .praxis .nav-logo { height: 42px; }
}

@media (max-width: 480px) {
  .praxis .footer-grid { grid-template-columns: 1fr; }
  .praxis .cols-4 { grid-template-columns: 1fr !important; }
  .praxis .btn { padding: 13px 20px; font-size: 13.5px; }
}

/* ─── 15. Utility ───────────────────────────── */
.praxis .text-center { text-align: center; }
.praxis .mb-0 { margin-bottom: 0; }
.praxis .mb-8 { margin-bottom: 8px; }
.praxis .mb-16 { margin-bottom: 16px; }
.praxis .mb-24 { margin-bottom: 24px; }
.praxis .mb-32 { margin-bottom: 32px; }
.praxis .mb-48 { margin-bottom: 48px; }
.praxis .mt-auto { margin-top: auto; }
.praxis .gap-16 { gap: 16px; }
.praxis .gap-28 { gap: 28px; }
