/* =========================================================
   SOFTWARE PAGE — Blog "Dark-to-Light Sheet" cosmetic theme.
   COLORS + FONTS ONLY. Layout, markup, animations, JS untouched.
   Loaded only by /software → software-page-scoped (does not
   affect reserve-studies / contact, which load their own themes).

   The blog identity (matched here):
     • DARK hero — midnight #0a1220 + two blue glows, white serif
       titles, ICE-BLUE #cfe1f5 eyebrow.
     • WARM IVORY SHEET below — #f6f1e7→#efe8d8, slides up over the
       hero (top-radius + upward shadow), ink #1a2740 serif titles,
       GOLD/COPPER #b07a4e kickers/tags, steel #8aa3c1 meta.
     • DARK cap (final CTA) + footer.
   Titles: Cormorant Garamond · Body: Hanken Grotesk · Meta: JetBrains Mono
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* dark zone */
  --bg: #0a1220; --bg-2: #0e1626; --bg-3: #16243a;
  --panel: rgba(207,225,245,0.05); --panel-2: rgba(207,225,245,0.08); --panel-3: rgba(207,225,245,0.12);
  --border: rgba(255,255,255,0.08); --border-2: rgba(207,225,245,0.20);
  --text: #f1f5fb; --text-2: #b8c5d8; --muted: #8aa3c1; --faint: #7f90aa;
  --ice: #cfe1f5;

  /* light "sheet" zone */
  --sheet-1: #f6f1e7; --sheet-2: #efe8d8; --card: #fffdf8;
  --ink: #1a2740; --ink-body: #55607a; --ink-muted: #8aa3c1;
  --hair: rgba(26,39,64,0.10); --hair-2: rgba(26,39,64,0.16);

  /* accent → gold / copper */
  --accent: #b07a4e; --accent-2: #c69a6f; --accent-deep: #9a6c3f; --gold: #b07a4e; --gold-deep: #9a6c3f;

  /* type */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* clean midnight hero — drop the photographic backdrop (blog has none) */
.page-backdrop, .sw-static-bg, .sw-static-bg-veil { display: none !important; }
body { background: var(--bg); color: var(--text-2); }

/* ---------- type ---------- */
h1, h2, h3, h4, h5, .phero-copy h1, .footer .logo span {
  font-family: var(--font-display); color: var(--text); letter-spacing: -0.005em;
}
.dash-title { font-family: var(--font-mono); }

/* eyebrow on dark = ice (Hanken 600, wide caps) */
.eyebrow { font-family: var(--font-body); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ice); }
.eyebrow::before, .eyebrow .bar { background: var(--ice) !important; }

/* ---------- buttons — DARK zones: ice primary / translucent ghost ---------- */
.btn.primary { background: var(--ice); color: #0a1220; border-color: transparent; box-shadow: 0 12px 30px -12px rgba(207,225,245,0.45); }
.btn.primary:hover { background: #fff; transform: translateY(-2px); }
.btn.primary .arr { color: #0a1220; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.18); }
.btn.ghost:hover { border-color: rgba(207,225,245,0.5); color: var(--ice); }

/* ---------- cards / dashboards = SOLID dark (crisp on ivory, legible data-viz) ---------- */
.fcard, .cap, .benefit, .tile, .dash, .xnav-card,
.lvl-card, .rev-item, .proc, .tflow-node, .float-card, .cmp-dash, .stage-panel .dash {
  background: linear-gradient(165deg, #1b2a44, #111a2e);
  border-color: rgba(255,255,255,0.09);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 30px 70px -42px rgba(10,18,32,0.6);
}
/* inner cells get a subtle lift so they separate from the solid card */
.dash .stat-box, .stat-box { background: rgba(207,225,245,0.06); border-color: rgba(255,255,255,0.08); }
.dash-bar .dots i:first-child { background: var(--gold); }
.dash-pill { color: var(--ice); border-color: rgba(207,225,245,0.25); }
.dc-line { stroke: var(--accent-2); }
.float-card .fc-v.warm { color: var(--accent-2); }

/* ===========================================================
   WARM IVORY SHEET — wraps the "How it works" + "What it does"
   sections and slides up over the dark hero (the blog seam).
   =========================================================== */
/* Platform hero styles live in platform-hero.css (handoff).
   Old .phero / .phero-platform artboard rules removed. */
.platform-hero { margin-bottom: 0; }

.scroll-story {
  position: relative; z-index: 2;
  margin-top: -70px;
  background: linear-gradient(180deg, var(--sheet-1), var(--sheet-2));
  border-radius: 34px 34px 0 0;
  box-shadow: 0 -30px 80px -40px rgba(0,0,0,0.5);
  padding-top: 84px;
}

@media (max-width: 1079px) {
  .scroll-story {
    margin-top: 0;
  }

  .platform-hero.mkt-hero .ph-grade.mkt-hero-overlay {
    background:
      linear-gradient(
        180deg,
        rgba(7, 12, 21, 0.96) 0%,
        rgba(7, 12, 21, 0.92) 28%,
        rgba(7, 12, 21, 0.78) 48%,
        rgba(7, 12, 21, 0.42) 66%,
        rgba(7, 12, 21, 0.12) 82%,
        rgba(7, 12, 21, 0) 100%
      );
  }
}
#features { background: var(--sheet-2); }

/* --- light-zone text — readable INK in BOTH active & inactive states
   (the active/inactive cue becomes the gold step-number/bar, not brightness,
   so nothing washes out on ivory). Scoped under .scroll-story to beat the
   higher-specificity .story-step.active rules and to spare the dark dashes. --- */
.story-head h2, .prose-aside h2 { color: var(--ink); }
.story-head p, .prose-aside .aside-note, .prose p { color: var(--ink-body); }
#features .prose, #features .prose p { color: var(--ink-body); }
#features .prose p.lead { color: var(--ink); font-weight: 500; }
#features .prose b, #features .prose strong { color: var(--ink); }
.prose .term, #features .prose .term { color: var(--gold-deep); font-weight: 700; }
.prose .muted, #features .prose .muted { color: var(--ink-muted); }

/* Keep the section title pinned while the sticky stage cycles so users
   always see what they're looking at. The ::before extends a solid
   ivory band edge-to-edge so step copy on the right column can't bleed
   through the title area. */
.scroll-story .story-head {
  position: sticky;
  top: calc(var(--nav-h));
  z-index: 5;
  padding: 22px 0 22px;
  margin: 0 auto 16px;
  isolation: isolate;
}
.scroll-story .story-head::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--sheet-1);
  box-shadow: 0 14px 18px -14px rgba(26,39,64,0.18);
  z-index: -1;
}

.scroll-story .story-step h3,
.scroll-story .story-step.active h3 { color: var(--ink); }
.scroll-story .story-step p,
.scroll-story .story-step.active p { color: var(--ink-body); }

/* kicker / meta on light = gold */
.story-head .eyebrow, .prose-aside .eyebrow { color: var(--gold); }
.story-head .eyebrow::before, .story-head .eyebrow .bar,
.prose-aside .eyebrow::before, .prose-aside .eyebrow .bar { background: var(--gold) !important; }

/* step number + bar: steel when idle → gold when active */
.scroll-story .story-step .step-num { color: var(--ink-muted); }
.scroll-story .story-step.active .step-num { color: var(--gold-deep); }
.scroll-story .story-step .step-num::before { background: var(--hair-2); }
.scroll-story .story-step.active .step-num::before { background: var(--gold); }
.story-progress { background: var(--hair-2); }
.story-progress .fill { background: linear-gradient(180deg, var(--accent-2), var(--accent)); }

/* tag chips on light = soft gold (both states) */
.scroll-story .story-step .step-tag,
.scroll-story .story-step.active .step-tag {
  font-family: var(--font-mono); color: var(--gold-deep);
  background: rgba(198,154,111,0.14); border: 1px solid rgba(176,122,78,0.42);
}
.scroll-story .story-step.active .step-tag.hot { color: #fff; background: var(--gold); border-color: transparent; }

/* light-zone buttons = gold primary / ink ghost */
.scroll-story .btn.primary, #features .btn.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-deep)); color: #fff;
  border-color: transparent; box-shadow: 0 12px 30px -12px rgba(176,122,78,0.5);
}
.scroll-story .btn.primary .arr, #features .btn.primary .arr { color: #fff; }
.scroll-story .btn.ghost, #features .btn.ghost { color: var(--ink); border: 1px solid var(--hair-2); }
.scroll-story .btn.ghost:hover, #features .btn.ghost:hover { border-color: var(--gold); color: var(--gold-deep); }

/* Mobile Plan B: the title scrolls away, then the product card stays pinned
   while the step copy scrolls underneath and drives the active panel. */
@media (max-width: 760px) {
  .scroll-story {
    overflow: visible;
    padding-top: 54px;
    padding-bottom: 78px;
  }
  .scroll-story .story-head {
    position: relative;
    top: auto;
    z-index: 1;
    padding: 0 0 24px;
    margin: 0 auto 18px;
  }
  .scroll-story .story-head::before { display: none; }
  .scroll-story .story-head p { font-size: 16px; line-height: 1.55; }

  .scroll-story .story-cols {
    display: block;
    position: relative;
  }
  .scroll-story .story-sticky {
    position: sticky;
    top: calc(var(--nav-h) + 8px);
    height: 42vh;
    min-height: 260px;
    max-height: 330px;
    margin: 0 0 34px;
    z-index: 4;
    align-items: stretch;
  }
  .scroll-story .story-sticky::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -10px;
    bottom: -24px;
    width: 100vw;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--sheet-1) 0%, rgba(246,241,231,0.96) 74%, rgba(246,241,231,0) 100%);
    box-shadow: 0 18px 22px -24px rgba(26,39,64,0.35);
    pointer-events: none;
    z-index: -1;
  }
  .scroll-story .story-stage { height: 100%; }
  .scroll-story .stage-panel {
    justify-content: stretch;
    transform: translateY(18px) scale(0.975);
    filter: blur(2px);
    transition: opacity 0.48s var(--ease), transform 0.48s var(--ease), filter 0.48s var(--ease);
  }
  .scroll-story .stage-panel.active {
    transform: none;
    filter: none;
  }

  .scroll-story .stage-panel .dash {
    height: 100%;
    overflow: hidden;
    border-radius: 22px;
    padding: 12px;
  }
  .scroll-story .dash-bar { gap: 6px; padding-bottom: 9px; margin-bottom: 9px; }
  .scroll-story .dash-title { font-size: 10px; }
  .scroll-story .dash-pill { font-size: 9px; padding: 2px 7px; }
  .scroll-story .dash-cell { padding: 10px; border-radius: 12px; }
  .scroll-story .dash-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .scroll-story .stat-row { gap: 8px; margin-top: 8px; }
  .scroll-story .stat-box { padding: 9px; }
  .scroll-story .stat-box .s-k,
  .scroll-story .dash-cell .cell-lbl { font-size: 9px; letter-spacing: 0.09em; }
  .scroll-story .stat-box .s-v { font-size: 19px; }
  .scroll-story .comp-add .comp-row { padding: 5px 0 5px 10px; font-size: 12px; }
  .scroll-story .comp-add .comp-row:nth-child(n+5) { display: none; }
  .scroll-story .step-tag { font-size: 9px; padding: 4px 8px; }
  .scroll-story .draw-chart { height: 92px; }
  .scroll-story .bar-row { height: 44px; margin-top: 8px; }
  .scroll-story .gauge { width: 86px; margin: 4px auto 0; }
  .scroll-story .rep-deck { height: 118px; margin: 8px auto !important; }
  .scroll-story .rep-deck .deck-card { width: 96px; height: 116px; }
  .scroll-story .stage-panel .btn { padding: 10px 16px; font-size: 13px; }

  .scroll-story .story-steps {
    position: relative;
    padding-left: 26px;
  }
  .scroll-story .story-progress {
    display: block;
    left: 4px;
    top: 10px;
    bottom: 18px;
    background: var(--hair-2);
  }
  .scroll-story .story-step {
    min-height: 62vh;
    padding: 36px 0;
    justify-content: center;
  }
  .scroll-story .story-step h3 { font-size: 25px; margin-top: 10px; }
  .scroll-story .story-step p { font-size: 16px; line-height: 1.55; max-width: none; }
  .scroll-story .story-step .step-tags { gap: 8px; margin-top: 14px; }
}

/* ---------- dark cap (final CTA) + footer keep the dark-zone defaults ---------- */
.xnav-card:hover { border-color: rgba(207,225,245,0.3); }
.xnav-card .arr { color: var(--ice); }
