:root {
  --ink: #12181f;
  --ink-2: #1e2a38;
  --forest: #1e6b45;
  --forest-dark: #123d28;
  --forest-light: #2f8f5c;
  --gold: #c9a15a;
  --paper: #ffffff;
  --panel: #12181f;
  --muted: #5b6572;
  --border: #e2ddd0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
  color: var(--ink);
  background-color: var(--paper);
}

h1, h2, h3, h4, .font-heading {
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.02em;
}

.display {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.brand-display {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.86;
}

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

/* Reveal-on-scroll: only hidden once JS confirms it can animate (see main.js).
   Without JS, content stays fully visible for accessibility/SEO. */
.js-enabled .reveal {
  opacity: 0;
  transform: translateY(16px);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 1.5px;
  width: 0;
  background: var(--ink);
  transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.btn-primary {
  background-color: var(--ink);
  color: #fff;
  transition: background-color 0.25s ease, transform 0.2s ease;
}
.btn-primary:hover {
  background-color: var(--forest);
  transform: translateY(-2px);
}

/* Accordion */
.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-trigger {
  cursor: pointer;
}
.accordion-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.accordion-icon::before,
.accordion-icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.accordion-icon::before {
  left: 0;
  top: 50%;
  width: 100%;
  height: 1.5px;
  transform: translateY(-50%);
}
.accordion-icon::after {
  top: 0;
  left: 50%;
  width: 1.5px;
  height: 100%;
  transform: translateX(-50%);
}
.accordion-item.open .accordion-icon::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.accordion-item.open .accordion-panel {
  max-height: 400px;
}

.asterisk {
  display: inline-block;
  color: var(--forest);
}

.stat-plus {
  color: var(--forest);
}

.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s ease;
}
.mobile-menu.open {
  transform: translateX(0);
}

.header-solid {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}

/* Pages that open on a full-bleed dark hero (see .glow-section) need a
   light header until it scrolls solid, otherwise dark nav text disappears
   against the dark hero behind it. */
body.hero-dark #site-header:not(.header-solid) .nav-link,
body.hero-dark #site-header:not(.header-solid) .header-logo-text {
  color: #fff;
}
body.hero-dark #site-header:not(.header-solid) .nav-link::after {
  background: #fff;
}
body.hero-dark #site-header:not(.header-solid) .header-menu-btn svg path {
  stroke: #fff;
}
body.hero-dark #site-header:not(.header-solid) .btn-primary {
  background-color: #fff;
  color: var(--ink);
}
body.hero-dark #site-header:not(.header-solid) .btn-primary:hover {
  background-color: var(--forest);
  color: #fff;
}

/* Logo swap: white+green mark on the dark hero, navy+green mark once the
   header goes solid white on scroll (or on pages with no dark hero). */
.logo-light {
  display: none;
}
body.hero-dark #site-header:not(.header-solid) .logo-dark {
  display: none;
}
body.hero-dark #site-header:not(.header-solid) .logo-light {
  display: block;
}

::selection {
  background: var(--ink);
  color: #fff;
}

/* ---------- Floating rounded panel (BA Studios-style) ---------- */
.panel {
  background-color: var(--panel);
  border-radius: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .panel {
    border-radius: 36px;
  }
}
.panel-content .text-muted {
  color: rgba(255, 255, 255, 0.6);
}
.panel .border-border {
  border-color: rgba(255, 255, 255, 0.14);
}
.panel .accordion-icon::before,
.panel .accordion-icon::after {
  background: #fff;
}

/* Iridescent gradient "smoke" hero backdrop, in-brand green/gold/navy */
.smoke {
  position: absolute;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(45% 55% at 25% 30%, rgba(47, 143, 92, 0.55), transparent 60%),
    radial-gradient(40% 50% at 75% 25%, rgba(201, 161, 90, 0.35), transparent 65%),
    radial-gradient(55% 60% at 60% 75%, rgba(30, 107, 69, 0.5), transparent 60%),
    radial-gradient(35% 45% at 15% 80%, rgba(18, 61, 40, 0.6), transparent 60%);
  filter: blur(60px) saturate(130%);
  animation: smokeDrift 18s ease-in-out infinite alternate;
}
@keyframes smokeDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(3%, -4%, 0) scale(1.08); }
}
.panel-content {
  position: relative;
  z-index: 1;
}

/* Tag pill for services */
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
}

/* Integration icon cards (home) */
.integration-card {
  display: flex;
  width: 5rem;
  height: 5rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(18, 24, 31, 0.04);
}
.integration-card img {
  width: 2rem;
  height: 2rem;
  margin: auto;
  object-fit: contain;
}
.integration-card-center {
  width: 5.5rem;
  height: 5.5rem;
  border-color: rgba(18, 24, 31, 0.18);
  box-shadow: 0 10px 25px rgba(18, 24, 31, 0.12);
}
.integration-card-center img {
  width: 3.5rem;
  height: 3.5rem;
}

/* Numbered badge for services list */
.num-badge {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Interactive process/service steps (home) */
.feature-step {
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}
.feature-step.active,
.feature-step.done {
  opacity: 1;
}
.feature-step-badge {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.feature-step.active .feature-step-badge {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  transform: scale(1.08);
}
.feature-step.done .feature-step-badge {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.feature-step-progress {
  position: relative;
  height: 2px;
  max-width: 28rem;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.feature-step-progress span {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--forest);
  border-radius: 999px;
}
@keyframes featureProgress {
  from { width: 0%; }
  to { width: 100%; }
}

.feature-image-stack {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--border);
}
.feature-image-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.feature-image-stack img.active {
  opacity: 1;
  transform: scale(1);
}

/* Orbit diagram (About section) */
.orbit-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin: 0 auto;
}
.orbit-ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.orbit-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 22%;
}
.orbit-nodes {
  position: absolute;
  inset: 0;
  animation: orbitSpin 34s linear infinite;
}
.orbit-node {
  position: absolute;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.15;
  padding: 6px;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.5);
  /* Counter-rotates against .orbit-nodes so the node sweeps around the
     ring while its own label stays upright the whole time. */
  animation: orbitCounterSpin 34s linear infinite;
}
@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes orbitCounterSpin {
  from { transform: translate(var(--tx), var(--ty)) rotate(0deg); }
  to { transform: translate(var(--tx), var(--ty)) rotate(-360deg); }
}

/* Floating contact widget */
.floating-contact {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 24, 31, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 8px 18px 8px 8px;
  box-shadow: 0 16px 40px -12px rgba(18, 24, 31, 0.45);
  transition: transform 0.2s ease;
}
.floating-contact:hover {
  transform: translateY(-2px);
}
.floating-contact img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  padding: 4px;
}

/* Scroll-velocity marquee (case studies) */
.marquee-velocity {
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  will-change: transform;
}
.marquee-item {
  display: inline-block;
  transition: opacity 0.2s ease;
}
.marquee-item:hover {
  opacity: 0.65;
}
.marquee-sep {
  display: inline-block;
  margin: 0 3.5rem;
  opacity: 0.5;
}
@media (min-width: 640px) {
  .marquee-sep {
    margin: 0 5rem;
  }
}

/* ---------- Full-bleed dark hero with radial glow (Avidly-style) ---------- */
.glow-section {
  position: relative;
  background-color: var(--ink);
  overflow: hidden;
}
.glow-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 60%;
  width: 1100px;
  height: 1100px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(47, 143, 92, 0.5) 0%, rgba(30, 107, 69, 0.22) 35%, transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}
.glow-content {
  position: relative;
  z-index: 1;
}
.glow-section .text-muted {
  color: rgba(255, 255, 255, 0.6);
}
.glow-section .border-border {
  border-color: rgba(255, 255, 255, 0.14);
}
.glow-section .accordion-icon::before,
.glow-section .accordion-icon::after {
  background: #fff;
}

/* Bracket-cornered CTA button (Avidly-style) */
.btn-bracket {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}
.btn-bracket:hover {
  opacity: 0.75;
}
.btn-bracket::before,
.btn-bracket::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
}
.btn-bracket::before {
  top: -6px;
  left: -8px;
  border-top: 2px solid var(--forest-light);
  border-left: 2px solid var(--forest-light);
}
.btn-bracket::after {
  bottom: -6px;
  right: -8px;
  border-bottom: 2px solid var(--forest-light);
  border-right: 2px solid var(--forest-light);
}
.btn-bracket-dark::before,
.btn-bracket-dark::after {
  border-color: var(--forest);
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}
#preloader img {
  width: 120px;
  height: auto;
}
body.preloading {
  overflow: hidden;
}
