/* ============================================================
   DIGITAL AGENCY LANDING PAGE — CUSTOM STYLES
   Stack: Tailwind CSS CDN + Custom CSS (NO external frameworks)
   ============================================================ */

/* ── 1. CSS CUSTOM PROPERTIES ─────────────────────────────── */
:root {
  --color-primary:      #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-accent:       #06B6D4;
  --color-dark-bg:      #090D16;
  --color-dark-surface: #0F172A;
  --color-light-bg:     #F8FAFC;
  --color-border:       #E2E8F0;
  --color-pill-bg:      #E0F2FE;
  --color-pill-text:    #0284C7;
  --font-primary:       'Plus Jakarta Sans', sans-serif;
  --transition-base:    200ms ease;
  --transition-smooth:  350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 2. GLOBAL RESET & BASE ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-primary);
  background-color: var(--color-light-bg);
  color: #1E293B;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── 3. CUSTOM SCROLLBAR ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary-dark); }
::selection { background-color: #BFDBFE; color: #1E293B; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: 4px; }

/* ── 4. MARQUEE ANIMATIONS ───────────────────────────────── */
@keyframes marquee-left {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
@keyframes marquee-right {
  0%   { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.marquee-track--left  { animation: marquee-left  115s linear infinite; }
.marquee-track--right { animation: marquee-right 125s linear infinite; }
.marquee-track--speed-1 { animation-duration: 115s; }
.marquee-track--speed-2 { animation-duration: 125s; }
.marquee-track--speed-3 { animation-duration: 110s; }
.marquee-track--speed-4 { animation-duration: 120s; }
.marquee-track--speed-5 { animation-duration: 135s; }
.marquee-track:hover  { animation-play-state: paused; }

/* ── 5. GLASSMORPHIC UTILITIES ───────────────────────────── */
.glass      { background: rgba(255,255,255,0.08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.12); }
.glass-dark { background: rgba(15,23,42,0.7);    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.06); }
.glass-light{ background: rgba(255,255,255,0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(226,232,240,0.8); }

/* ── 6. GRADIENT UTILITIES ───────────────────────────────── */
.gradient-primary { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%); }
.gradient-primary-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-dark-bg { background: linear-gradient(180deg, #090D16 0%, #0F172A 100%); }

/* ── 7. HERO GLOWS ───────────────────────────────────────── */
.hero-glow { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; }
.hero-glow--blue { width: 600px; height: 600px; background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%); top: -100px; right: -100px; }
.hero-glow--cyan { width: 400px; height: 400px; background: radial-gradient(circle, rgba(6,182,212,0.14) 0%, transparent 70%); bottom: 0; left: -50px; }

/* ── 8. BENTO DASHBOARD ──────────────────────────────────── */
.bento-card { border-radius: 20px; overflow: hidden; position: relative; }
.metric-bar { height: 8px; border-radius: 99px; background: #E2E8F0; overflow: hidden; }
.metric-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--color-primary), var(--color-accent)); transform-origin: left; animation: bar-grow 1.4s cubic-bezier(0.34,1.56,0.64,1) forwards; transform: scaleX(0); }
@keyframes bar-grow { to { transform: scaleX(1); } }
.sparkline-path { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw-line 1.8s ease forwards 0.5s; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }

/* ── 9. SVG GAUGE METER ──────────────────────────────────── */
.gauge-arc { stroke-dasharray: 251.2; stroke-dashoffset: 251.2; animation: gauge-fill 2s cubic-bezier(0.34,1.56,0.64,1) forwards 0.3s; transform-origin: center; transform: rotate(-90deg); }
@keyframes gauge-fill { to { stroke-dashoffset: var(--gauge-offset); } }

/* ── 10. MEGA MENU & DROPDOWNS ───────────────────────────── */
.mega-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.mega-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) translateX(-50%);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.dropdown-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateX(-50%);
  pointer-events: auto;
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.animate-spin-slow {
  animation: spin-slow 20s linear infinite;
}

/* ── 11. MOBILE DRAWER ───────────────────────────────────── */
.mobile-drawer { transform: translateX(100%); transition: transform var(--transition-smooth); }
.mobile-drawer.is-open { transform: translateX(0); }
.drawer-overlay { opacity: 0; visibility: hidden; transition: opacity var(--transition-smooth), visibility var(--transition-smooth); }
.drawer-overlay.is-open { opacity: 1; visibility: visible; }

/* ── 12. STICKY HEADER ───────────────────────────────────── */
.header-scrolled { box-shadow: 0 1px 20px rgba(15, 23, 42, 0.05); background-color: rgba(255, 255, 255, 0.75) !important; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* ── 13. PRICING HIGHLIGHT ───────────────────────────────── */
.pricing-card-recommended { border: 2px solid var(--color-primary); position: relative; }
.pricing-card-recommended::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(37,99,235,0.04) 0%, rgba(6,182,212,0.04) 100%); pointer-events: none; }

/* ── 14. SKIP LINK ───────────────────────────────────────── */
.skip-link { position: absolute; top: -99px; left: 16px; z-index: 9999; padding: 8px 16px; background: var(--color-primary); color: #fff; border-radius: 0 0 8px 8px; font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip-link:focus { top: 0; }

/* ── 15. PULSE BADGE ─────────────────────────────────────── */
@keyframes pulse-dot { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.5; transform:scale(1.5); } }
.pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

/* ── 16. TYPOGRAPHY HELPERS ──────────────────────────────── */
.display-heading { font-size: clamp(2.25rem, 5.5vw, 4.25rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.section-heading { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }

/* ── 17. MARQUEE BAND ────────────────────────────────────── */
.marquee-band { background: linear-gradient(180deg, #F1F5F9 0%, #F8FAFC 100%); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); overflow: hidden; position: relative; }
.marquee-fade-left, .marquee-fade-right { position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none; }
.marquee-fade-left  { left:  0; background: linear-gradient(to right, #F8FAFC, transparent); }
.marquee-fade-right { right: 0; background: linear-gradient(to left,  #F8FAFC, transparent); }

/* ── 18. DARK CARD GLOW ──────────────────────────────────── */
.dark-card-glow { box-shadow: 0 0 40px rgba(37,99,235,0.08), 0 0 0 1px rgba(255,255,255,0.05); }

/* ── 19. MODAL ───────────────────────────────────────────── */
.modal-backdrop { opacity:0; visibility:hidden; transition: opacity 0.25s ease, visibility 0.25s ease; }
.modal-backdrop.is-open { opacity:1; visibility:visible; }
.modal-panel { transform: scale(0.95) translateY(20px); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); }
.modal-backdrop.is-open .modal-panel { transform: scale(1) translateY(0); }

/* ── 20. SERVICE PILLS ───────────────────────────────────── */
.service-pill { transition: all 200ms ease; }
.service-pill.hidden-pill { display: none; }

/* ── 21. FOOTER LINKS ────────────────────────────────────── */
.footer-link { transition: color 200ms ease; }
.footer-link:hover { color: var(--color-accent); }

/* ── 22. FLOAT ANIMATION ─────────────────────────────────── */
@keyframes float-y { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-12px); } }
.float-anim { animation: float-y 5s ease-in-out infinite; }

/* ── 23. COUNTER ─────────────────────────────────────────── */
.stat-counter { font-variant-numeric: tabular-nums; }

/* ── 24. REFACTORED HERO ANIMATIONS ─────────────────────── */
@keyframes float-slow {
  0%, 100% { transform: translateY(-8px); }
  50% { transform: translateY(8px); }
}
@keyframes float-reverse {
  0%, 100% { transform: translateY(8px); }
  50% { transform: translateY(-8px); }
}
.animate-float-slow {
  animation: float-slow 5s ease-in-out infinite;
}
.animate-float-reverse {
  animation: float-reverse 6s ease-in-out infinite;
}

@keyframes rotate-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes rotate-slow-reverse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}
.animate-rotate-slow {
  animation: rotate-slow 40s linear infinite;
}
.animate-rotate-reverse {
  animation: rotate-slow-reverse 45s linear infinite;
}

/* ── 25. GLOBAL PILL ─────────────────────────────────────────── */
.global-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0F172A;
  border: 1px solid rgba(191, 219, 254, 0.85);
  background: linear-gradient(90deg, #FFFFFF 0%, #D8EBFF 100%);
  box-shadow: -5px 0px 0px -2px var(--color-primary-dark);
}
@media (min-width: 768px) {
  .global-pill {
    font-size: 0.8125rem;
    padding: 0.4rem 1.15rem;
  }
}

/* ── 26. TECH CARD ───────────────────────────────────────────── */
.tech-card {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
.tech-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── 27. NO-SCROLLBAR UTILITY ────────────────────────────────── */
.no-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.no-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* ── 28. GLOBAL BUTTON SMALL ON SMALL DEVICES ────────────────── */
@media (max-width: 640px) {
  button, 
  .btn,
  [data-modal-open] {
    font-size: 0.75rem; /* text-xs on small screens */
  }
}

/* ── 29. MEGA MENU V2 ENHANCEMENTS ───────────────────────────── */

/* Sidebar category button — default */
.mm-cat-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.625rem 0.875rem;
  border-radius: 0 0.75rem 0.75rem 0;
  border-left: 2.5px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
  background: transparent;
  border-top: none;
  border-right: none;
  border-bottom: none;
  position: relative;
}
.mm-cat-btn:hover {
  background: #F0F7FF;
  border-left-color: #BFDBFE;
}

/* Active state — blue left border + tinted bg */
.mm-cat-btn.is-active {
  background: #EBF3FF;
  border-left-color: #2563EB;
}
.mm-cat-btn.is-active .mm-cat-label {
  color: #2563EB;
}
.mm-cat-btn.is-active .mm-cat-sub {
  color: #60A5FA;
}
.mm-cat-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1E293B;
  transition: color 0.18s ease;
  line-height: 1.2;
}
.mm-cat-sub {
  font-size: 0.72rem;
  color: #64748B;
  margin-top: 1px;
  transition: color 0.18s ease;
  line-height: 1.3;
}

/* Service card inside right panel */
.mm-service-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  border: 1px solid #F1F5F9;
  text-decoration: none;
  transition: all 0.2s ease;
  background: #fff;
}
.mm-service-card:hover {
  background: #F4F9FF;
  border-color: #DBEAFE;
  box-shadow: 0 4px 16px rgba(37,99,235,0.09);
  transform: translateY(-2px);
}
.mm-service-card:hover .mm-card-arrow {
  opacity: 1;
  transform: translateX(3px);
}
.mm-card-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
}
.mm-card-desc {
  font-size: 0.72rem;
  color: #64748B;
  margin-top: 2px;
  line-height: 1.4;
}
.mm-card-arrow {
  flex-shrink: 0;
  margin-left: auto;
  opacity: 0;
  color: #2563EB;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Gradient icon wrappers */
.mm-icon-wrap {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
  color: #fff;
}
.mm-icon-wrap--purple  { background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%); }
.mm-icon-wrap--emerald { background: linear-gradient(135deg, #059669 0%, #34D399 100%); }
.mm-icon-wrap--amber   { background: linear-gradient(135deg, #D97706 0%, #FCD34D 100%); }
.mm-icon-wrap--cyan    { background: linear-gradient(135deg, #0284C7 0%, #22D3EE 100%); }
.mm-icon-wrap--slate   { background: linear-gradient(135deg, #475569 0%, #94A3B8 100%); }
.mm-icon-wrap--rose    { background: linear-gradient(135deg, #E11D48 0%, #FB7185 100%); }
.mm-icon-wrap--violet  { background: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 100%); }

/* CTA card */
.mm-cta-card {
  background: linear-gradient(145deg, #1D4ED8 0%, #2563EB 60%, #0284C7 100%);
  border-radius: 1rem;
  padding: 1.25rem 1.125rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  width: 210px;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}
.mm-cta-card::before {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}
.mm-cta-card::after {
  content: '';
  position: absolute;
  top: -25px;
  left: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}
.mm-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: auto;
  padding-top: 1rem;
  padding-bottom: 0;
}
.mm-cta-btn a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  background: rgba(255,255,255,0.95);
  color: #2563EB;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.15s ease;
}
.mm-cta-btn a:hover {
  background: #EFF6FF;
  transform: translateX(2px);
}

/* ── 30. CARD FLASH / LIGHT SWEEP ON HOVER EFFECT ───────────── */
.card-flash {
  position: relative;
  overflow: hidden;
}

.card-flash::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 25%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(37, 99, 235, 0.15) 53%,
    rgba(255, 255, 255, 0) 72%
  );
  transform: translateX(-100%) rotate(25deg);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 10;
}

.card-flash:hover::after {
  transform: translateX(100%) rotate(25deg);
}
