/* Ported from the original Next.js site's globals.css. Tailwind utility
   classes are supplied by the Tailwind CDN script (configured in header.php);
   this file only carries the small set of hand-written component classes,
   animations, and the color tokens they reference. */

:root {
  --background: #ffffff;
  --foreground: #0f1f2e;

  --color-primary: #0071b5;
  --color-primary-dark: #00496b;
  --color-primary-light: #2a9fd6;
  --color-secondary: #22c3ea;
  --color-accent: #22c3ea;
  --color-accent-light: #8fe4f5;
  --color-heading: #0f1f2e;
  --color-body: #56636f;
  --color-light: #dce7f0;
  --color-warmgray: #eef4fa;
  --color-warmgray-dark: #56636f;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--foreground);
}

a,
button {
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

/* Theme-accurate button: 5px radius, not pill-shaped. */
.btn-brand {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 5px;
  padding: 12px 25px;
  line-height: 1.5em;
  font-weight: 600;
  background-color: var(--color-primary);
  color: #fff;
  transition: background-color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-brand:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(0, 113, 181, 0.5);
}

.btn-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 48%, transparent 66%);
  transform: translateX(-120%);
}

.btn-brand:hover::after {
  transform: translateX(120%);
  transition: transform 0.75s ease;
}

.btn-brand-outline {
  display: inline-block;
  border-radius: 5px;
  padding: 12px 25px;
  line-height: 1.5em;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  transition: background-color 0.3s ease, transform 0.25s ease, border-color 0.25s ease;
}

.btn-brand-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float-y {
  0%, 100% { transform: translateY(0) rotate(var(--float-rotate, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--float-rotate, 0deg)); }
}

.animate-float {
  animation: float-y 5s ease-in-out infinite;
}

/* Scroll-reveal transition, toggled by main.js's IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hover-tilt {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.hover-tilt:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 10px 22px -16px rgba(15, 31, 46, 0.22);
}

/* 3D tilt for photo/image containers, with a glossy light sweep on hover */
.img-tilt {
  position: relative;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s ease;
  transform-style: preserve-3d;
  will-change: transform;
  isolation: isolate;
}

.img-tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.4) 42%, transparent 64%);
  transform: translateX(-130%) skewX(-15deg);
  opacity: 0;
}

.img-tilt:hover {
  transform: perspective(1200px) rotateX(6deg) rotateY(-8deg) scale(1.045) translateY(-6px);
  box-shadow: 0 34px 64px -18px rgba(0, 113, 181, 0.45), 0 12px 24px -12px rgba(15, 31, 46, 0.35);
}

.img-tilt:hover::after {
  opacity: 1;
  transform: translateX(130%) skewX(-15deg);
  transition: transform 0.9s ease, opacity 0.9s ease;
}

/* Mouse-tracked 3D tilt card, driven by main.js setting --rx/--ry/--gx/--gy */
.tilt-card {
  position: relative;
  --rx: 0deg;
  --ry: 0deg;
  --gx: 50%;
  --gy: 50%;
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)) scale3d(1, 1, 1);
  transition: transform 0.18s ease-out, box-shadow 0.35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-card:hover {
  box-shadow: 0 10px 22px -16px rgba(15, 31, 46, 0.28);
}

.tilt-glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.65), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: overlay;
}

.tilt-card:hover .tilt-glare {
  opacity: 1;
}

@keyframes gradient-pan {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.text-gradient-animated {
  background: linear-gradient(90deg, var(--color-accent-light), var(--color-secondary), var(--color-primary-light), var(--color-accent-light));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-pan 6s ease infinite;
}

/* Nav link underline that grows from the center on hover */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 24px);
}

@keyframes ken-burns {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); }
}

.hero-kenburns {
  animation: ken-burns 20s ease-in-out infinite alternate;
}

/* Hero's diagonal color panels ("HeroBars") + word-by-word text — replay every
   time a slide becomes active AND the hero is in view (JS toggles ".in-view"
   on scroll via IntersectionObserver; Swiper toggles ".swiper-slide-active"
   on every slide change, including the very first slide on init). */
@keyframes hero-bar-in {
  from { opacity: 0; transform: translateX(-56px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes hero-texture-in {
  from { opacity: 0; transform: translateX(-56px); }
  to { opacity: 0.3; transform: translateX(0); }
}

.hero-bar-1,
.hero-bar-2,
.hero-bar-3 {
  opacity: 0;
}

.hero-swiper.in-view .swiper-slide-active .hero-bar-1 {
  animation: hero-bar-in 1.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-swiper.in-view .swiper-slide-active .hero-bar-2 {
  animation: hero-bar-in 1.6s cubic-bezier(0.22, 1, 0.36, 1) 300ms both;
}

.hero-swiper.in-view .swiper-slide-active .hero-bar-3 {
  animation: hero-texture-in 1.6s cubic-bezier(0.22, 1, 0.36, 1) 450ms both;
}

/* Word-by-word text entrance. Each <span class="hero-word"> carries its own
   --i (word index, set inline per span) and inherits --base (per text-block
   start offset, set inline on the wrapping element) from its ancestor. */
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateX(-30px);
}

.hero-swiper.in-view .swiper-slide-active .hero-word {
  animation: hero-word-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--base, 0ms) + (var(--i, 0) * 55ms));
}

@keyframes hero-word-in {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero-cta-group {
  opacity: 0;
  transform: translateX(-30px);
}

.hero-swiper.in-view .swiper-slide-active .hero-cta-group {
  animation: hero-word-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 750ms both;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bar-1, .hero-bar-2, .hero-bar-3, .hero-word, .hero-cta-group {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hero-bar-3 {
    opacity: 0.3;
  }
}

.img-pop {
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.img-pop.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* FAQ accordion open state — driven by main.js toggling .is-open on [data-accordion-item] */
.faq-item.is-open {
  border-color: rgba(0, 113, 181, 0.25);
  box-shadow: 0 16px 32px -22px rgba(15, 31, 46, 0.28);
}

.faq-item.is-open [data-accordion-question] {
  color: var(--color-primary);
}

.faq-item.is-open [data-accordion-icon] {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(0, 113, 181, 0.5);
}

/* Step connector arrow between "How It Works" cards on wide screens */
.step-connector {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.step-card.is-visible .step-connector {
  opacity: 1;
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .img-tilt,
  .img-tilt:hover,
  .hero-kenburns,
  .img-pop,
  .tilt-card,
  .tilt-card:hover,
  .text-gradient-animated {
    animation: none;
    transition: none;
    transform: none;
  }
}

/* Swiper overrides matching the original theme's widget CSS */
.theme-swiper .swiper-button-prev,
.theme-swiper .swiper-button-next {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid transparent;
  border-radius: 0;
  transition: all 0.3s linear;
}

.theme-swiper .swiper-button-prev:hover,
.theme-swiper .swiper-button-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.theme-swiper .swiper-button-prev::after,
.theme-swiper .swiper-button-next::after {
  font-size: 16px;
  color: #fff;
}

.theme-swiper .swiper-pagination-bullet {
  width: 30px;
  height: 5px;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.15);
  opacity: 1;
  transition: background-color 0.5s ease, width 0.5s ease, transform 0.5s ease;
}

.theme-swiper .swiper-pagination-bullet-active {
  background: var(--color-primary);
  width: 42px;
}

.theme-swiper.on-dark .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.35);
}

.theme-swiper.on-dark .swiper-pagination-bullet-active {
  background: #fff;
}

.testimonial-swiper .swiper-slide {
  opacity: 0.45;
  filter: blur(1.5px) saturate(0.85);
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.testimonial-swiper .swiper-slide-active {
  opacity: 1;
  filter: blur(0) saturate(1);
}

/* Sticky header shrink state, toggled by main.js on scroll */
#site-header.is-scrolled #topbar {
  max-height: 0;
}

#site-header.is-scrolled #navbar {
  height: 4rem;
}

#site-header.is-scrolled #logo-img {
  height: 3rem;
  width: 3rem;
}

#site-header.is-scrolled {
  box-shadow: 0 10px 15px -3px rgba(15, 31, 46, 0.05);
}

/* Full-width mega menu: fixed so it always spans the whole viewport
   regardless of its narrow nav-item parent; top offset tracks the header's
   own height (topbar + navbar unscrolled, navbar only once scrolled). */
.mega-menu {
  top: 116px;
  transition: top 0.3s ease, opacity 0.2s ease, visibility 0.2s ease;
}

#site-header.is-scrolled .mega-menu {
  top: 64px;
}

#mobile-menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  top: 0.375rem;
  transform: rotate(45deg);
}

#mobile-menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}

#mobile-menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  top: 0.375rem;
  transform: rotate(-45deg);
}
