/* Tailwind CSS - Processed by Vite/PostCSS when imported via React components */
@tailwind base;
@tailwind components;
@tailwind utilities;


@layer base {
  * {
    border-color: hsl(var(--border));
  }

  :root {
    scroll-behavior: smooth;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'rlig' 1, 'calt' 1;
  }

  /* Ensure HubSpot wrapper allows full-height layout (e.g. Platform page) */
  .page-wrapper {
    min-height: 100vh;
  }

  /* Theme logic (align with suger-platform-master):
   * - Variables here (:root / .dark) define --primary-foreground etc.
   * - tailwind.config.js theme.extend.colors.primary.foreground maps to hsl(var(--primary-foreground))
   * - Tailwind generates .text-primary-foreground etc. from theme when class is used in content */
  :root {
    --font-sans: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui,
      sans-serif;
    --background: 0 0% 99%;
    --foreground: 220 20% 14%;
    --card: 0 0% 100%;
    --card-foreground: 220 20% 14%;
    --popover: 0 0% 100%;
    --popover-foreground: 220 20% 14%;
    --primary: 24 95% 53%;
    --primary-foreground: 0 0% 100%;
    --primary-glow: 32 100% 55%;
    --secondary: 30 20% 96%;
    --secondary-foreground: 220 20% 14%;
    --muted: 30 15% 94%;
    --muted-foreground: 220 10% 46%;
    --accent: 30 100% 96%;
    --accent-foreground: 24 95% 40%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;
    --border: 30 15% 90%;
    --input: 30 15% 90%;
    --ring: 24 95% 53%;
    --radius: 0.75rem;
    --gradient-primary: linear-gradient(
      135deg,
      hsl(32 100% 55%) 0%,
      hsl(24 95% 53%) 50%,
      hsl(16 90% 50%) 100%
    );
    --gradient-hero: linear-gradient(
      180deg,
      hsl(30 100% 98%) 0%,
      hsl(0 0% 100%) 100%
    );
    --gradient-card: linear-gradient(
      180deg,
      hsl(0 0% 100%) 0%,
      hsl(30 20% 98%) 100%
    );
    --gradient-cta: linear-gradient(
      180deg,
      hsl(220 20% 14%) 0%,
      hsl(220 25% 8%) 100%
    );
    --shadow-sm: 0 1px 2px 0 hsl(220 20% 14% / 0.03);
    --shadow-md: 0 4px 12px -2px hsl(220 20% 14% / 0.06),
      0 2px 4px -2px hsl(220 20% 14% / 0.04);
    --shadow-lg: 0 12px 32px -4px hsl(220 20% 14% / 0.08),
      0 4px 8px -2px hsl(220 20% 14% / 0.04);
    --shadow-xl: 0 24px 48px -8px hsl(220 20% 14% / 0.12),
      0 8px 16px -4px hsl(220 20% 14% / 0.06);
    --shadow-glow: 0 8px 32px -4px hsl(24 95% 53% / 0.25);
    --shadow-card-hover: 0 20px 40px -8px hsl(220 20% 14% / 0.1),
      0 8px 16px -4px hsl(220 20% 14% / 0.05);

    /* Sidebar - align with suger-platform-master */
    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 24 95% 53%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 30 20% 96%;
    --sidebar-accent-foreground: 220 20% 14%;
    --sidebar-border: 30 15% 91%;
    --sidebar-ring: 24 95% 53%;
  }

  .dark {
    --background: 220 25% 6%;
    --foreground: 30 20% 96%;
    --card: 220 25% 8%;
    --card-foreground: 30 20% 96%;
    --popover: 220 25% 8%;
    --popover-foreground: 30 20% 96%;
    --primary: 24 95% 53%;
    --primary-foreground: 0 0% 100%;
    --secondary: 220 20% 14%;
    --secondary-foreground: 30 20% 96%;
    --muted: 220 20% 14%;
    --muted-foreground: 220 10% 60%;
    --accent: 220 20% 14%;
    --accent-foreground: 30 20% 96%;
    --destructive: 0 62% 30%;
    --destructive-foreground: 30 20% 96%;
    --border: 220 20% 14%;
    --input: 220 20% 14%;
    --ring: 24 95% 53%;
    --sidebar-background: 220 25% 6%;
    --sidebar-foreground: 30 20% 90%;
    --sidebar-primary: 24 95% 53%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 220 20% 12%;
    --sidebar-accent-foreground: 30 20% 96%;
    --sidebar-border: 220 20% 12%;
    --sidebar-ring: 24 95% 53%;
  }
}

@layer components {
  /* Custom component classes moved out of @layer - see bottom of file */
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }

  .animation-delay-100 {
    animation-delay: 100ms;
  }

  .animation-delay-200 {
    animation-delay: 200ms;
  }

  .animation-delay-300 {
    animation-delay: 300ms;
  }

  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }

  .text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, hsl(var(--primary)), #fb923c);
  }

  .bg-gradient-primary {
    background: linear-gradient(to right, hsl(var(--primary)), #fb923c) !important;
    background-image: linear-gradient(to right, hsl(var(--primary)), #fb923c);
  }

  .bg-gradient-hero {
    background-image: linear-gradient(to bottom right, #ffffff, rgba(255, 247, 237, 0.3), #ffffff);
  }

  .bg-surface-elevated {
    background: hsl(var(--surface-elevated));
  }

  .bg-surface-sunken {
    background: hsl(var(--surface-sunken));
  }

  .shadow-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
  }

  .shadow-card-hover {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }

}

/* Custom classes - Moved out of @layer to ensure HubSpot build system processes them correctly */
.gradient-text {
  background-image: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-bg {
  background-image: var(--gradient-primary);
}

.gradient-hero-bg {
  background-image: var(--gradient-hero);
}

.gradient-cta-bg {
  background-image: var(--gradient-cta);
}

.shadow-card {
  box-shadow: var(--shadow-md);
}

.shadow-card-hover {
  box-shadow: var(--shadow-card-hover);
}

.shadow-glow {
  box-shadow: var(--shadow-glow);
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.platform-entrance-y {
  animation: fadeInUp 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.platform-entrance-scale {
  animation: zoomIn 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.hero-entrance-y {
  animation: fadeInUp 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.hero-entrance-y-scale {
  animation: fadeInUp 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both,
    zoomIn 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.hero-entrance-scale {
  animation: zoomIn 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.hero-float-loop {
  animation: heroFloatLoop 5s ease-in-out infinite;
}

.hero-shimmer {
  animation: heroShimmer 3s linear 1s infinite;
}

.hero-bounce-loop {
  animation: heroBounceLoop 4s ease-in-out infinite;
}

.platform-wobble-x {
  animation: platformWobbleX 2s ease-in-out infinite;
}

.platform-pulse {
  animation: platformPulse 4s ease-in-out infinite;
}

.platform-pulse-opacity {
  animation: platformPulseOpacity 4s ease-in-out infinite;
}

/* Scroll-triggered animations - elements start hidden and animate when entering viewport */
.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.scroll-animate.in-view {
  opacity: 1;
  transform: translateY(0);
}

.scroll-animate-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.scroll-animate-scale.in-view {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for children - use with data-delay attribute */
.scroll-animate[data-delay='1'] {
  transition-delay: 0.1s;
}
.scroll-animate[data-delay='2'] {
  transition-delay: 0.2s;
}
.scroll-animate[data-delay='3'] {
  transition-delay: 0.3s;
}
.scroll-animate[data-delay='4'] {
  transition-delay: 0.4s;
}
.scroll-animate[data-delay='5'] {
  transition-delay: 0.5s;
}
.scroll-animate[data-delay='6'] {
  transition-delay: 0.6s;
}
.scroll-animate[data-delay='7'] {
  transition-delay: 0.7s;
}
.scroll-animate[data-delay='8'] {
  transition-delay: 0.8s;
}

.scroll-animate-scale[data-delay='1'] {
  transition-delay: 0.08s;
}
.scroll-animate-scale[data-delay='2'] {
  transition-delay: 0.16s;
}
.scroll-animate-scale[data-delay='3'] {
  transition-delay: 0.24s;
}
.scroll-animate-scale[data-delay='4'] {
  transition-delay: 0.32s;
}
.scroll-animate-scale[data-delay='5'] {
  transition-delay: 0.4s;
}
.scroll-animate-scale[data-delay='6'] {
  transition-delay: 0.48s;
}
.scroll-animate-scale[data-delay='7'] {
  transition-delay: 0.56s;
}
.scroll-animate-scale[data-delay='8'] {
  transition-delay: 0.64s;
}

/* Container and Spacing Utilities - moved out of @layer for better compatibility */
.section-spacing {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .section-spacing {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

@media (min-width: 1024px) {
  .section-spacing {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

.container-narrow {
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-narrow {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-narrow {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.container-wide {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-wide {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-wide {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
