/* ==========================================================================
   TECH GREAT — V2 Enterprise Design System & Stylesheet
   Pure CSS3 + Tailwind compatibility. No third-party animation libraries.
   Tokens: Slate Navy, Electric Blue, Vivid Violet, Crisp Mist, Clean Line.
   ========================================================================== */

:root {
  --navy: #0b1220;
  --navy-deep: #060a12;
  --ink: #16213a;
  --charcoal: #333c4d;
  --paper: #ffffff;
  --mist: #f5f7fb;
  --mist-dark: #ebf0f7;
  --line: #e3e8f0;
  --line-dark: rgba(255, 255, 255, 0.12);
  --electric: #2f6fed;
  --electric-glow: rgba(47, 111, 237, 0.35);
  --violet: #7c5cfc;
  --violet-glow: rgba(124, 92, 252, 0.35);
  --emerald: #10b981;
  --gradient: linear-gradient(135deg, var(--electric) 0%, var(--violet) 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(47, 111, 237, 0.08) 0%, rgba(124, 92, 252, 0.08) 100%);
  --gradient-dark: linear-gradient(180deg, #0b1220 0%, #060a12 100%);
  --shadow-soft: 0 2px 4px rgba(11, 18, 32, 0.03), 0 10px 28px -12px rgba(11, 18, 32, 0.08);
  --shadow-lift: 0 8px 16px -4px rgba(11, 18, 32, 0.06), 0 24px 48px -12px rgba(47, 111, 237, 0.18);
  --shadow-glow: 0 0 40px -10px rgba(47, 111, 237, 0.4);
}

/* -------------------------------------------------------------------------
   Base & Typography
   ------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--charcoal);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.font-display {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

::selection {
  background: var(--electric);
  color: #ffffff;
}

/* Deliberate accessible focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
  border-radius: 6px;
}

/* -------------------------------------------------------------------------
   Surfaces, Gradients & Accents
   ------------------------------------------------------------------------- */

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

.card-surface {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.35s ease;
}

.card-surface:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(47, 111, 237, 0.35);
}

.card-dark {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.35s ease, 
              background-color 0.35s ease,
              box-shadow 0.35s ease;
}

.card-dark:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 111, 237, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5), 0 0 30px -10px rgba(47, 111, 237, 0.25);
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */

.btn {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.25s ease, 
              background-position 0.5s ease, 
              color 0.25s ease, 
              border-color 0.25s ease,
              background-color 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  background-size: 180% 180%;
  background-position: 0% 50%;
  color: #ffffff;
  box-shadow: 0 10px 24px -8px rgba(47, 111, 237, 0.55);
}

.btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -8px rgba(47, 111, 237, 0.7);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  color: var(--navy);
  border: 1.5px solid var(--line);
  box-shadow: 0 2px 6px rgba(11, 18, 32, 0.04);
}

.btn-secondary:hover {
  border-color: var(--electric);
  color: var(--electric);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(47, 111, 237, 0.2);
}

.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn-ghost-dark:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-accent {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px -8px rgba(16, 185, 129, 0.5);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -8px rgba(16, 185, 129, 0.65);
  color: #ffffff;
}

/* -------------------------------------------------------------------------
   Hero Backdrop & Digital Ecosystem Visual
   ------------------------------------------------------------------------- */

.hero-backdrop {
  background:
    radial-gradient(70% 60% at 85% 15%, rgba(124, 92, 252, 0.18), transparent 65%),
    radial-gradient(55% 50% at 10% 85%, rgba(47, 111, 237, 0.16), transparent 60%),
    radial-gradient(40% 40% at 50% 50%, rgba(56, 189, 248, 0.08), transparent 50%),
    var(--navy);
}

.grid-overlay {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(85% 75% at 65% 35%, black 45%, transparent 95%);
  -webkit-mask-image: radial-gradient(85% 75% at 65% 35%, black 45%, transparent 95%);
}

.grid-overlay-light {
  background-image:
    linear-gradient(rgba(11, 18, 32, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 18, 32, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Ecosystem Flow Animation */
.ecosystem-signal {
  stroke-dasharray: 6 10;
  animation: ecosystem-flow 24s linear infinite;
}

@keyframes ecosystem-flow {
  to {
    stroke-dashoffset: -400;
  }
}

.pulse-node {
  animation: pulse-ring 3.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(47, 111, 237, 0.6);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 14px rgba(47, 111, 237, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(47, 111, 237, 0);
  }
}

.pulse-emerald {
  animation: pulse-emerald-ring 2.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-emerald-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.floating-card-1 {
  animation: float-gentle 6s ease-in-out infinite;
}

.floating-card-2 {
  animation: float-gentle 7s ease-in-out infinite 1.5s;
}

.floating-card-3 {
  animation: float-gentle 6.5s ease-in-out infinite 3s;
}

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

/* -------------------------------------------------------------------------
   Interactive Chatbot Simulator
   ------------------------------------------------------------------------- */

.chat-bubble-user {
  background: var(--navy);
  color: #ffffff;
  border-radius: 18px 18px 4px 18px;
}

.chat-bubble-bot {
  background: #ffffff;
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(11, 18, 32, 0.05);
  border-radius: 18px 18px 18px 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--electric);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* -------------------------------------------------------------------------
   Voice Assistant Audio Waveform
   ------------------------------------------------------------------------- */

.wave-bar {
  width: 4px;
  background: linear-gradient(180deg, var(--electric) 0%, var(--violet) 100%);
  border-radius: 9999px;
  animation: wave-motion 1.2s ease-in-out infinite alternate;
}

.wave-bar:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.wave-bar:nth-child(2) { height: 28px; animation-delay: 0.3s; }
.wave-bar:nth-child(3) { height: 42px; animation-delay: 0.15s; }
.wave-bar:nth-child(4) { height: 20px; animation-delay: 0.45s; }
.wave-bar:nth-child(5) { height: 36px; animation-delay: 0.25s; }
.wave-bar:nth-child(6) { height: 16px; animation-delay: 0.5s; }
.wave-bar:nth-child(7) { height: 32px; animation-delay: 0.05s; }
.wave-bar:nth-child(8) { height: 22px; animation-delay: 0.35s; }
.wave-bar:nth-child(9) { height: 14px; animation-delay: 0.2s; }

@keyframes wave-motion {
  0% { transform: scaleY(0.3); opacity: 0.5; }
  100% { transform: scaleY(1.15); opacity: 1; }
}

/* -------------------------------------------------------------------------
   Browser & Mobile Device Mockups
   ------------------------------------------------------------------------- */

.browser-mockup {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0d1527;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.browser-header {
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mobile-mockup {
  width: 260px;
  border-radius: 36px;
  border: 6px solid #1e293b;
  background: #0f172a;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  position: relative;
}

.mobile-notch {
  width: 100px;
  height: 16px;
  background: #1e293b;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  margin: 0 auto;
}

/* -------------------------------------------------------------------------
   Comparison Matrix ("Tech Great Difference")
   ------------------------------------------------------------------------- */

.diff-card-standard {
  background: #ffffff;
  border: 1px solid var(--line);
  opacity: 0.9;
}

.diff-card-techgreat {
  background: linear-gradient(145deg, #0f182c 0%, #16213a 100%);
  border: 1.5px solid rgba(47, 111, 237, 0.4);
  box-shadow: 0 20px 40px -15px rgba(47, 111, 237, 0.25);
  position: relative;
}

.diff-card-techgreat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

/* -------------------------------------------------------------------------
   Navigation & Mega Menu
   ------------------------------------------------------------------------- */

#site-header {
  transition: background-color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

#site-header.is-scrolled {
  box-shadow: 0 2px 4px rgba(11, 18, 32, 0.04), 0 12px 28px -12px rgba(11, 18, 32, 0.15);
  background-color: rgba(255, 255, 255, 0.96);
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
}

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

/* Mega Menu */
#services-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.has-mega:hover #services-menu,
.has-mega:focus-within #services-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile menu */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.is-open {
  max-height: 92vh;
  overflow-y: auto;
}

/* -------------------------------------------------------------------------
   Marquee (Trust & Capability Bar)
   ------------------------------------------------------------------------- */

.marquee-container {
  overflow: hidden;
  user-select: none;
  display: flex;
  gap: 2rem;
}

.marquee-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
  min-width: 100%;
  animation: marquee-scroll 36s linear infinite;
}

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

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - 2rem)); }
}

/* -------------------------------------------------------------------------
   Scroll Reveal (Progressive Enhancement)
   ------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-stagger > * {
  transition-delay: calc(var(--i, 0) * 85ms);
}

/* -------------------------------------------------------------------------
   Accordion (FAQ)
   ------------------------------------------------------------------------- */

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-icon {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item[data-open="true"] .accordion-icon {
  transform: rotate(45deg);
}

/* -------------------------------------------------------------------------
   Interactive Modals & WhatsApp FAB
   ------------------------------------------------------------------------- */

#whatsapp-fab {
  animation: fab-float 4s ease-in-out infinite;
}

@keyframes fab-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.05); }
}

.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  transform: translateY(24px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-open .modal-content {
  transform: translateY(0) scale(1);
}

/* -------------------------------------------------------------------------
   Portfolio Filter Cards & Premium Showcase Interactions
   ------------------------------------------------------------------------- */

.filter-btn {
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s ease;
}

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

.filter-btn[aria-pressed="true"] {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
  box-shadow: 0 4px 12px -2px rgba(11, 18, 32, 0.25);
}

.portfolio-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease, 
              opacity 0.35s ease;
  position: relative;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px -10px rgba(11, 18, 32, 0.12), 0 1px 3px rgba(11, 18, 32, 0.05);
  border-color: rgba(47, 111, 237, 0.4);
}

.portfolio-card .mockup-preview {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.portfolio-card:hover .mockup-preview {
  transform: scale(1.03);
}

.portfolio-card .card-cta-arrow {
  transition: transform 0.25s ease;
  display: inline-block;
}

.portfolio-card:hover .card-cta-arrow {
  transform: translateX(4px);
}

.portfolio-card.is-hidden {
  display: none !important;
}

/* Workflow Ecosystem Visual Styles */
.ecosystem-node {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ecosystem-node:hover {
  transform: translateY(-3px);
  border-color: var(--electric);
  box-shadow: 0 12px 24px -6px rgba(47, 111, 237, 0.18);
}

/* -------------------------------------------------------------------------
   Accessibility & Reduced Motion
   ------------------------------------------------------------------------- */

@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 {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Utility */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
