/* Compel X — logo-driven theme (green + navy on dark ink, from brand profile) */
:root {
  --cx-green: #105028;
  --cx-green-bright: #1a6b35;
  --cx-green-soft: #e8f5e9;
  --cx-navy: #001040;
  --cx-ink: #041044;
  --cx-ink-soft: #041044;
  --cx-muted: #5f6965;
  --cx-primary: #105028;
  --cx-primary-bright: #1a6b35;
  --cx-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cx-header-h: 7.25rem;
}

html { scroll-behavior: smooth; }

/* Override Tailwind primary tokens to match logo green / navy */
.text-primary,
a.text-primary { color: var(--cx-green) !important; }
.bg-primary { background-color: var(--cx-green) !important; }
.bg-primary-container,
.hover\:bg-primary-container:hover { background-color: var(--cx-green-bright) !important; }
/* Soft icon chips — never navy/blue (icons must stay readable) */
.bg-secondary-container { background-color: var(--cx-green-soft) !important; }
.text-on-secondary-container { color: var(--cx-green) !important; }
.bg-\[\#07563D\] { background-color: var(--cx-ink) !important; }
.bg-\[\#080818\],
.bg-\[\#041044\] { background-color: var(--cx-ink) !important; }
.text-primary-fixed { color: #9fd4a8 !important; }
.border-primary { border-color: var(--cx-green) !important; }
.bg-background { background-color: #f4f7f5 !important; }

main.pt-20 {
  padding-top: var(--cx-header-h) !important;
}

/* ---------- Page motion (keep first paint visible for speed) ---------- */
header.cx-site-header,
header.fixed {
  animation: cxHeaderIn 0.45s var(--cx-ease) both;
}
@keyframes cxHeaderIn {
  from { transform: translateY(-12px); opacity: 0.85; }
  to { transform: translateY(0); opacity: 1; }
}

/* Section-wise paint: browser skips layout/paint for off-screen sections */
main section.cx-section-defer,
main > section:not(.cx-hero-slider):not(:first-of-type) {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.cx-reveal {
  opacity: 1;
  transform: none;
}
html.cx-js .cx-reveal:not(.cx-visible) {
  opacity: 0;
  transform: translateY(18px);
}
html.cx-js .cx-reveal {
  transition: opacity 0.45s var(--cx-ease), transform 0.45s var(--cx-ease);
}
html.cx-js .cx-reveal.cx-visible {
  opacity: 1;
  transform: translateY(0);
}

.cx-defer-slot {
  min-height: var(--cx-defer-min, 420px);
}
.cx-defer-slot.is-hydrated {
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  html.cx-js .cx-reveal:not(.cx-visible),
  html.cx-js .cx-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Top bar ---------- */
.cx-site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.cx-topbar {
  background: var(--cx-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.cx-topbar-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.45rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .cx-topbar-inner { padding-left: 3rem; padding-right: 3rem; }
}

.cx-topbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.cx-topbar-left a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cx-topbar-left a:hover { color: #b8e6b8; }

.cx-topbar-left .material-symbols-outlined {
  font-size: 16px;
  color: #7dcf7d;
}

.cx-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cx-social {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cx-social:hover {
  background: var(--cx-green);
  color: #fff;
  transform: translateY(-1px);
}

.cx-social svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- Navbar ---------- */
.cx-navbar {
  background: #ffffff;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
}

.cx-navbar-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .cx-navbar-inner { padding-left: 3rem; padding-right: 3rem; }
}

.cx-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.cx-brand img {
  height: 52px;
  width: auto;
  max-width: 220px;
  display: block;
  object-fit: contain;
}

.cx-nav-desktop {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

.cx-nav-desktop a {
  font-size: 14px;
  font-weight: 600;
  color: #131e1a;
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: 0.25rem;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.cx-nav-desktop a:hover {
  color: var(--cx-green);
  background: #e8f5e9;
}

.cx-nav-desktop a.is-active {
  color: #ffffff !important;
  background: var(--cx-green);
}

.cx-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.cx-cta {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--cx-green);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.cx-cta:hover { background: var(--cx-green-bright); }
.cx-cta:active { transform: scale(0.98); }

.cx-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #d0ddd6;
  border-radius: 0.35rem;
  background: #f4f7f5;
  color: var(--cx-green);
  cursor: pointer;
}

.cx-menu-toggle .material-symbols-outlined { font-size: 24px; }

@media (min-width: 1100px) {
  .cx-nav-desktop { display: flex; }
  .cx-cta { display: inline-flex; }
  .cx-menu-toggle { display: none; }
  .cx-brand img { height: 52px; }
  :root { --cx-header-h: 7.5rem; }
}

/* ---------- Mobile panel ---------- */
.cx-mobile-panel {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 0.75rem 1.5rem 1.25rem;
}

.cx-mobile-panel.is-open { display: block; }

.cx-mobile-panel a {
  display: block;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid #eef2f0;
  color: #131e1a;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.cx-mobile-panel a:hover,
.cx-mobile-panel a.is-active {
  color: var(--cx-green);
}

.cx-mobile-panel .cx-mobile-cta {
  margin-top: 1rem;
  text-align: center;
  background: var(--cx-green);
  color: #fff !important;
  border: none;
  border-radius: 0.25rem;
  padding: 0.85rem 1rem;
}

.cx-mobile-panel .cx-mobile-meta {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #5f6965;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.cx-menu-open { overflow: hidden; }

/* ---------- Breadcrumb ---------- */
.cx-breadcrumb-bar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e2e8f0;
  backdrop-filter: blur(8px);
}
.cx-breadcrumb-bar .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0.65rem 0;
  font-size: 12px;
  font-weight: 600;
}
.cx-breadcrumb-bar .breadcrumb-item { display: flex; align-items: center; }
.cx-breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: #bec9c0;
  padding: 0 0.5rem;
}
.cx-breadcrumb-bar .breadcrumb-item a {
  color: #5f6965;
  text-decoration: none;
}
.cx-breadcrumb-bar .breadcrumb-item a:hover { color: var(--cx-green-bright); }
.cx-breadcrumb-bar .breadcrumb-item.active { color: var(--cx-green); }

/* ---------- Hero slider arrows (L/R) ---------- */
.cx-hero-slider { position: relative; }

.cx-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(8, 72, 0, 0.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.cx-hero-arrow:hover {
  background: var(--cx-green);
  transform: translateY(-50%) scale(1.05);
}

.cx-hero-prev { left: 1rem; }
.cx-hero-next { right: 1rem; }

@media (min-width: 1024px) {
  .cx-hero-prev { left: 1.5rem; }
  .cx-hero-next { right: 1.5rem; }
}

.cx-hero-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
}

.cx-hero-dots-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(8, 8, 24, 0.55);
  backdrop-filter: blur(10px);
  padding: 0.4rem;
  border-radius: 999px;
  max-width: 100%;
}

.cx-hero-dots .hero-dot {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
}

.cx-hero-dots .hero-dot.bg-primary,
.cx-hero-dots .hero-dot.is-active {
  background: var(--cx-green) !important;
  color: #fff !important;
}

@media (max-width: 640px) {
  .cx-hero-dots .hero-dot {
    padding: 0.3rem 0.45rem;
    font-size: 9px;
  }
  .cx-hero-arrow {
    width: 40px;
    height: 40px;
  }
  .cx-topbar-left a span:not(.material-symbols-outlined) {
    font-size: 12px;
  }
}

/* Hero image Ken Burns */
.hero-slide .bg-cover {
  animation: cxKenBurns 14s ease-in-out infinite alternate;
  transform-origin: center center;
}
@keyframes cxKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
.hero-slide .max-w-2xl {
  animation: cxHeroCopy 0.85s var(--cx-ease) both;
}
@keyframes cxHeroCopy {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.cx-lift {
  transition: transform 0.35s var(--cx-ease), box-shadow 0.35s var(--cx-ease);
}
.cx-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -8px rgba(8, 72, 0, 0.14);
}

/* ---------- Responsive content polish ---------- */
@media (max-width: 767px) {
  .cx-hero-slider,
  .cx-hero-slider.h-\[700px\] {
    height: 520px !important;
    min-height: 520px;
  }
  .hero-slide .font-display-hero,
  .hero-slide h1,
  .hero-slide h2 {
    font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
    line-height: 1.15 !important;
  }
  .fixed.bottom-6.right-6 {
    bottom: 1rem;
    right: 0.75rem;
    gap: 0.5rem !important;
  }
  .fixed.bottom-6.right-6 a,
  .fixed.bottom-6.right-6 button {
    width: 44px !important;
    height: 44px !important;
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .cx-hero-slider {
    height: 600px !important;
  }
  .cx-brand img { height: 48px; }
}

/* Footer brand logo */
footer img[alt*="Compel X"] {
  height: 40px !important;
  width: auto !important;
  background: transparent;
}

img { image-rendering: auto; }

@media (prefers-reduced-motion: reduce) {
  body, header.cx-site-header, .cx-reveal, .hero-slide .bg-cover, .hero-slide .max-w-2xl {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
/* Page hero with breadcrumb over image */
.cx-page-hero {
  position: relative;
  min-height: 240px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  overflow: hidden;
}

.cx-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(8, 8, 24, 0.88) 0%, rgba(8, 72, 0, 0.72) 55%, rgba(8, 8, 24, 0.55) 100%);
  z-index: 1;
}

.cx-page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 3rem;
}

@media (min-width: 1024px) {
  .cx-page-hero-inner { padding-left: 3rem; padding-right: 3rem; padding-top: 3.5rem; padding-bottom: 3.75rem; }
  .cx-page-hero { min-height: 280px; }
}

.cx-page-bc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.75);
}

.cx-page-bc a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.cx-page-bc a:hover { color: #b8e6b8; }

.cx-page-bc .sep { opacity: 0.5; margin: 0 0.15rem; }

.cx-page-bc .current { color: #b8e6b8; }

.cx-page-hero h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  color: #fff;
}

.cx-page-hero .cx-page-sub {
  max-width: 40rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

@media (min-width: 768px) {
  .cx-page-hero .cx-page-sub { font-size: 1.125rem; }
}

/* ---------- Brand ecosystem smooth marquee (horizontal only) ---------- */
.cx-brand-marquee {
  position: relative;
  width: 100%;
  padding: 0.25rem 0 0.5rem;
  overflow: hidden;
}

.cx-brand-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(2rem, 8vw, 6rem);
  z-index: 2;
  pointer-events: none;
}

.cx-brand-fade-left {
  left: 0;
  background: linear-gradient(90deg, #ffffff 15%, rgba(255, 255, 255, 0));
}

.cx-brand-fade-right {
  right: 0;
  background: linear-gradient(270deg, #ffffff 15%, rgba(255, 255, 255, 0));
}

.cx-brand-row {
  overflow: hidden;
  width: 100%;
  display: block;
}

.cx-brand-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: max-content !important;
  max-width: none !important;
  gap: 0.85rem;
  will-change: transform;
}

/* Right → left ticker */
.cx-brand-row-rtl .cx-brand-track {
  animation: cxBrandScrollRtl 90s linear infinite;
}

.cx-brand-row-ltr .cx-brand-track {
  animation: cxBrandScrollLtr 100s linear infinite;
}

.cx-brand-marquee:hover .cx-brand-track {
  animation-play-state: paused;
}

.cx-brand-tile {
  flex: 0 0 auto !important;
  width: 180px !important;
  height: 108px !important;
  min-width: 180px !important;
  max-width: 180px !important;
  border: none;
  background: transparent;
  display: block !important;
  padding: 0 !important;
  margin: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  transition: transform 0.25s ease;
}

.cx-brand-tile:hover {
  transform: translateY(-2px);
}

.cx-brand-tile img {
  width: 180px !important;
  height: 108px !important;
  max-width: none !important;
  object-fit: contain !important;
  display: block !important;
}

@keyframes cxBrandScrollRtl {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes cxBrandScrollLtr {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  /* Keep horizontal layout — only stop the animation */
  .cx-brand-row-ltr .cx-brand-track,
  .cx-brand-row-rtl .cx-brand-track {
    animation: none !important;
  }
}

@media (max-width: 767px) {
  .cx-brand-tile {
    width: 140px !important;
    height: 84px !important;
    min-width: 140px !important;
    max-width: 140px !important;
  }
  .cx-brand-tile img {
    width: 140px !important;
    height: 84px !important;
  }
  .cx-brand-row-rtl .cx-brand-track { animation-duration: 55s; }
}
