/* =============================================
   LIMITLESS AGENCY — Custom Styles
   Layered on top of Tailwind CSS
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --brand-purple: #7c6ff7;
  --brand-blue: #4f8ef7;
  --bg-primary: #05050a;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(124, 111, 247, 0.4);
  --text-primary: #f0f0f5;
  --text-secondary: #8b8ba8;
  --text-muted: #5a5a7a;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

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

/* ---- Gradient orbs ---- */
.hero-orb-1 {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 111, 247, 0.15) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  pointer-events: none;
  filter: blur(40px);
}

.hero-orb-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.12) 0%, transparent 70%);
  top: 100px;
  right: -100px;
  pointer-events: none;
  filter: blur(60px);
}

/* ---- Glass card ---- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(124, 111, 247, 0.1);
}

/* ---- Gradient text ---- */
.gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--brand-purple) 60%, var(--brand-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-purple {
  background: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Primary CTA button ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(124, 111, 247, 0.4);
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

/* ---- Secondary / ghost button ---- */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 27px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: rgba(124, 111, 247, 0.06);
  transform: translateY(-1px);
}

/* ---- Navigation ---- */
.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover { color: var(--text-primary); }

.nav-link.active { color: var(--text-primary); }

/* ---- Sticky nav ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background: rgba(5, 5, 10, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ---- Section badge ---- */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(124, 111, 247, 0.1);
  border: 1px solid rgba(124, 111, 247, 0.25);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-purple);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---- Divider gradient ---- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
}

/* ---- Process step connector ---- */
.process-connector {
  position: absolute;
  top: 32px;
  left: calc(50% + 40px);
  right: calc(-50% + 40px);
  height: 1px;
  background: linear-gradient(90deg, var(--brand-purple), transparent);
  opacity: 0.3;
}

/* ---- Testimonial card ---- */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.testimonial-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* ---- Stat counter ---- */
.stat-value {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #fff 30%, var(--brand-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Service icon wrapper ---- */
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(124, 111, 247, 0.1);
  border: 1px solid rgba(124, 111, 247, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover .service-icon {
  background: rgba(124, 111, 247, 0.2);
  border-color: rgba(124, 111, 247, 0.4);
}

/* ---- Pricing card highlight ---- */
.pricing-featured {
  background: linear-gradient(135deg, rgba(124, 111, 247, 0.12), rgba(79, 142, 247, 0.08));
  border-color: rgba(124, 111, 247, 0.35);
  position: relative;
}

.pricing-featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  z-index: -1;
  opacity: 0.5;
}

/* ---- Footer ---- */
footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}
footer a:hover { color: var(--text-primary); }

/* ---- Mobile menu ---- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.98);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  backdrop-filter: blur(20px);
}

.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.mobile-menu a:hover { color: var(--brand-purple); }

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 111, 247, 0.3); }
  50%       { box-shadow: 0 0 0 12px rgba(124, 111, 247, 0); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.7s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.7s ease forwards;
}

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

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* ---- Scroll-triggered reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.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; }

/* ---- Logo mark ---- */
.logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Input styles ---- */
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: border-color 0.2s ease, background 0.2s ease;
  outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--brand-purple);
  background: rgba(124, 111, 247, 0.05);
}

select.form-input option {
  background: #0d0d1a;
  color: var(--text-primary);
}

/* ---- Tag pill ---- */
.tag {
  display: inline-flex;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ---- Horizontal scrolling logos ---- */
.logo-scroll {
  display: flex;
  gap: 48px;
  animation: scroll-x 20s linear infinite;
  white-space: nowrap;
}

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

.logo-track {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

/* ---- Hamburger ---- */
.hamburger {
  width: 24px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---- Progress bar ---- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-purple), var(--brand-blue));
  z-index: 200;
  transition: width 0.1s linear;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-orb-1 { width: 400px; height: 400px; top: -100px; left: -150px; }
  .hero-orb-2 { width: 300px; height: 300px; }
}

/* ---- Mobile polish ---- */
@media (max-width: 767px) {

  /* Better tap targets in mobile menu */
  .mobile-menu a:not(.btn-primary) {
    font-size: 20px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 24px;
  }

  /* Hamburger — larger hit area */
  .hamburger {
    padding: 4px;
  }

  /* Prevent long email from causing overflow */
  a[href^="mailto:"],
  a[href^="tel:"] {
    word-break: break-all;
  }

  /* Back-to-top closer to edge on mobile */
  #back-to-top {
    bottom: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
  }

  /* Prevent pricing featured scale from causing x-overflow */
  .pricing-featured {
    transform: none !important;
  }

  /* Stat blocks in case study — stack vertically */
  .stat-block-row {
    flex-direction: column;
    gap: 20px;
  }
  .stat-block-row .stat-divider {
    width: 60px;
    height: 1px;
    min-height: unset;
  }

  /* Section badge text wrapping */
  .section-badge {
    text-align: center;
    white-space: normal;
    max-width: 90vw;
  }

  /* Reduce heading letter-spacing at small sizes */
  h1, h2, h3 {
    letter-spacing: -0.02em;
  }

  /* Form inputs - prevent iOS zoom (font-size must be ≥16px) */
  .form-input {
    font-size: 16px;
  }

  /* Step number — ensure it doesn't shrink */
  .step-number {
    flex-shrink: 0;
  }

  /* Glass card hover — disable transform on touch */
  .glass-card:hover {
    transform: none;
  }
}

/* ---- Page hero (inner pages) ---- */
.page-hero {
  background: linear-gradient(180deg, rgba(124, 111, 247, 0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

/* ---- Case study card image placeholder ---- */
.case-study-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(124, 111, 247, 0.1), rgba(79, 142, 247, 0.05));
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.case-study-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(5, 5, 10, 0.8));
}

/* ---- Grid background pattern ---- */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ---- Glow line ---- */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-purple) 30%, var(--brand-blue) 70%, transparent);
  opacity: 0.6;
}

/* ---- Number step ---- */
.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(124, 111, 247, 0.1);
  border: 1px solid rgba(124, 111, 247, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-purple);
  flex-shrink: 0;
}

/* ---- Back to top ---- */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 50;
  border: none;
}

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