/* =========================================================
   BX-SHELL — Shared XP × SaaS chrome for all pages
   Loaded after bx-retro.css (before bx-home.css on index)
   ========================================================= */

:root {
  --shell-max: 1480px;
  --shell-pad: clamp(1.25rem, 2.5vw, 2rem);
  --shell-blue: #4c8dff;
  --shell-blue-hi: #7eb6ff;
}

.bx-page-gutter {
  padding: 20px clamp(12px, 2vw, 28px) 36px;
}

.bx-app-frame--wide,
body .bx-app-frame.bx-app-frame--wide {
  max-width: var(--shell-max);
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  background: #0e1628;
  box-shadow:
    0 0 0 1px rgba(120, 160, 255, 0.12),
    8px 12px 0 rgba(0, 0, 0, 0.55),
    0 30px 80px rgba(0, 0, 0, 0.45);
  position: relative;
}

/* Ambient backdrop */
.bx-home-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bx-home-ambient__grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(76, 141, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 141, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
}
.bx-home-ambient__glow {
  position: absolute;
  width: 60%;
  height: 50%;
  left: 20%;
  top: -8%;
  background: radial-gradient(ellipse at center, rgba(76, 141, 255, 0.28), transparent 68%);
  filter: blur(8px);
  animation: bx-shell-glow 10s ease-in-out infinite alternate;
}
.bx-home-ambient__scan {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.55) 2px,
    rgba(0, 0, 0, 0.55) 3px
  );
}
.bx-home-ambient__dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #7eb6ff;
  box-shadow: 0 0 8px #4c8dff;
  opacity: 0.55;
  animation: bx-shell-dot 7s ease-in-out infinite;
}
@keyframes bx-shell-glow {
  from { opacity: 0.55; transform: translateY(0); }
  to { opacity: 1; transform: translateY(18px); }
}
@keyframes bx-shell-dot {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(-10px); }
}

/* Banner */
.bx-app-frame--wide > .bx-banner-head,
.bx-banner-head {
  position: relative;
  z-index: 5;
}
.bx-app-frame--wide > .bx-banner-head {
  padding: 12px 22px;
  background: linear-gradient(180deg, #2a5aaa 0%, #1a3f7a 48%, #12305e 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Horizontal XP nav */
.bx-top-nav {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #1a2a48 0%, #121c34 100%);
  border-bottom: 1px solid rgba(76, 141, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.bx-top-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid transparent;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.25s, color 0.2s;
  text-decoration: none;
}
.bx-top-nav__item svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
.bx-top-nav__item:hover {
  color: #fff;
  border-color: rgba(126, 182, 255, 0.35);
  background: linear-gradient(180deg, rgba(76, 141, 255, 0.2), rgba(30, 74, 170, 0.25));
  transform: translateY(-1px);
}
.bx-top-nav__item--current {
  color: #fff;
  border: 1px solid rgba(126, 182, 255, 0.55);
  background: linear-gradient(180deg, #4c8dff 0%, #2a5fbf 55%, #1e4aaa 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 16px rgba(76, 141, 255, 0.45);
}

/* Inner page content column */
.bx-page-main,
.bx-app-frame--wide > .bx-flow-column,
.bx-app-frame--wide main.bx-flow-column {
  position: relative;
  z-index: 2;
  padding: clamp(1.5rem, 3vw, 2.5rem) var(--shell-pad) 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.bx-app-frame--wide .bx-doc-boundary {
  max-width: 920px;
  margin-inline: auto;
}

.bx-app-frame--wide .bx-doc-boundary.bx-prose-block--broad,
.bx-app-frame--wide .bx-fetch-hero,
.bx-app-frame--wide .bx-faq-stack__layout,
.bx-app-frame--wide .bx-cta-band {
  max-width: 1100px;
}

/* Modernize common content cards on subpages */
.bx-app-frame--wide .bx-info-box,
.bx-app-frame--wide .bx-playbook-tile,
.bx-app-frame--wide .bx-metric-tile,
.bx-app-frame--wide .bx-faq-stack__item,
.bx-app-frame--wide .bx-scene-tile {
  border-radius: 8px;
  border: 1px solid rgba(126, 182, 255, 0.28);
  background: linear-gradient(165deg, rgba(48, 78, 130, 0.28), rgba(16, 28, 48, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 28px rgba(0, 0, 0, 0.25);
  transition: transform 0.28s ease, border-color 0.25s, box-shadow 0.28s;
}
.bx-app-frame--wide .bx-info-box:hover,
.bx-app-frame--wide .bx-playbook-tile:hover,
.bx-app-frame--wide .bx-metric-tile:hover,
.bx-app-frame--wide .bx-faq-stack__item:hover {
  transform: translateY(-3px);
  border-color: rgba(126, 182, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 14px 32px rgba(0, 0, 0, 0.32),
    0 0 22px rgba(76, 141, 255, 0.16);
}

.bx-app-frame--wide .bx-btn-gloss {
  background: linear-gradient(180deg, #6aa4ff 0%, #4c8dff 42%, #2a5fbf 100%);
  border: 1px solid #7eb6ff;
  border-radius: 7px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 6px 18px rgba(76, 141, 255, 0.3);
  transition: transform 0.2s, filter 0.2s, box-shadow 0.25s;
}
.bx-app-frame--wide .bx-btn-gloss:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}
.bx-app-frame--wide .bx-btn-chrome {
  border-radius: 7px;
  border: 1px solid rgba(126, 182, 255, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(20, 32, 56, 0.65));
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.bx-app-frame--wide .bx-btn-chrome:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 182, 255, 0.55);
}

/* Shared footer */
.bx-home-footer {
  position: relative;
  z-index: 2;
  margin-top: 0.5rem;
  padding: 2rem var(--shell-pad) 1.4rem;
  border-top: 1px solid rgba(76, 141, 255, 0.22);
  background: linear-gradient(180deg, #121c34, #0c1424);
}
.bx-home-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.bx-home-footer__brand p {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
  max-width: 34ch;
}
.bx-home-footer__brand .bx-brand-lockup {
  margin-bottom: 0.25rem;
}
.bx-home-footer h5 {
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ec5ff;
  margin: 0 0 0.75rem;
}
.bx-home-footer a {
  display: block;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.62);
  padding: 0.28rem 0;
  transition: color 0.2s;
  text-decoration: none;
}
.bx-home-footer a:hover {
  color: #7eb6ff;
}
.bx-home-footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}
.bx-home-footer__social {
  display: flex;
  gap: 0.55rem;
}
.bx-home-footer__social a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(126, 182, 255, 0.28);
  background: rgba(76, 141, 255, 0.1);
  color: #9ec5ff;
}
.bx-home-footer__social a:hover {
  background: rgba(76, 141, 255, 0.22);
  color: #fff;
}
.bx-home-footer__social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* —— Unified page titles (premium XP hierarchy) —— */
.bx-app-frame--wide .bx-fetch-hero h1,
.bx-app-frame--wide .bx-feat-intro h1,
.bx-app-frame--wide .bx-faq-stack__aside h1,
.bx-app-frame--wide .bx-cta-band h1,
.bx-app-frame--wide h1.bx-title-xl,
.bx-app-frame--wide .bx-page-main > section > h1 {
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: clamp(2.2rem, 4.6vw, 3.35rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0.35rem 0 1rem;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 0 36px rgba(76, 141, 255, 0.22);
}
.bx-app-frame--wide .bx-fetch-hero h1 em,
.bx-app-frame--wide .bx-feat-intro h1 em,
.bx-app-frame--wide .bx-faq-stack__aside h1 em,
.bx-app-frame--wide .bx-cta-band h1 em,
.bx-app-frame--wide h1.bx-title-xl em {
  font-style: normal;
  color: #7eb6ff;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.45),
    0 0 28px rgba(76, 141, 255, 0.5);
}
.bx-app-frame--wide .bx-fetch-hero .bx-kicker-line,
.bx-app-frame--wide .bx-feat-intro .bx-kicker-line,
.bx-app-frame--wide .bx-faq-stack__aside .bx-kicker-line,
.bx-app-frame--wide .bx-cta-band .bx-kicker-line {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #061018;
  background: linear-gradient(180deg, #9ec5ff, #4c8dff);
  border: 1px solid #7eb6ff;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.bx-app-frame--wide .bx-fetch-hero .bx-copy-lead,
.bx-app-frame--wide .bx-feat-intro > p,
.bx-app-frame--wide .bx-faq-stack__aside .bx-copy-lead {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  max-width: 42ch;
  margin-inline: auto;
}
.bx-app-frame--wide .bx-prose-block h2,
.bx-app-frame--wide .bx-faq-stack__group-title {
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 900px) {
  .bx-home-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .bx-top-nav {
    gap: 4px;
    padding: 8px 10px;
  }
  .bx-top-nav__item {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .bx-home-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* —— Features page showcase —— */
body[data-page="features.html"] .bx-feat-page {
  max-width: 1120px;
  margin: 0 auto;
}
body[data-page="features.html"] .bx-feat-intro {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.25rem;
}
body[data-page="features.html"] .bx-feat-intro .bx-kicker-line {
  display: inline-block;
  margin-bottom: 0.75rem;
}
body[data-page="features.html"] .bx-feat-intro h1 {
  /* size/shadow come from shared shell title rules */
  margin: 0 0 0.85rem;
}
body[data-page="features.html"] .bx-feat-intro > p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
}
body[data-page="features.html"] .bx-feat-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
body[data-page="features.html"] .bx-feat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: center;
  padding: clamp(1.15rem, 2.2vw, 1.6rem);
  border-radius: 8px;
  border: 1px solid rgba(126, 182, 255, 0.26);
  background: linear-gradient(165deg, rgba(48, 78, 130, 0.28), rgba(14, 24, 44, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.28);
  transition: transform 0.28s ease, border-color 0.25s, box-shadow 0.28s;
}
body[data-page="features.html"] .bx-feat-row:hover {
  transform: translateY(-3px);
  border-color: rgba(126, 182, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 36px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(76, 141, 255, 0.14);
}
body[data-page="features.html"] .bx-feat-row--flip {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
body[data-page="features.html"] .bx-feat-row--flip .bx-feat-row__copy {
  order: 2;
}
body[data-page="features.html"] .bx-feat-row--flip .bx-feat-row__visual {
  order: 1;
}
body[data-page="features.html"] .bx-feat-row__copy .bx-feat-tag {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #061018;
  background: linear-gradient(180deg, #9ec5ff, #4c8dff);
  border: 1px solid #7eb6ff;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
body[data-page="features.html"] .bx-feat-row__copy h2 {
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  margin: 0 0 0.65rem;
  color: #fff;
}
body[data-page="features.html"] .bx-feat-row__copy p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
}
body[data-page="features.html"] .bx-feat-window {
  border-radius: 8px;
  background: linear-gradient(180deg, #3a6ccc 0%, #2452a8 40%, #1a3f7a 100%);
  padding: 3px;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.18) inset,
    0 16px 36px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(76, 141, 255, 0.16);
}
body[data-page="features.html"] .bx-feat-window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #fff;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}
body[data-page="features.html"] .bx-feat-window__dots {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}
body[data-page="features.html"] .bx-feat-window__dots span {
  width: 14px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
body[data-page="features.html"] .bx-feat-window__dots .min { background: linear-gradient(180deg, #efe4a8, #c9b24a); }
body[data-page="features.html"] .bx-feat-window__dots .max { background: linear-gradient(180deg, #a8d4a8, #4aa04a); }
body[data-page="features.html"] .bx-feat-window__dots .cls { background: linear-gradient(180deg, #f0a0a0, #c04040); }
body[data-page="features.html"] .bx-feat-shot {
  display: block;
  width: calc(100% - 6px);
  margin: 0 3px 3px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  overflow: hidden;
  cursor: zoom-in;
  background: #0a1020;
  aspect-ratio: 16 / 10;
  position: relative;
}
body[data-page="features.html"] .bx-feat-shot img {
  display: block;
  width: 100%;
  height: 100% !important;
  max-height: none;
  object-fit: contain;
  object-position: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    #0a1020;
}
body[data-page="features.html"] .bx-feat-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 36%);
}
body[data-page="features.html"] .bx-feat-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
}
@media (max-width: 900px) {
  body[data-page="features.html"] .bx-feat-row,
  body[data-page="features.html"] .bx-feat-row--flip {
    grid-template-columns: 1fr;
  }
  body[data-page="features.html"] .bx-feat-row--flip .bx-feat-row__copy,
  body[data-page="features.html"] .bx-feat-row--flip .bx-feat-row__visual {
    order: initial;
  }
  body[data-page="features.html"] .bx-feat-row__visual {
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bx-home-ambient__glow,
  .bx-home-ambient__dot {
    animation: none !important;
  }
}
