/* ==========================================================================
   BIDWISE BUREAU — RESTYLE LAYER (2026-10-31) — CONSISTENCY PASS: DARK
   The static estate now wears the SAME identity as the platform at the
   root: near-black surfaces (#050505 / #090909 / #101114), whites
   (#FFFFFF / #D6D6DB / #92929B), Primary cobalt #155EEF, Deep cobalt
   #0047AB, Dark cobalt #082B63, helper #739EF5, borders
   rgba(255,255,255,.12), Manrope + IBM Plex Mono, 4px radii (pills gone).
   This supersedes the Stage 3 paper variant: the former white ".invert"
   sections are converted to dark in this layer, and the base theme's
   Space Grotesk / Newsreader stack is remapped to Manrope via its own
   --font / --serif variables (this layer loads last).
   Loads AFTER style.css + avatar-mascot.css. No copy, price, form,
   link or mascot behaviour is changed by this layer.
   ========================================================================== */

@font-face { font-family: 'Manrope'; src: url('/fonts/manrope-var.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibmplexmono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibmplexmono-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --cobalt: #155EEF;
  --cobalt-dark: #0047AB;
  --tint: #739EF5;
  --night: #050505;
  --mist: #101114;
  --rs-ease: cubic-bezier(0.22, 0.75, 0.25, 1);
  --rs-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* base-theme remaps (style.css variables, overridden by cascade order) */
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --black: #050505;
  --panel: #101114;
  --panel-2: #17181C;
}
/* serif-italic accents become upright Manrope, as on the platform */
.section-title em, .serif-accent, .hero-title .rl:last-child > span,
.excerpt-body blockquote, .article-body blockquote,
.pricing-body .lede strong { font-style: normal; }

/* ---------- global accents ---------- */
::selection { background: var(--cobalt); color: #fff; }
.invert ::selection { background: var(--cobalt); color: #fff; }
:focus-visible { outline-color: var(--tint); }
.invert :focus-visible { outline-color: var(--tint); }
::-webkit-scrollbar-thumb { background: var(--cobalt-dark); }
.progress { mix-blend-mode: normal; }
.progress span { background: linear-gradient(90deg, var(--night), var(--cobalt), var(--tint)); }

/* ---------- header ---------- */
.brand span { border-bottom: 3px solid var(--cobalt); padding-bottom: 1px; }
.nav-links a::after { background: var(--cobalt); height: 2px; }
.site-header .nav-cta.btn-solid { background: var(--cobalt); color: #fff; }
.site-header .nav-cta.btn-solid:hover { background: var(--cobalt-dark); box-shadow: 0 0 44px rgba(21, 94, 239, 0.45); }
body.menu-open .site-header::before { opacity: 1; }
body.menu-open .site-header { border-bottom: 1px solid #23232C; }

/* ---------- buttons: cobalt primary, platform radii (no pills) ---------- */
.btn { border-radius: 4px; }
.btn-solid { background: var(--cobalt); color: #fff; }
.btn-solid:hover { background: var(--cobalt-dark); box-shadow: 0 0 44px rgba(21, 94, 239, 0.45); }
.btn-solid::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent); }
.invert .btn-solid { background: var(--cobalt); color: #fff; }
.invert .btn-solid:hover { background: var(--cobalt-dark); box-shadow: 0 0 44px rgba(21, 94, 239, 0.4); }
.invert .btn-solid::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent); }
.btn-ghost:hover { border-color: var(--tint); }
.invert .btn-ghost { border-color: rgba(255, 255, 255, 0.24); color: #fff; }
.invert .btn-ghost:hover { border-color: var(--tint); background: rgba(255, 255, 255, 0.06); }
.btn-dark { background: #fff; color: #050505; }
a.btn-dark { color: #050505; } /* beats base .article-body a{color:#fff} */
.btn-dark:hover { box-shadow: 0 0 44px rgba(255, 255, 255, 0.25); }
.price-hint { border-radius: 4px; }

/* ---------- eyebrows / section numbers: IBM Plex Mono, cobalt-text ---------- */
.micro { color: var(--tint); font-family: var(--rs-mono); }
.invert .micro { color: var(--tint); }
#services > .wrap > .micro::before { color: var(--tint); }
#process .process-sticky > .micro::before { color: var(--tint); }
#samples > .wrap > .micro::before { color: var(--tint); }
#pricing > .wrap > .micro::before { color: var(--tint); }
#faq .wrap > .micro::before { color: var(--tint); }
#contact .contact-copy > .micro::before { color: var(--tint); }

/* ---------- hero: full-bleed cobalt-duotone photograph ---------- */
.hero { background: #050505; }
.hero-photo { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  filter: grayscale(1) contrast(1.08); opacity: 0.5;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(5, 5, 5, 0.62), rgba(0, 71, 171, 0.2) 42%, rgba(5, 5, 5, 0.88) 78%, #050505);
}
.hero-stats { border-top: 2px solid var(--cobalt); }
.stat strong { font-variant-numeric: tabular-nums; }

/* ---------- marquee: platform band ---------- */
.marquee {
  background: linear-gradient(120deg, var(--night), #0B0B10 70%);
  border-block: 1px solid rgba(255, 255, 255, 0.12);
}
.marquee-track span { color: #fff; font-family: var(--rs-mono); font-size: 0.82rem; letter-spacing: 0.24em; }
.marquee-track i { color: var(--tint); }

/* ==========================================================================
   INVERT CONVERSION — former white sections are dark platform surfaces.
   Scoped variable flips do most of the work: inside .invert, the base
   theme's "on-light" text greys become the platform's "on-dark" greys.
   ========================================================================== */
.invert {
  background: #090909; color: #D6D6DB;
  --ink-2: #D6D6DB;
  --ink-3: #92929B;
  --hline: rgba(255, 255, 255, 0.12);
}
.section.invert { border-block: 1px solid rgba(255, 255, 255, 0.07); }
.section-process.invert { background: #090909; }
.section-contact.invert { background: #090909; }
.invert .section-title { color: #fff; }
.invert .lede { color: #D6D6DB; }
.invert .lede strong { color: #fff; }
/* process steps (were styled for white) */
.section-process.invert::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}
.process-steps { border-top-color: rgba(255, 255, 255, 0.12); }
.process-steps::before { background: linear-gradient(var(--cobalt), rgba(255, 255, 255, 0.14)); }
.step { border-bottom-color: rgba(255, 255, 255, 0.12); }
.step::before { background: var(--cobalt); }
.step:hover { background: rgba(255, 255, 255, 0.03); }
.step-num { -webkit-text-stroke-color: #6a6a6a; }
.step:hover .step-num { color: var(--cobalt); -webkit-text-stroke-color: var(--cobalt); }
.invert .step h3 { color: #fff; }
.invert .step p { color: #D6D6DB; }
.process-media {
  border-color: rgba(255, 255, 255, 0.14); border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.process-media img { border-radius: 4px; }
/* article typography inside former-light sections */
.invert .article-body p, .invert .article-body li, .invert .article-body td { color: #D6D6DB; }
.invert .article-body h2, .invert .article-body h3, .invert .article-body strong,
.invert .article-body a:not(.btn), .invert .article-body th { color: #fff; }
.invert .article-body th, .invert .article-body td { border-bottom-color: rgba(255, 255, 255, 0.12); }
.invert .article-body li::marker { color: var(--tint); }
.invert .article-body blockquote { border-left-color: var(--cobalt); color: #fff; }
/* contact block inside former-light sections */
.invert .contact-points li { color: #D6D6DB; }
.contact-points li::before { color: var(--cobalt); }
.invert .contact-mail { color: #92929B; }
.invert .contact-mail a { color: #fff; text-decoration-color: var(--cobalt); }
.contact-media img {
  border-color: rgba(255, 255, 255, 0.14); border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
/* the enquiry form card: dark surface, dark fields (was a white card) */
.contact-form {
  background: #101114; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 6px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}
.field label { color: #92929B; font-family: var(--rs-mono); }
.field input, .field select, .field textarea {
  color: #fff; background: #17181C; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 4px;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--tint); background: #101114;
  box-shadow: 0 0 0 3px rgba(115, 158, 245, 0.22);
}
.field input[type="checkbox"], .check input { accent-color: var(--cobalt); }
.form-note { color: #92929B; }
.form-error { color: #F09595; }
.form-error a { color: #F09595; }
.form-success { border: 1px solid var(--cobalt); border-radius: 6px; background: #17181C; }
.form-success h3 { color: #fff; }
.form-success p { color: #D6D6DB; }

/* ---------- services / product stack rows ---------- */
.stack-card { box-shadow: inset 0 0 0 0 var(--cobalt); transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.stack-card:hover { background: #17181C; box-shadow: inset 5px 0 0 0 var(--cobalt); }
.stack-card:hover .card-num { color: var(--cobalt); -webkit-text-stroke-color: var(--cobalt); }
.stack-card:hover h3 { color: #fff; }
.stack-card:hover p { color: var(--gray-2); }
.stack-card:hover .price-hint { color: var(--cobalt); border-color: var(--cobalt); }
.price-hint a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- sample cards ---------- */
.sample-card { border-radius: 6px; }
.sample-card:hover { border-color: rgba(115, 158, 245, 0.55); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55); }
.excerpt-body blockquote { border-left-color: var(--cobalt); }
.excerpt summary:hover { color: var(--tint); }
.services-media img { border-radius: 6px; }

/* ---------- tables: platform header treatment ---------- */
.article-body th, .excerpt-body th { background: var(--night); color: #fff; padding: 12px 14px; }
.invert .article-body th { background: #050505; color: #fff; }
.article-body tbody tr, .excerpt-body tbody tr { transition: background 0.25s var(--rs-ease); }
.article-body tbody tr:hover, .excerpt-body tbody tr:hover { background: rgba(115, 158, 245, 0.09); }
.invert .article-body tbody tr:hover { background: rgba(115, 158, 245, 0.09); }
.table-scroll th { font-family: var(--rs-mono); letter-spacing: 0.08em; }

/* ---------- FAQ ---------- */
.faq-item[open] .faq-q { color: var(--tint); }
.faq-item summary:hover .faq-x::before, .faq-item summary:hover .faq-x::after { background: var(--tint); }

/* ---------- footer ---------- */
.footer-links a:hover { color: var(--tint); }
.footer-cta { border-color: rgba(255, 255, 255, 0.12); border-radius: 6px; }
.contact-mail a { text-decoration-color: var(--cobalt); }

/* ---------- subpage heroes: duotone photo + editorial variants ---------- */
.page-hero { background: #050505; }
.page-hero-photo { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.page-hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 32%;
  filter: grayscale(1) contrast(1.08); opacity: 0.42;
}
.page-hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(5, 5, 5, 0.94) 26%, rgba(5, 5, 5, 0.45) 62%, rgba(5, 5, 5, 0.6)),
              linear-gradient(to top, #050505, transparent 45%);
}
.page-hero .wrap { position: relative; z-index: 1; }
.breadcrumb a:hover { color: var(--tint); }
.page-media { position: relative; border-radius: 6px; }
.page-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(150deg, rgba(5, 5, 5, 0.5), rgba(0, 71, 171, 0.14) 45%, rgba(5, 5, 5, 0.42));
}
/* blog + resources: masthead treatment (serif var now resolves to Manrope) */
body.rs-editorial .page-title { font-weight: 700; letter-spacing: -0.02em; }
body.rs-editorial .page-hero { border-bottom: 4px double rgba(255, 255, 255, 0.35); }
body.rs-editorial .post-item h2 a:hover { color: var(--tint); text-decoration: none; }
.article-body li::marker { color: var(--tint); }
.article-body blockquote { border-left-color: var(--cobalt); }

/* ---------- injected: bar charts (real counts, built by restyle.js) ---------- */
.rs-chart {
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel);
  padding: clamp(22px, 3vw, 34px); margin: 34px 0;
}
.invert .rs-chart, .rs-chart.on-light { background: var(--panel); border-color: var(--line); color: #D6D6DB; }
.rs-chart-title {
  font-family: var(--rs-mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--tint); margin-bottom: 20px;
}
.invert .rs-chart-title, .rs-chart.on-light .rs-chart-title { color: var(--tint); }
.rs-bar-row { display: grid; grid-template-columns: 170px 1fr 56px; gap: 14px; align-items: center; margin: 10px 0; font-size: 0.92rem; }
.rs-bar-row .rs-bar-label { color: var(--gray-1); font-weight: 500; }
.invert .rs-bar-label, .rs-chart.on-light .rs-bar-label { color: var(--gray-1); }
.rs-bar-track { background: rgba(255, 255, 255, 0.09); height: 20px; border-radius: 4px; overflow: hidden; }
.invert .rs-bar-track, .rs-chart.on-light .rs-bar-track { background: rgba(255, 255, 255, 0.09); }
.rs-bar-fill { background: var(--cobalt); height: 100%; width: 0; transition: width 1.1s var(--rs-ease); }
.rs-bar-fill.go { width: var(--w, 50%); }
.rs-bar-val { font-family: var(--rs-mono); font-variant-numeric: tabular-nums; text-align: right; color: #fff; }
.invert .rs-bar-val, .rs-chart.on-light .rs-bar-val { color: #fff; }
.rs-chart-note { margin-top: 16px; font-size: 0.84rem; color: var(--gray-3); }
.invert .rs-chart-note, .rs-chart.on-light .rs-chart-note { color: var(--gray-3); }

/* ---------- injected: flowsheet (methodology, built by restyle.js) ---------- */
.rs-flow-sec { padding: clamp(48px, 6vw, 72px) 0 8px; }
.rs-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 18px; position: relative; margin-top: 10px; }
.rs-flow::before {
  content: ""; position: absolute; top: 26px; left: 5%; right: 5%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--cobalt) 0 10px, transparent 10px 20px);
  animation: rsBeam 1.2s linear infinite;
}
@keyframes rsBeam { to { background-position: 24px 0; } }
.rs-stage { text-align: center; padding: 0 6px; position: relative; opacity: 0.35; transition: opacity 0.6s var(--rs-ease); background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }
.rs-stage.lit { opacity: 1; }
.rs-stage .rs-dot {
  width: 52px; height: 52px; border-radius: 50%; background: #0B0B10; border: 2px solid var(--cobalt);
  color: var(--tint); font-family: var(--rs-mono); font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; position: relative; z-index: 1;
  transition: background 0.4s, color 0.4s, box-shadow 0.4s;
}
.rs-stage.lit .rs-dot { background: var(--cobalt); color: #fff; box-shadow: 0 0 0 8px rgba(0, 71, 171, 0.28); }
.rs-stage h3 { font-size: 0.98rem; font-weight: 600; color: #fff; line-height: 1.25; }
.rs-stage:hover h3, .rs-stage:focus-visible h3 { color: var(--tint); }

/* ---------- reveal for injected blocks ---------- */
.rs-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--rs-ease), transform 0.9s var(--rs-ease); }
.rs-reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   NAV — restore desktop nav 901–1100px, platform hamburger <=900px.
   (style.css hides the desktop nav at <=1100px; the platform pattern
   keeps it until 900px, then: brand left + CTA + 44px burger, one row,
   slide-down panel. Menu mechanics stay main.js: body.menu-open +
   .nav-overlay.open + aria-expanded + Esc.)
   ========================================================================== */
@media (max-width: 1100px) {
  .nav-desktop { display: block; }
  .site-header .nav-cta { display: inline-flex; }
  .menu-toggle { display: none; }
}
@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .site-header .nav {
    grid-template-columns: auto 1fr auto; gap: 14px; padding-block: 12px;
  }
  .brand { grid-column: 1; grid-row: 1; justify-self: start; font-size: 0.98rem; }
  .site-header .nav-cta {
    display: inline-flex; grid-column: 2; grid-row: 1; justify-self: end;
    padding: 9px 16px; font-size: 0.8rem; white-space: nowrap;
  }
  .menu-toggle {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    grid-column: 3; grid-row: 1; justify-self: end;
    width: 44px; height: 44px; padding: 0;
    background: transparent; border: 1px solid #3A3A48; border-radius: 4px; cursor: pointer;
    position: relative; z-index: 130;
  }
  .menu-toggle span { width: 22px; height: 2px; background: #fff; }
  .menu-toggle:focus-visible { outline: 3px solid var(--tint); outline-offset: 2px; }

  /* slide-down panel (was: full-screen overlay) */
  .nav-overlay {
    inset: 0 0 auto 0; height: auto; max-height: 100svh; overflow-y: auto;
    background: #090909; border-bottom: 2px solid var(--cobalt);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    display: block; padding: 104px 20px 26px;
  }
  .nav-overlay ul { text-align: left; display: block; }
  .nav-overlay li { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
  .nav-overlay li:last-child { border-bottom: 0; }
  .nav-overlay a {
    display: flex; align-items: center; gap: 14px;
    font-size: 1.28rem; font-weight: 600; letter-spacing: -0.01em;
    padding: 13px 14px; min-height: 48px;
    border-left: 3px solid transparent; border-radius: 0 4px 4px 0;
  }
  .nav-overlay a:hover, .nav-overlay a:focus-visible { border-left-color: var(--cobalt); background: #101114; color: #fff; }
  .nav-overlay .mnum { color: var(--tint); vertical-align: baseline; margin-right: 0; font-size: 0.72rem; }
}

/* ---------- flowsheet + charts on small screens ---------- */
@media (max-width: 900px) {
  .rs-flow { grid-template-columns: repeat(2, 1fr); }
  .rs-flow::before { display: none; }
}
@media (max-width: 640px) {
  .rs-flow { grid-template-columns: 1fr; gap: 18px; }
  .rs-stage { text-align: left; display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; align-items: center; }
  .rs-stage .rs-dot { margin: 0; }
  .rs-bar-row { grid-template-columns: 104px 1fr 44px; gap: 10px; font-size: 0.86rem; }
  .hero-photo img { opacity: 0.38; }
}
/* touch targets */
@media (pointer: coarse) {
  .nav-overlay a { min-height: 52px; }
  .footer-links a { padding-block: 4px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rs-reveal { opacity: 1; transform: none; transition: none; }
  .rs-bar-fill { transition: none; width: var(--w, 50%); }
  .rs-flow::before { animation: none; }
  .rs-stage { transition: none; opacity: 1; }
  .stack-card, .article-body tbody tr, .excerpt-body tbody tr { transition: none; }
}
