
/* MindMarket-Inspired Styles */

:root {
    /* ===== BRAND COLORS ===== */
    --color-primary: #8ED462;
    --color-primary-hover: #368D32;
    --color-primary-dark: #1a5e18;
    --color-primary-light: rgba(142, 212, 98, 0.15);
    --color-primary-muted: rgba(142, 212, 98, 0.1);

    --color-secondary: #4b9ff9;
    --color-secondary-hover: #2563eb;

    --color-accent: #F59E0B;

    /* Legacy aliases (mapped to design tokens for faster-visual-editor) */
    --brand-primary: var(--color-primary);
    --brand-dark: var(--color-text);
    --brand-light: var(--color-primary-muted);
    --brand-accent: var(--color-secondary);
    --brand-neutral: var(--color-text-muted);

    /* Secondary hover for visual editor */
    --color-secondary-hover: #2563eb;

    /* ===== TEXT COLORS ===== */
    --color-text: #2c2e2a;
    --color-text-secondary: #4b5563;
    --color-text-muted: #6b7280;
    --color-text-light: #888888;
    --color-text-lighter: #666666;
    --color-text-on-dark: #ffffff;
    --color-text-on-primary: #2c2e2a;

    /* ===== BACKGROUND COLORS ===== */
    --color-bg: #ffffff;
    --color-bg-secondary: #f9fafb;
    --color-bg-dark: #111111;
    --color-bg-darker: #0a0a0a;
    --color-beige: #f5f2eb;
    --color-beige-400: #ebe7dc;

    /* ===== SEMANTIC COLORS ===== */
    --color-success: #8ED462;
    --color-error: #ea6f59;
    --color-warning: #F59E0B;
    --color-info: #4b9ff9;

    /* Legacy color aliases (mapped to semantic tokens for faster-visual-editor) */
    --color-green: var(--color-primary);
    --color-green-500: var(--color-primary-hover);
    --color-charcoal: var(--color-text);
    --color-red-500: var(--color-error);
    --color-blue-500: var(--color-secondary);
    --white: var(--color-bg);
    --light-gray: var(--color-border);
    --medium-gray: var(--color-text-muted);
    --dark-gray: var(--color-text-secondary);
    --success: var(--color-success);
    --error: var(--color-error);
    --warning: var(--color-warning);
    --info: var(--color-info);

    /* Error light for visual editor */
    --color-error-light: rgba(234, 111, 89, 0.15);
    --color-error-border: #ea6f59;

    /* Success light and border for form validation */
    --color-success-light: rgba(142, 212, 98, 0.15);
    --color-success-border: #8ED462;

    /* ===== BORDER COLORS ===== */
    --color-border: #e5e7eb;
    --color-border-dark: #222222;

    /* ===== TYPOGRAPHY ===== */
    --font-heading: "bahnschrift", sans-serif;
    --font-heading-condensed: "bahnschrift-condensed", sans-serif;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 0.95rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;

    /* ===== SPACING SCALE ===== */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;

    /* ===== BORDER RADIUS ===== */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* ===== SHADOWS ===== */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-header: 0 2px 20px rgba(0, 0, 0, 0.1);

    /* ===== TRANSITIONS ===== */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* ===== LAYOUT ===== */
    --max-width: 1400px;
    --max-width-content: 1200px;
    --header-height: 80px;
    --header-height-scrolled: 64px;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    color: var(--color-charcoal);
    background-color: var(--white);
}

/* Primary */
.fb-bg-primary {
    background-color: var(--brand-primary) !important;
}
.fb-text-primary {
    color: var(--brand-primary) !important;
}
.fb-border-primary {
    border-color: var(--brand-primary) !important;
}

/* Dark */
.fb-bg-dark {
    background-color: var(--brand-dark) !important;
}
.fb-text-dark {
    color: var(--brand-dark) !important;
}
.fb-border-dark {
    border-color: var(--brand-dark) !important;
}

/* Light */
.fb-bg-light {
    background-color: var(--brand-light) !important;
}
.fb-text-light {
    color: var(--brand-light) !important;
}
.fb-border-light {
    border-color: var(--light-gray) !important;
}

/* Accent */
.fb-bg-accent {
    background-color: var(--brand-accent) !important;
}
.fb-text-accent {
    color: var(--brand-accent) !important;
}
.fb-border-accent {
    border-color: var(--brand-accent) !important;
}

/* Neutral */
.fb-text-neutral {
    color: var(--brand-neutral) !important;
}
.fb-bg-neutral {
    background-color: var(--brand-neutral) !important;
}
.fb-border-neutral {
    border-color: var(--brand-neutral) !important;
}

/* Beige Background */
.fb-bg-beige {
    background-color: var(--color-beige) !important;
}
.fb-bg-beige-400 {
    background-color: var(--color-beige-400) !important;
}

/* Secondary Color */
.fb-text-secondary {
    color: var(--color-secondary) !important;
}
.fb-bg-secondary {
    background-color: var(--color-secondary) !important;
}
.bg-secondary-light {
    background-color: var(--color-secondary-light, rgba(75, 159, 249, 0.2));
}

/* Primary light variants */
.bg-primary-light {
    background-color: var(--color-primary-light);
}
.bg-primary-muted {
    background-color: var(--color-primary-muted);
}

/* Error light variant */
.bg-error-light {
    background-color: var(--color-error-light);
}

/* Error/Coral Color */
.fb-text-error {
    color: var(--color-error) !important;
}
.fb-bg-error {
    background-color: var(--color-error) !important;
}

/* Primary Hover Color */
.fb-text-primary-hover {
    color: var(--color-primary-hover) !important;
}
.fb-bg-primary-hover {
    background-color: var(--color-primary-hover) !important;
}

/* Text Color (Charcoal) */
.fb-text-charcoal {
    color: var(--color-text) !important;
}

/* Icon/SVG color utilities */
.text-primary-hover {
    color: var(--color-primary-hover);
}
.text-muted {
    color: var(--medium-gray);
}

/* Border utilities */
.fb-border-primary {
    border-color: var(--color-primary) !important;
}
.border-primary {
    border-color: var(--color-primary);
}

/* Gradient backgrounds */
.fb-bg-gradient-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%) !important;
}

/* Global Heading Font — Bahnschrift */
h1, h2, h3, h4, h5, h6,
.fb-h1, .fb-h2, .fb-h3, .fb-h4, .fb-h5 {
    font-family: var(--font-heading);
}

/* Condensed variant for large hero titles */
.hero-title,
.training-hero-title {
    font-family: var(--font-heading-condensed);
}

/* Typography - MindMarket Style */
.fb-h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.fb-h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.fb-h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.fb-h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

.fb-h5 {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
}

.fb-body {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 8px;
}

.fb-small {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* Links */
.fb-link {
    text-decoration: none;
    transition: all 200ms ease;
}

.fb-link:hover {
    color: var(--brand-primary);
}

/* Buttons - MindMarket Style */
.fb-btn {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 300ms ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fb-btn-primary {
    background-color: var(--brand-primary);
    color: var(--color-charcoal);
    border: none;
}

.fb-btn-primary:hover {
    background-color: var(--color-green-500);
    color: var(--white);
    transform: scale(1.02);
}

.fb-btn-secondary {
    background-color: transparent;
    color: var(--color-charcoal);
    border: 2px solid var(--color-charcoal);
}

.fb-btn-secondary:hover {
    background-color: var(--color-charcoal);
    color: var(--white);
}

.fb-btn-cta {
    background-color: var(--color-text);
    color: var(--color-text-on-dark);
    border: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.fb-btn-cta:hover {
    background-color: var(--color-bg-dark);
    transform: scale(1.02);
}

.fb-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cards - MindMarket Style */
.fb-card {
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 24px;
    transition: all 300ms ease;
    background: var(--white);
}

.fb-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.fb-card-header {
    margin-bottom: 16px;
}

.fb-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.fb-card-content {
    font-size: 1rem;
    line-height: 1.6;
}

.fb-card-footer {
    margin-top: 16px;
}

/* Form Elements */
.fb-form-control {
    display: block;
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--dark-gray);
    background-color: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    transition: all 200ms ease;
    box-sizing: border-box;
}

.fb-form-control:hover {
    border-color: var(--brand-primary);
}

.fb-form-control:focus {
    border-color: var(--brand-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-light);
}

.fb-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-gray);
}

/* Hero Section - MindMarket Style */
.hero-home {
    width: 100%;
    min-height: 100vh;
    background-color: var(--color-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    padding-bottom: 80px;
    overflow: hidden;
    z-index: 10;
}

/* Hero content is now rendered inside the canvas */

/* Featured Articles */
.featured-articles {
    padding: 80px 0;
}

.article-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-card-image {
    aspect-ratio: 7/6;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-title {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.04em;
}

/* Brands Section */
.brands-section {
    padding: 80px 0;
}

.brands-section-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.06em;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.brand-item {
    background-color: var(--color-beige-400);
    padding: 20px 40px 20px 20px;
    border-radius: 60px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand-item-visual {
    width: 60px;
    height: 60px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Rail/Marquee Animation */
.rail {
    overflow: hidden;
    display: block;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.rail-container {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: rail-scroll 30s linear infinite;
}

.rail-pattern {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 16px;
}

@keyframes rail-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 48px;
    }
}

/* Grid */
.grid {
    display: grid;
    gap: 24px;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-balance {
    text-wrap: balance;
}

/* Animation Classes */
.anim-fade-in {
    animation: fadeIn 600ms ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .fb-h1 {
        font-size: 2.5rem;
        line-height: 1;
    }

    .fb-h2 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .fb-h3 {
        font-size: 1.375rem;
        line-height: 1.3;
    }

    .fb-btn {
        padding: 10px 20px;
    }

    .hero-home {
        min-height: 80vh;
    }
}

/* Header Styles — matches Vector Sales Advisors pattern */
#ai_header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    transition: all 0.3s !important;
    background: rgba(255, 255, 255, 0) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 1 !important;
}

/* Transparent state — at top of homepage */
#ai_header.transparent {
    background: transparent !important;
}

#ai_header.transparent .desktop-nav .nav-link,
#ai_header.transparent .desktop-nav svg,
#ai_header.transparent .mobile-menu-toggle .hamburger-line,
#ai_header.transparent .site-title {
    color: #fff !important;
}

#ai_header.transparent .mobile-menu-toggle .hamburger-line {
    background: #fff !important;
}

/* Scrolled state — frosted glass */
#ai_header.scrolled {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: 0 2px 10px rgba(0, 20, 10, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

#ai_header.scrolled .nav-link,
#ai_header.scrolled svg,
#ai_header.scrolled .mobile-toggle,
#ai_header.scrolled .site-title {
    color: var(--color-charcoal) !important;
}

/* Navigation */
.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    transition: color 200ms ease;
}

.nav-link:hover {
    color: var(--brand-primary) !important;
}

/* Dropdown Menu */
.mega-menu,
.dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 300ms ease, visibility 300ms ease, transform 300ms ease;
    transform: translateY(10px);
}

.group:hover > .mega-menu,
.group:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Mega Menu Sizing */
.mega-menu {
    width: 480px;
    padding: 16px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    left: 50%;
    margin-left: -240px;
}

/* Services mega menu - wider */
.nav-item:nth-child(3) .mega-menu {
    width: 520px;
    margin-left: -260px;
}

/* About mega menu */
.nav-item:nth-child(2) .mega-menu {
    width: 400px;
    margin-left: -200px;
}

/* Dropdown menu sizing */
.dropdown-menu {
    width: 320px;
    padding: 8px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Mega menu items */
.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    transition: background-color 200ms ease;
    text-decoration: none;
}

.mega-menu-item:hover {
    background-color: rgba(142, 212, 98, 0.1);
}

.mega-menu-item .flex-shrink-0 {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mega-menu-item .font-semibold {
    font-weight: 600;
    color: var(--color-charcoal);
    transition: color 200ms ease;
}

.mega-menu-item:hover .font-semibold {
    color: var(--color-green-500);
}

/* Footer Styles */
#ai-footer {
    background-color: var(--color-charcoal);
}

#ai-footer a:hover {
    color: var(--brand-primary) !important;
}

/* Logo SVG for MindMarket-style */
.logo-icon {
    width: 36px;
    height: 30px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--color-charcoal);
}

/* Wave underline animation */
.wave-underline {
    position: relative;
    display: inline-block;
}

.wave-underline::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 8px;
    background: var(--brand-primary);
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 20'><path d='M0,5.7c16,0,16,8.8,32.1,8.8s16-8.8,32.1-8.8' fill='none' stroke='black' stroke-width='10'/></svg>");
    mask-repeat: repeat-x;
    mask-size: 64px 20px;
    animation: wave-scroll 3s linear infinite;
}

@keyframes wave-scroll {
    from {
        mask-position: 0 0;
    }
    to {
        mask-position: -64px 0;
    }
}

/* ===== GRADIENT REVEAL ANIMATION (faster-motion) ===== */

/* Gradient reveal wrapper */
.gradient-reveal-wrap {
    position: relative;
    display: inline-block;
}

/* Gradient reveal initial state - hide gradient layer chars until animated */
[data-gradient-reveal="gradient"] > span,
[data-gradient-reveal="gradient"] .fmtion-char {
    opacity: 0;
}

/* Reveal layer - solid darker green that appears */
.gradient-layer,
[data-gradient-reveal="gradient"],
[data-gradient-reveal="gradient"] .fmtion-char {
    color: var(--color-primary-hover) !important;
    -webkit-text-fill-color: var(--color-primary-hover) !important;
    background: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
}

/* Overlay layer - solid text that fades to reveal gradient */
.overlay-layer,
[data-gradient-reveal="overlay"] {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    -webkit-text-fill-color: var(--color-text, #2c2e2a);
    color: var(--color-text, #2c2e2a);
}

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