/* ─── Base & Premium texture ─── */
html {
  scroll-behavior: smooth;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background-color: #f59e0b;
  color: #0f172a;
}

/* ─── Navbar ─── */
.navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar--scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #f59e0b;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link--active::after {
  width: 100%;
}

/* ─── Buttons ─── */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-outline {
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn-outline:hover {
  transform: translateY(-1px);
}

/* ─── Hero entrance ─── */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate {
  opacity: 0;
  animation: heroFadeUp 0.7s ease-out forwards;
}

.hero-gradient {
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(245, 158, 11, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(15, 23, 42, 0.04), transparent),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 60%, #f8fafc 100%);
}

/* Hero fits one viewport below navbar (80px) */
.hero-section {
  padding-top: 5rem; /* navbar h-20 */
  min-height: auto;
}

@media (min-width: 1024px) {
  .hero-section {
    min-height: calc(100svh - 5rem);
    max-height: calc(100svh - 5rem);
  }

  .hero-image-wrap {
    aspect-ratio: 4 / 3;
    max-height: min(380px, calc(100svh - 14rem));
  }
}

@media (min-width: 1280px) {
  .hero-image-wrap {
    max-height: min(420px, calc(100svh - 13rem));
  }
}

.hero-card {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.hero-card-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), transparent 40%, rgba(245, 158, 11, 0.2));
  z-index: -1;
  opacity: 0.6;
  filter: blur(1px);
}

.text-gradient-gold {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Scroll reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Stats counter ─── */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ─── Benefit cards ─── */
.benefit-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}

.benefit-card .icon-wrap {
  transition: background-color 0.35s ease, transform 0.35s ease;
}

.benefit-card:hover .icon-wrap {
  transform: scale(1.05);
}

/* ─── Process steps ─── */
.process-line {
  background: linear-gradient(90deg, #e2e8f0 0%, #f59e0b 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}

/* ─── Language pills ─── */
.lang-pill {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.lang-pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
}

/* ─── Testimonial cards ─── */
.testimonial-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

/* ─── Blog cards ─── */
.blog-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.blog-card .blog-image {
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-image {
  transform: scale(1.05);
}

/* ─── Marquee trust bar ─── */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 35s linear infinite;
}

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

/* ─── CTA section ─── */
.cta-pattern {
  background-color: #0f172a;
  background-image:
    radial-gradient(ellipse 60% 80% at 20% 100%, rgba(245, 158, 11, 0.15), transparent),
    radial-gradient(ellipse 50% 60% at 80% 0%, rgba(245, 158, 11, 0.08), transparent);
}

/* ─── Back to top ─── */
.back-to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ─── Mobile menu ─── */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.mobile-menu--open {
  max-height: calc(100svh - 5rem);
  opacity: 1;
  background: #fff;
}

.mobile-menu__inner {
  min-height: calc(100svh - 5rem);
}

.mobile-menu__dismiss {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 0;
}

.navbar--menu-open {
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: #f1f5f9;
}

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

body.mobile-menu-open .back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ─── Scroll indicator ─── */
.scroll-indicator {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ─── Page hero (subpages) ─── */
.page-hero {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 5rem;
  overflow: hidden;
  background-color: #0f172a;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.75) 50%, rgba(15, 23, 42, 0.85) 100%);
}

.page-hero__content {
  position: relative;
  z-index: 1;
}

/* ─── Image effects ─── */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.img-zoom:hover img {
  transform: scale(1.04);
}

/* ─── Pricing card ─── */
.pricing-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.pricing-card--featured {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2), 0 20px 40px rgba(245, 158, 11, 0.1);
}

/* ─── Team card ─── */
.team-card img {
  transition: transform 0.5s ease;
}

.team-card:hover img {
  transform: scale(1.05);
}

/* ─── Article prose ─── */
.prose-article h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.prose-article h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.prose-article p {
  color: #475569;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.prose-article ul {
  list-style: disc;
  padding-left: 1.5rem;
  color: #475569;
  margin-bottom: 1.25rem;
}

.prose-article li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-animate {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .marquee-track,
  .scroll-indicator,
  .process-line {
    animation: none;
  }

  .benefit-card:hover,
  .blog-card:hover,
  .testimonial-card:hover,
  .lang-pill:hover,
  .btn-primary:hover,
  .btn-outline:hover {
    transform: none;
  }
}
