/* ==========================================================================
   KamAI HCS - Clean Enterprise Palette (dev-app.kamaihcs.com)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Exact App Design Tokens */
  --kamai-primary: #1E3D8A;         /* rgb(30, 61, 138) */
  --kamai-primary-hover: #162E69;
  --kamai-accent: #2563EB;          /* rgb(37, 99, 235) */
  --kamai-accent-hover: #1D4ED8;
  --kamai-primary-soft: #EFF6FF;    /* rgb(239, 246, 255) */
  --kamai-primary-muted: #DBEAFE;
  
  --surface-canvas: #F8FAFC;        /* rgb(248, 250, 252) */
  --surface-panel: #FFFFFF;
  --border-subtle: #E2E8F0;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
}

body {
  font-family: var(--font-sans);
  background-color: var(--surface-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/*
 * The page scrolls on the root element, and `overflow-x` on `body` alone does
 * not reach it, so a phone could still swipe the whole page sideways: at a
 * 375px viewport the document measured 397px wide (2026-09-16). Several pieces
 * are meant to sit outside the layout (the hero glows, the fanned mockup cards,
 * the testimonial marquee), so the page is clipped here instead of changing the
 * design. `clip` does not create a scroll container, so the sticky header keeps
 * working; `hidden` is the fallback where `clip` is unsupported.
 */
html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Precision Gridlines on Clean Canvas */
.grid-lines-bg {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(30, 61, 138, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 61, 138, 0.04) 1px, transparent 1px);
}

/* Clean Card Panel */
.glass-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 20px -4px rgba(30, 61, 138, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.03);
}

.glass-button {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #0F172A;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-button:hover {
  background: #EFF6FF;
  border-color: #2563EB;
  color: #1E3D8A;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.2), 0 4px 10px -2px rgba(30, 61, 138, 0.12);
  transform: translateY(-2px);
}
.glass-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.08);
}
.glass-button:hover [data-lucide="arrow-down"],
.glass-button:hover svg.lucide-arrow-down {
  transform: translateY(4px);
}
.glass-button [data-lucide],
.glass-button svg {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   ULTRA-FAST HARDWARE-ACCELERATED MOBILE MENU (0ms lag, smooth GPU grid)
   ========================================================================== */
#mobileMenu {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
  border-top: 0 solid #E2E8F0;
  transition: grid-template-rows 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.18s ease;
  will-change: grid-template-rows, opacity;
}

#mobileMenu.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
  border-top-width: 1px;
}

#mobileMenu > div {
  overflow: hidden;
}

/* ==========================================================================
   SMOOTH FAQ ACCORDION TRANSITION (Hardware-Accelerated Grid)
   ========================================================================== */
.faq-content-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.22s ease;
  will-change: grid-template-rows, opacity;
}

.faq-content-wrapper.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-content-inner {
  overflow: hidden;
}

/* 3D Isometric Mockup Cascade (Launch UI Signature Hero) */
.perspective-container {
  perspective: 1400px;
}

.mockup-card-left {
  transform: rotate(-24deg) skewY(12deg);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.mockup-card-center {
  transform: rotate(-24deg) skewY(12deg);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.mockup-card-right {
  transform: rotate(-24deg) skewY(12deg);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* On Hero Group Hover - Fan Out & Straighten smoothly */
.hero-mockup-group:hover .mockup-card-left {
  transform: rotate(-12deg) skewY(6deg) translateX(-12%);
}
.hero-mockup-group:hover .mockup-card-center {
  transform: rotate(-12deg) skewY(6deg) translateY(-4%);
}
.hero-mockup-group:hover .mockup-card-right {
  transform: rotate(-12deg) skewY(6deg) translateX(14%);
}

/* Ambient Radial Glow */
.radial-glow {
  background: radial-gradient(circle, rgba(30, 61, 138, 0.18) 0%, rgba(37, 99, 235, 0.06) 50%, transparent 70%);
}

/* KamAI Primary Button (Unified brand color across all CTA buttons) */
.btn-primary-gradient {
  background-color: #2563EB !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn-primary-gradient:hover {
  background-color: #1D4ED8 !important;
  box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.45) !important;
  transform: translateY(-1px);
}

/* Animations */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.animate-float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.06); }
}
.animate-pulse-glow {
  animation: pulseGlow 7s ease-in-out infinite;
}

/* ==========================================================================
   TESTIMONIALS & MARQUEE CAROUSEL
   ========================================================================== */
@keyframes marqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@keyframes marqueeRight {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

.animate-marquee-left {
  display: flex;
  width: max-content;
  animation: marqueeLeft 35s linear infinite;
  will-change: transform;
}

.animate-marquee-right {
  display: flex;
  width: max-content;
  animation: marqueeRight 35s linear infinite;
  will-change: transform;
}

.marquee-row:hover .animate-marquee-left,
.marquee-row:hover .animate-marquee-right {
  animation-play-state: paused;
}

/* Gradient edge mask for continuous marquee */
.marquee-mask {
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

/* ==========================================================================
   CREATIVE GALLERY & LIGHTBOX
   ========================================================================== */
.gallery-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #E2E8F0;
  background-color: #0F172A;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-grid-item:hover {
  transform: translateY(-4px);
  border-color: #2563EB;
  box-shadow: 0 20px 35px -10px rgba(30, 61, 138, 0.2);
}

.gallery-grid-item img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.gallery-grid-item:hover img {
  transform: scale(1.06);
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS (Dual Direction - Scroll Down & Scroll Up)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-zoom {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Active Revealed State */
.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-zoom.active {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Staggered Delay Utilities */
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-250 { transition-delay: 250ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

