/* BLC — custom layer on top of Tailwind CDN
   Minimal, tech-forward accents: grid/dot patterns, glow, keyframes. */

:root {
  --blc-blue: #224db7;
  --blc-blue-dark: #1739a5;
  --blc-ink: #0a1821;
  --blc-slate: #38454a;
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  min-width: 320px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, iframe { max-width: 100%; }

/* Public footer version badge. The value is injected from app.js so every
   standard page always displays the same release number at bottom-right. */
.site-footer-version {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  margin-left: auto;
  min-height: 1.35rem;
  padding: .12rem .42rem;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: rgba(148, 163, 184, .88);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .625rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .035em;
  white-space: nowrap;
}
.site-footer-meta {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  gap: .55rem;
  margin-left: auto;
  white-space: nowrap;
}
.site-footer-meta .site-footer-version { margin-left: 0; }
.site-admin-login {
  color: rgba(148, 163, 184, .88);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .035em;
  text-decoration: none;
  transition: color .15s ease;
}
.site-admin-login:hover { color: #fff; text-decoration: underline; }

/* Keep the off-canvas menu usable on short and landscape mobile screens. */
[data-menu-panel] > div {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
[data-menu-toggle], [data-menu-close] {
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
}

/* ---- Transparent header (top of page) → solid on scroll --------------- */
/* Applies only to headers marked [data-header-transparent] (e.g. index).
   Default (top): transparent bg, white logo/text. .is-solid: white bg. */
[data-header-transparent] {
  background-color: transparent;
}
/* logo turns pure white while transparent */
[data-header-transparent] .site-logo {
  filter: brightness(0) invert(1);
  transition: filter .3s ease;
}
[data-header-transparent] .site-nav { color: #fff; }
[data-header-transparent] .site-nav a { color: rgba(255, 255, 255, .88); }
[data-header-transparent] .site-nav a:hover { color: #fff; }
/* active "Solution" link stays readable on the photo */
[data-header-transparent] .site-nav a[aria-current="page"] { color: #fff; }
/* CTA button: outlined-white while transparent */
[data-header-transparent] .site-cta {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: none;
}
[data-header-transparent] .site-cta:hover { background-color: rgba(255, 255, 255, .12); }
/* menu toggle: white outline while transparent */
[data-header-transparent] .site-toggle {
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
}
[data-header-transparent] .site-toggle:hover { background-color: rgba(255, 255, 255, .12); }

/* Solid state (scrolled) — restore the normal white bar */
[data-header-transparent].is-solid {
  background-color: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: rgb(226 232 240 / .7);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
}
[data-header-transparent].is-solid .site-logo { filter: none; }
[data-header-transparent].is-solid .site-nav { color: var(--blc-ink); }
[data-header-transparent].is-solid .site-nav a { color: var(--blc-ink); }
[data-header-transparent].is-solid .site-nav a:hover { color: var(--blc-blue); }
[data-header-transparent].is-solid .site-nav a[aria-current="page"] { color: var(--blc-blue); }
[data-header-transparent].is-solid .site-cta {
  background-color: var(--blc-blue);
  border-color: transparent;
  color: #fff;
}
[data-header-transparent].is-solid .site-cta:hover { background-color: var(--blc-dark, #1739a5); }
[data-header-transparent].is-solid .site-toggle {
  color: var(--blc-ink);
  border-color: rgb(226 232 240);
}
[data-header-transparent].is-solid .site-toggle:hover { background-color: rgb(248 250 252); }

/* ---- Background patterns ---------------------------------------------- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(34, 77, 183, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 77, 183, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}
.bg-grid-dark {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
}
.bg-dots {
  background-image: radial-gradient(rgba(34, 77, 183, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
}
/* Radial glow used behind dark hero/CTA sections */
.glow-blue::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 50% 0%, rgba(34, 77, 183, 0.35), transparent 70%);
  pointer-events: none;
}

/* ---- Gradient text ---------------------------------------------------- */
.text-gradient {
  background: linear-gradient(100deg, #ffffff 0%, #9db8ff 60%, #224db7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-gradient-blue {
  background: linear-gradient(100deg, #224db7 0%, #4f7bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Cards ------------------------------------------------------------ */
.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(10, 24, 33, 0.25);
  border-color: rgba(34, 77, 183, 0.45);
}

/* ---- Functional advantage icons ------------------------------------- */
.functional-icon {
  width: 42px;
  height: 42px;
  color: var(--blc-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.functional-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.functional-icon-fill svg { fill: currentColor; stroke: none; }

/* ---- Hero carousel ---------------------------------------------------- */
.slides { position: relative; }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: kenburns 8s ease-out forwards;
}
.slide.is-active .slide-bg { animation: kenburns 8s ease-out forwards; }
@keyframes kenburns {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}

.dot { transition: all 0.3s ease; }
.dot.is-active { width: 28px; background-color: #ffffff; }

/* ---- Accordion (FAQ) -------------------------------------------------- */
.acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
[data-acc-item].open .acc-panel { max-height: 640px; }
[data-acc-item].open .acc-icon { transform: rotate(45deg); }
.acc-icon { transition: transform 0.3s ease; }

/* ---- Brand filter tabs (printer) -------------------------------------- */
.brand-tab.is-active {
  background-color: var(--blc-blue);
  border-color: var(--blc-blue);
  color: #fff;
}

/* ---- Reveal on scroll ------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ---- Marquee (partners / brands) ------------------------------------- */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- Misc ------------------------------------------------------------- */
.tab-btn.is-active {
  background-color: var(--blc-blue);
  color: #fff;
  border-color: var(--blc-blue);
}
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ---- Article detail body (rich text from CMS / Quill) ----------------- */
.article-body {
  color: #38454a;
  font-size: 1.05rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.article-body > * + * { margin-top: 1.15rem; }
.article-body h1, .article-body h2, .article-body h3 {
  color: #0a1821; font-weight: 800; line-height: 1.25; margin-top: 2rem;
}
.article-body h1 { font-size: 1.9rem; }
.article-body h2 { font-size: 1.55rem; }
.article-body h3 { font-size: 1.25rem; }
.article-body p { margin-top: 1.15rem; }
.article-body a { color: #224db7; text-decoration: underline; }
.article-body a:hover { color: #1739a5; }
.article-body strong { color: #0a1821; font-weight: 700; }
.article-body ul, .article-body ol { margin-top: 1.15rem; padding-left: 1.5rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-top: 0.4rem; }
.article-body blockquote {
  border-left: 3px solid #224db7; padding-left: 1rem; margin-top: 1.15rem;
  color: #55636b; font-style: italic;
}
.article-body img { max-width: 100%; height: auto; margin-top: 1.5rem; }
.article-body video, .article-body iframe { width: 100%; height: auto; }
.article-body pre {
  max-width: 100%; overflow-x: auto; padding: 1rem;
  -webkit-overflow-scrolling: touch;
}
.article-body table {
  display: block; width: 100%; max-width: 100%; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.article-body h1:first-child, .article-body h2:first-child, .article-body p:first-child { margin-top: 0; }

/* ---- Function-table help tooltips ------------------------------------- */
.fn-tip-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 18px; width: 18px; flex-shrink: 0;
  border: 1px solid #224db7; color: #224db7; background: #fff;
  border-radius: 9999px; font-size: 11px; font-weight: 700; line-height: 1;
  cursor: pointer; transition: all .15s ease;
}
.fn-tip-btn:hover { background: #224db7; color: #fff; }

.fn-tip {
  position: absolute; z-index: 80; max-width: min(320px, calc(100vw - 2rem)); width: max-content;
  background: #0a1821; color: #e7edf2; padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(10,24,33,.28);
  font-size: 12px; line-height: 1.6;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
.fn-tip.is-open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.fn-tip-desc { color: #d4dde5; line-height: 1.6; }
.fn-tip-video {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 10px;
  color: #7ea6ff; font-weight: 600; text-decoration: none;
}
.fn-tip-video:hover { text-decoration: underline; }

/* Improve horizontal data-table scrolling on touch devices. */
.overflow-x-auto {
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 639px) {
  .article-body { font-size: 1rem; line-height: 1.7; }
  .article-body h1 { font-size: 1.65rem; }
  .article-body h2 { font-size: 1.35rem; }
  .article-body h3 { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---- Consent banner (only shown after a Google tag is configured) ---- */
.consent-banner {
  position: fixed; z-index: 100; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 760px; margin: 0 auto; padding: 1rem 1.15rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: #0a1821; color: #dbe5eb; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 50px rgba(10,24,33,.28); font-size: .82rem; line-height: 1.5;
}
.consent-banner a { color: #9db8ff; text-decoration: underline; }
.consent-banner div { display: flex; gap: .5rem; flex-shrink: 0; }
.consent-banner button { padding: .55rem .8rem; border: 1px solid rgba(255,255,255,.3); color: #fff; }
.consent-banner [data-consent-accept] { background: #224db7; border-color: #224db7; }
@media (max-width: 639px) {
  .consent-banner { align-items: stretch; flex-direction: column; }
  .consent-banner div, .consent-banner button { flex: 1; }
}
