/* RankByLeo — Background textures + sky gradients
   Loaded last: adds patterns and soft gradients on top of the flat sky layer.
*/

:root {
  --tex-dot: radial-gradient(circle, rgba(88, 166, 214, 0.18) 1.4px, transparent 1.5px);
  --tex-dot-size: 22px 22px;
  --tex-grid:
    linear-gradient(rgba(0, 107, 189, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 107, 189, 0.07) 1px, transparent 1px);
  --tex-grid-size: 34px 34px;
  --tex-diag: repeating-linear-gradient(135deg, rgba(222, 121, 65, 0.06) 0 2px, transparent 2px 12px);
  --tex-dot-light: radial-gradient(circle, rgba(255, 255, 255, 0.22) 1.4px, transparent 1.5px);
}

/* ---------- Section base: allow decorative layers ---------- */
.section,
.metrics,
.rbl-hero,
.site-footer,
.site-footer--stacked {
  position: relative;
  isolation: isolate;
}

.section > .container,
.metrics > .container,
.site-footer > .container,
.site-footer--stacked > .container {
  position: relative;
  z-index: 1;
}

.section::after,
.metrics::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Must stay behind in-flow content (z-index:0 paints above blocks) */
  z-index: -1;
  pointer-events: none;
}

/* ---------- Tinted sections: mist gradient + dot pattern ---------- */
.section--problem,
.section--cases,
.section--insights,
.section--why,
.section--services {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 55%, #f0f9ff 100%) !important;
}

.section--problem::after,
.section--cases::after,
.section--insights::after,
.section--why::after,
.section--services::after {
  background-image: var(--tex-dot);
  background-size: var(--tex-dot-size);
  opacity: 0.85;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 78%);
}

/* ---------- White sections: fine grid ---------- */
.section--process,
.section--addon,
.section--faq,
.section--why-leo,
.section--clients,
.metrics {
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%) !important;
}

.section--process::after,
.section--addon::after,
.section--faq::after,
.section--why-leo::after,
.section--clients::after,
.metrics::after {
  background-image: var(--tex-grid);
  background-size: var(--tex-grid-size);
  mask-image: radial-gradient(100% 80% at 50% 50%, #000 0%, transparent 82%);
  -webkit-mask-image: radial-gradient(100% 80% at 50% 50%, #000 0%, transparent 82%);
}

/* ---------- Packages: mist + diagonal weave ---------- */
.section--packages {
  background: linear-gradient(160deg, #e8f6fe 0%, #f8fcff 45%, #e0f2fe 100%) !important;
}

.section--packages::after {
  background-image: var(--tex-diag);
}

/* ---------- Testimonials ---------- */
.section--testimonials {
  background: linear-gradient(180deg, #ffffff 0%, #eff8ff 100%) !important;
}

.section--testimonials::after {
  background-image: var(--tex-dot);
  background-size: 26px 26px;
  opacity: 0.7;
}

/* ---------- Final CTA: deep sky gradient + glow ---------- */
.section--cta {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 52%, #0369a1 100%) !important;
  overflow: hidden;
}

.section--cta::after {
  background-image:
    radial-gradient(60% 70% at 12% 8%, rgba(255, 255, 255, 0.28) 0%, transparent 60%),
    radial-gradient(50% 60% at 92% 88%, rgba(255, 255, 255, 0.18) 0%, transparent 60%),
    var(--tex-dot-light);
  background-size: auto, auto, 24px 24px;
}

/* ---------- Footer ---------- */
.site-footer,
.site-footer--stacked {
  background: linear-gradient(180deg, #0369a1 0%, #075985 100%) !important;
}

.site-footer::after,
.site-footer--stacked::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--tex-dot-light);
  background-size: 26px 26px;
  opacity: 0.6;
  display: block !important;
}

/* ---------- Hero: solid brand blue (type color comes from palette) ---------- */
.rbl-hero {
  background: #006bbd !important;
}

.rbl-hero::before {
  background: linear-gradient(200deg, #e0f2fe 0%, #f0f9ff 70%, rgba(240, 249, 255, 0) 100%) !important;
}

.rbl-hero::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

.rbl-hero__inner {
  z-index: 2;
}

.rbl-hero__photo {
  background: linear-gradient(180deg, #e0f2fe 0%, #ffffff 100%);
}

/* ---------- Buttons + accents ---------- */
.rbl-btn--solid,
.btn--primary,
.btn--signal {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 45%, #0284c7 100%) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.28) !important;
}

.rbl-btn--solid:hover,
.btn--primary:hover,
.btn--signal:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 55%, #075985 100%) !important;
  box-shadow: 0 10px 26px rgba(2, 132, 199, 0.34) !important;
}

/* Header CTA — vivid orange, high contrast */
.rbl-header__cta,
.rbl-nav__cta-mobile,
.nav-cta,
.nav-cta--desktop {
  background: linear-gradient(135deg, #ff7a2f 0%, #ff4f00 48%, #e63d00 100%) !important;
  border: 0 !important;
  color: #ffffff !important;
  box-shadow:
    0 8px 22px rgba(255, 79, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

.rbl-header__cta:hover,
.rbl-nav__cta-mobile:hover,
.nav-cta:hover,
.nav-cta--desktop:hover {
  background: linear-gradient(135deg, #ff8a45 0%, #ff5a12 55%, #f04500 100%) !important;
  color: #ffffff !important;
  box-shadow:
    0 12px 28px rgba(255, 79, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.32) !important;
  transform: translateY(-1px);
}

.section--cta .btn--primary {
  background: #ffffff !important;
  color: #0284c7 !important;
  box-shadow: 0 10px 24px rgba(2, 39, 61, 0.22) !important;
}

/* ---------- Infographic accents ---------- */
.rbl-ico {
  background: linear-gradient(140deg, #e0f2fe 0%, #f0f9ff 100%);
}

.rbl-ico--solid,
.rbl-timeline__dot {
  background: linear-gradient(140deg, #38bdf8 0%, #0284c7 100%);
}

.rbl-stack__row--1 {
  background: linear-gradient(120deg, #f0f9ff 0%, #ffffff 100%);
}

.rbl-stack__row--3 {
  background: linear-gradient(120deg, #38bdf8 0%, #0284c7 100%);
  border-color: transparent;
}

.rbl-pipeline__row {
  background: #f3f6f9;
}

.rbl-pipeline__row.is-active {
  background: linear-gradient(120deg, #38bdf8 0%, #0ea5e9 45%, #0284c7 100%);
}

.rbl-ladder__bar i {
  background: linear-gradient(90deg, #7dd3fc 0%, #0ea5e9 60%, #0284c7 100%);
}

.rbl-flow__step.is-accent {
  background: linear-gradient(150deg, #f0f9ff 0%, #e0f2fe 100%);
}

.rbl-band__wash {
  background: linear-gradient(120deg, rgba(2, 132, 199, 0.92) 0%, rgba(14, 165, 233, 0.78) 55%, rgba(3, 105, 161, 0.9) 100%);
  opacity: 1;
}

.rbl-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--tex-dot-light);
  background-size: 24px 24px;
}

.rbl-chart,
.rbl-pipeline {
  background: #ffffff;
}

.rbl-hero__eyebrow {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

/* ---------- Metrics + package highlight ---------- */
.metric--primary {
  background: linear-gradient(140deg, #38bdf8 0%, #0284c7 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

.metric--primary .metric__label,
.metric--primary .metric__desc,
.metric--primary .metric__value,
.metric--primary .metric__index {
  color: #ffffff !important;
}

.metric--primary .metric__tags span {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.metric--cta {
  background: linear-gradient(140deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  color: #0f172a !important;
}

.metric--cta .metric__label,
.metric--cta .metric__desc,
.metric--cta .metric__index {
  color: #334155 !important;
}

.metric--cta .metric__value {
  color: #0284c7 !important;
}

.metric--cta .metric__link {
  color: #0284c7 !important;
  font-weight: 800;
}

.package--featured {
  background: linear-gradient(180deg, #ffffff 0%, #f4fbff 100%) !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.16) !important;
}

.package__badge {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #ffffff !important;
}

/* ---------- Case blocks on success page ---------- */
.section--case-alt {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%) !important;
}

.section--case-cta {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 55%, #0369a1 100%) !important;
}

.logo-wall__item:hover {
  background: linear-gradient(140deg, #ffffff 0%, #f0f9ff 100%);
}

@media (prefers-reduced-motion: reduce) {
  .rbl-hero::after {
    background-image: var(--tex-dot);
  }
}
