/* ==========================================================================
   KALFOX STOREFRONT - CUSTOM STYLES & DAISYUI / TAILWIND ENHANCEMENTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   Unlayered Heading & Typography Hierarchy Normalization
   Defeats unlayered CDN resets (h1,h2... { font-size: inherit })
   -------------------------------------------------------------------------- */
h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 900;
}
h2 {
    font-size: 2rem;
    line-height: 1.25;
    font-weight: 800;
}
h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
}
h4 {
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 700;
}

@media (min-width: 640px) {
    h1 { font-size: 3.25rem; }
    h2 { font-size: 2.25rem; }
}
@media (min-width: 1024px) {
    h1 { font-size: 4.25rem; }
    h2 { font-size: 2.5rem; }
}

/* Typography size utilities with unlayered priority */
.text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
.text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
.text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
.text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
.text-2xl { font-size: 1.5rem !important; line-height: 2rem !important; }
.text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
.text-4xl { font-size: 2.25rem !important; line-height: 2.5rem !important; }
.text-5xl { font-size: 3rem !important; line-height: 1.15 !important; }
.text-6xl { font-size: 3.75rem !important; line-height: 1.15 !important; }
.text-7xl { font-size: 4.5rem !important; line-height: 1.15 !important; }

@media (min-width: 640px) {
    .sm\:text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
    .sm\:text-4xl { font-size: 2.25rem !important; line-height: 2.5rem !important; }
    .sm\:text-5xl { font-size: 3rem !important; line-height: 1.15 !important; }
    .sm\:text-6xl { font-size: 3.75rem !important; line-height: 1.15 !important; }
}

@media (min-width: 1024px) {
    .lg\:text-5xl { font-size: 3rem !important; line-height: 1.15 !important; }
    .lg\:text-6xl { font-size: 3.75rem !important; line-height: 1.15 !important; }
    .lg\:text-7xl { font-size: 4.5rem !important; line-height: 1.15 !important; }
}

/* Font weight utilities with unlayered priority */
.font-black { font-weight: 900 !important; }
.font-extrabold { font-weight: 800 !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.font-medium { font-weight: 500 !important; }

/* Safe line-heights to eliminate text overlap */
.leading-\[1\.1\] { line-height: 1.2 !important; }
.leading-tight { line-height: 1.25 !important; }
.leading-snug { line-height: 1.35 !important; }
.leading-normal { line-height: 1.5 !important; }
.leading-relaxed { line-height: 1.625 !important; }

/* Text alignment & layout centering utilities with unlayered priority */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.w-full { width: 100% !important; }

/* --------------------------------------------------------------------------
   Vibrant Gradient Text System (Cross-Browser Webkit Clip)
   -------------------------------------------------------------------------- */
.text-gradient-hero {
    background-image: linear-gradient(135deg, #2563EB 0%, #4F46E5 50%, #DB2777 100%);
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    display: inline-block;
}

[data-theme="dark"] .text-gradient-hero {
    background-image: linear-gradient(135deg, #60A5FA 0%, #818CF8 50%, #F472B6 100%);
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    display: inline-block;
}

.brand-gradient-text {
    background-image: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    display: inline-block;
}

[data-theme="dark"] .brand-gradient-text {
    background-image: linear-gradient(135deg, #60A5FA 0%, #A78BFA 50%, #F472B6 100%);
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    display: inline-block;
}

/* --------------------------------------------------------------------------
   DaisyUI Aura Effect Components (https://daisyui.com/components/aura/)
   -------------------------------------------------------------------------- */
.aura {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    border-radius: 9999px;
    z-index: 1;
}

.aura::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    z-index: -1;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6, #EC4899, #06B6D4);
    background-size: 300% 300%;
    filter: blur(14px);
    opacity: 0.75;
    animation: aura-gradient 6s ease infinite, aura-pulse 3s ease-in-out infinite alternate;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.aura:hover::before {
    opacity: 1;
    filter: blur(22px);
    inset: -6px;
}

@keyframes aura-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes aura-pulse {
    0% { transform: scale(0.97); opacity: 0.65; }
    100% { transform: scale(1.04); opacity: 0.95; }
}

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

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

/* --------------------------------------------------------------------------
   Eyebrow Pill Badges & High-Contrast Metrics
   -------------------------------------------------------------------------- */
.eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #2563EB;
}

[data-theme="dark"] .eyebrow-badge {
    background-color: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: #93C5FD !important;
}

/* --------------------------------------------------------------------------
   Background Patterns & Hero Glow
   -------------------------------------------------------------------------- */
.bg-grid-pattern {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
}

[data-theme="dark"] .bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

.hero-ambient-glow {
    position: absolute;
    width: 650px;
    height: 450px;
    left: 50%;
    top: 35%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.15) 45%, transparent 70%);
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}

[data-theme="dark"] .hero-ambient-glow {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.28) 0%, rgba(139, 92, 246, 0.2) 45%, transparent 70%);
}

/* --------------------------------------------------------------------------
   Navigation Glassmorphism
   -------------------------------------------------------------------------- */
.nav-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(226, 232, 240, 0.8);
}

[data-theme="dark"] .nav-blur {
    background-color: rgba(15, 23, 42, 0.92);
    border-color: rgba(51, 65, 85, 0.8);
}

/* --------------------------------------------------------------------------
   Dark Mode High-Contrast System Enhancements
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
    color-scheme: dark;
    background-color: #0B0F19;
    color: #F8FAFC;
}

[data-theme="dark"] body {
    background-color: #0B0F19;
    color: #F8FAFC;
}

[data-theme="dark"] .bg-base-100 {
    background-color: #111827 !important;
}

[data-theme="dark"] .bg-base-200 {
    background-color: #0F172A !important;
}

[data-theme="dark"] .bg-base-200\/50,
[data-theme="dark"] .bg-base-200\/60,
[data-theme="dark"] .bg-base-200\/70 {
    background-color: rgba(15, 23, 42, 0.8) !important;
}

[data-theme="dark"] .border-base-200 {
    border-color: #1E293B !important;
}

[data-theme="dark"] .border-base-300 {
    border-color: #334155 !important;
}

/* Text readability in dark mode */
[data-theme="dark"] .text-base-content\/75,
[data-theme="dark"] .text-base-content\/70 {
    color: #CBD5E1 !important;
}

[data-theme="dark"] .text-base-content\/60 {
    color: #94A3B8 !important;
}

[data-theme="dark"] .text-base-content\/80,
[data-theme="dark"] .text-base-content\/85 {
    color: #E2E8F0 !important;
}

/* Cards contrast in dark mode */
[data-theme="dark"] .card {
    background-color: #111827;
    border-color: #1E293B;
}

[data-theme="dark"] .card:not(.pricing-card):not(.pricing-card-popular):hover {
    border-color: #3B82F6;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
}

/* Feature Icon Containers in Dark Mode */
.icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .icon-container-blue {
    background-color: rgba(59, 130, 246, 0.2) !important;
    color: #60A5FA !important;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .icon-container-amber {
    background-color: rgba(245, 158, 11, 0.2) !important;
    color: #FBBF24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .icon-container-indigo {
    background-color: rgba(99, 102, 241, 0.2) !important;
    color: #A5B4FC !important;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .icon-container-cyan {
    background-color: rgba(6, 182, 212, 0.2) !important;
    color: #67E8F9 !important;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

[data-theme="dark"] .icon-container-teal {
    background-color: rgba(20, 184, 166, 0.2) !important;
    color: #5EEAD4 !important;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

[data-theme="dark"] .icon-container-pink {
    background-color: rgba(236, 72, 153, 0.2) !important;
    color: #F472B6 !important;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

[data-theme="dark"] .icon-container-purple {
    background-color: rgba(139, 92, 246, 0.2) !important;
    color: #C4B5FD !important;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

[data-theme="dark"] .icon-container-green {
    background-color: rgba(16, 185, 129, 0.2) !important;
    color: #34D399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Feature deep-dive list icon styling */
.feature-check-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: #10B981;
}

[data-theme="dark"] .feature-check-icon {
    color: #34D399 !important;
}

/* FAQ Accordion contrast */
[data-theme="dark"] .collapse {
    background-color: #111827;
    border-color: #1E293B;
}

[data-theme="dark"] .collapse-title {
    color: #F8FAFC !important;
}

[data-theme="dark"] .collapse-content {
    color: #CBD5E1 !important;
}

/* --------------------------------------------------------------------------
   Footer Header Spacing & High-Contrast Typography
   -------------------------------------------------------------------------- */
.footer-column-heading {
    font-size: 0.8125rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #0F172A !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 1.25rem !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    display: block;
}

[data-theme="dark"] .footer-column-heading {
    color: #F1F5F9 !important;
    border-bottom-color: rgba(51, 65, 85, 0.5) !important;
}

/* --------------------------------------------------------------------------
   Equal Height Pricing Cards & Baseline CTA Button Alignment
   -------------------------------------------------------------------------- */
.pricing-card-grid {
    display: grid;
    align-items: stretch;
}

/* Base Pricing Card Structure */
.pricing-card,
.pricing-card-popular {
    box-sizing: border-box !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    border-radius: 1.5rem !important;
    border-width: 2px !important;
    border-style: solid !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}

/* Regular Cards (Starter & Enterprise) - Light Mode */
.pricing-card {
    border-color: #E2E8F0 !important;
    background-color: #FFFFFF !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
}

.pricing-card:hover {
    transform: translateY(-4px) !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.35), 0 12px 28px -6px rgba(59, 130, 246, 0.22) !important;
}

/* Regular Cards (Starter & Enterprise) - Dark Mode */
[data-theme="dark"] .pricing-card {
    border-color: #1E293B !important;
    background-color: #111827 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .pricing-card:hover {
    transform: translateY(-4px) !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.45), 0 12px 28px -6px rgba(59, 130, 246, 0.3) !important;
}

/* Most Popular Card (Professional) - Gold Highlights - Light Mode */
.pricing-card-popular {
    border-color: #F59E0B !important;
    background-color: #FFFFFF !important;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.2), 0 4px 10px -2px rgba(245, 158, 11, 0.15) !important;
    z-index: 10;
}

.pricing-card-popular:hover {
    transform: translateY(-4px) !important;
    border-color: #D97706 !important;
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.48), 0 14px 32px -6px rgba(217, 119, 6, 0.3) !important;
}

/* Most Popular Card (Professional) - Gold Highlights - Dark Mode */
[data-theme="dark"] .pricing-card-popular {
    border-color: #F59E0B !important;
    background-color: #111827 !important;
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.25), 0 4px 12px -2px rgba(0, 0, 0, 0.4) !important;
    z-index: 10;
}

[data-theme="dark"] .pricing-card-popular:hover {
    transform: translateY(-4px) !important;
    border-color: #FBBF24 !important;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.55), 0 14px 32px -6px rgba(245, 158, 11, 0.38) !important;
}

/* --------------------------------------------------------------------------
   Vertically Centered Pricing CTA Buttons
   -------------------------------------------------------------------------- */
.pricing-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    min-height: 3.5rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    gap: 0.5rem !important;
    border-radius: 0.75rem !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
}

.pricing-cta-btn > span {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pricing-cta-btn > svg {
    display: inline-block !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    width: 16px !important;
    height: 16px !important;
}

/* Outline CTA Button (Starter & Enterprise) */
.pricing-cta-btn-outline {
    background-color: transparent !important;
    border: 2px solid #2563EB !important;
    color: #2563EB !important;
}

.pricing-cta-btn-outline:hover {
    background-color: #2563EB !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
}

[data-theme="dark"] .pricing-cta-btn-outline {
    border-color: #3B82F6 !important;
    color: #60A5FA !important;
}

[data-theme="dark"] .pricing-cta-btn-outline:hover {
    background-color: #3B82F6 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4) !important;
}

/* Gold Gradient CTA Button (Most Popular) */
.pricing-cta-btn-popular {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    border: 2px solid #F59E0B !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
}

.pricing-cta-btn-popular:hover {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%) !important;
    border-color: #FBBF24 !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.55) !important;
}

/* Pricing Table Container */
.stripe-container {
    min-height: 480px;
    width: 100%;
}
.stripe-container stripe-pricing-table {
    display: block;
    width: 100%;
}

/* --------------------------------------------------------------------------
   High-Contrast Secondary & Outline Buttons
   Fixes inverted text contrast on hover across light and dark themes.
   -------------------------------------------------------------------------- */
.btn-secondary-outline {
    background-color: transparent !important;
    border: 2px solid rgba(148, 163, 184, 0.45) !important;
    color: #1E293B !important;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-secondary-outline:hover {
    background-color: rgba(59, 130, 246, 0.08) !important;
    border-color: #2563EB !important;
    color: #2563EB !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15) !important;
}

[data-theme="dark"] .btn-secondary-outline {
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #F8FAFC !important;
}

[data-theme="dark"] .btn-secondary-outline:hover {
    background-color: rgba(59, 130, 246, 0.18) !important;
    border-color: #60A5FA !important;
    color: #93C5FD !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25) !important;
}

/* Global contrast protection for neutral .btn-outline buttons across all pages */
.btn-outline:not(.btn-primary):not(.btn-secondary):not(.btn-accent):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-error) {
    border-color: rgba(148, 163, 184, 0.45);
    color: #1E293B;
}

.btn-outline:not(.btn-primary):not(.btn-secondary):not(.btn-accent):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-error):hover,
.btn-outline:not(.btn-primary):not(.btn-secondary):not(.btn-accent):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-error).btn-active {
    background-color: rgba(59, 130, 246, 0.08) !important;
    border-color: #2563EB !important;
    color: #2563EB !important;
}

[data-theme="dark"] .btn-outline:not(.btn-primary):not(.btn-secondary):not(.btn-accent):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-error) {
    border-color: rgba(148, 163, 184, 0.35);
    color: #F8FAFC;
}

[data-theme="dark"] .btn-outline:not(.btn-primary):not(.btn-secondary):not(.btn-accent):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-error):hover,
[data-theme="dark"] .btn-outline:not(.btn-primary):not(.btn-secondary):not(.btn-accent):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-error).btn-active {
    background-color: rgba(59, 130, 246, 0.18) !important;
    border-color: #60A5FA !important;
    color: #93C5FD !important;
}

/* --------------------------------------------------------------------------
   Smooth Mobile Menu Drawer Transitions & Frosted Glass Backdrop
   -------------------------------------------------------------------------- */
#mobile-menu-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0.35s ease;
}

#mobile-menu-drawer.open {
    visibility: visible;
    pointer-events: auto;
}

#mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu-drawer.open #mobile-menu-backdrop {
    opacity: 1;
}

#mobile-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 22rem;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
    border-left: 1px solid rgba(226, 232, 240, 0.8);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 10;
}

[data-theme="dark"] #mobile-menu-panel {
    background-color: rgba(17, 24, 39, 0.95);
    border-left-color: rgba(51, 65, 85, 0.8);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
}

#mobile-menu-drawer.open #mobile-menu-panel {
    transform: translateX(0);
}
