/* ============ GLOBAL VARIABLES ============ */
:root {
    /* Accent & Brand Colors */
    --color-accent: #6366F1;
    /* Primary Indigo/Blue */
    --color-accent-soft: rgba(99, 102, 241, 0.1);
    --color-accent-hover: #4F46E5;
    
    /* Colors for cursive/serif accents */
    --color-text-serif: #9CA3AF; /* Light backgrounds */
    --color-text-serif-dark: #A5B4FC; /* Dark backgrounds (soft - previously indigo-300) */
    --color-text-serif-dark-bold: #818CF8; /* Dark backgrounds (bold - previously indigo-400) */
    --color-text-serif-dark-highlight: #6366F1; /* Dark backgrounds (highlight - previously indigo-500) */

    /* Neutral & Background Colors */
    --color-dark: #0A0A0B;
    /* Deepest Black-Gray */
    --color-dark-soft: #0D0D11;
    /* Cards / Secondary Layers */
    --color-section-gray: #ff1e006a;
    /* Light sections */
    --color-border: rgba(255, 255, 255, 0.08);

    /* Hero Glow */
    --color-hero-glow: rgba(99, 102, 241, 0.2);
}

/* ============ TAILWIND CUSTOM STYLES ============ */

/* ============ TYPOGRAPHY ============ */
html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    height: -webkit-fill-available;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    -webkit-overflow-scrolling: touch;
    @apply text-gray-900;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    @apply font-bold;
}

a {
    @apply transition-colors duration-300;
}

/* ============ PROSE STYLING ============ */
.prose {
    @apply max-w-none;
}

.prose h2 {
    @apply text-3xl font-bold mt-8 mb-4;
}

.prose h3 {
    @apply text-2xl font-bold mt-6 mb-3;
}

.prose p {
    @apply mb-4 text-gray-700 leading-relaxed;
}

.prose ul {
    @apply list-disc list-inside mb-4;
}

.prose li {
    @apply mb-2 text-gray-700;
}

/* ============ ANIMATION ============ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ============ HOVER EFFECTS ============ */
.hover-lift {
    @apply transition-transform duration-300 hover:scale-105;
}

.hover-shadow {
    @apply transition-shadow duration-300 hover:shadow-lg;
}

/* ============ UTILITY CLASSES ============ */
.container-max {
    @apply max-w-7xl mx-auto;
}

.section-padding {
    @apply py-16;
}

.section-padding-lg {
    @apply py-20;
}

/* ============ FORM STYLES ============ */
@apply w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-indigo-600 focus:ring-1 focus:ring-indigo-200 transition;
border-color: var(--color-gray-300, #D1D5DB);
}

input::placeholder,
textarea::placeholder {
    @apply text-gray-400;
}

/* ============ BUTTON STYLES ============ */
.btn-primary {
    background-color: var(--color-accent);
    @apply inline-block px-6 py-3 text-white rounded-lg transition font-semibold;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
}

button[type="submit"]:active,
.btn-primary:active {
    @apply transform scale-95;
}

/* ============ ACCESSIBILITY ============ */
:focus-visible {
    @apply outline-2 outline-offset-2 outline-blue-600;
}

/* ============ RESPONSIVE ADJUSTMENTS ============ */
@media (max-width: 768px) {
    .hero-title {
        @apply text-4xl;
    }

    .container-max {
        @apply px-4;
    }
}

/* ============ MOBILE NAVIGATION MENU ============ */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
}

#mobile-menu-toggle svg {
    transition: transform 0.3s ease-in-out;
}

#mobile-menu-toggle[aria-expanded="true"] svg {
    transform: rotate(90deg);
}

/* ============ PRINT STYLES ============ */
@media print {

    nav,
    footer {
        @apply hidden;
    }

    a {
        @apply no-underline;
    }
}

/* ============ NEW FOOTER & CTA ANIMATIONS ============ */
.font-serif {
    font-family: 'Playfair Display', serif;
}

.font-bricolage {
    font-family: 'Bricolage Grotesque', sans-serif !important;
}

@keyframes float {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-float-slow {
    animation: float 20s ease-in-out infinite;
}

/* ============ REPETITIVE REVEAL ANIMATIONS ============ */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.quote-fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s ease-in;
}

.quote-fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

/* For fade out when leaving viewport (repetitive) */
.reveal-on-scroll:not(.is-visible) {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
}

/* ============ DARK BLOG CARD THEME ============ */
.dark-blog-card {
    background: #0D0D0E;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.dark-blog-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: #111112;
    transform: translateY(-8px);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
}

.dark-blog-card .card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(99, 102, 241, 0.08), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.dark-blog-card:hover .card-glow {
    opacity: 1;
}

/* ============ PARALLAX & MAGNETIC UTILS ============ */
.parallax-wrap {
    overflow: hidden;
}

.parallax-img {
    will-change: transform;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.magnetic-wrap {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============ NEW NAVIGATION STYLES ============ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    will-change: transform, opacity;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.glass-nav {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 2s linear infinite;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Custom Hamburger Animation */
.hamburger-box {
    width: 20px;
    height: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.hamburger-inner {
    width: 20px;
    height: 2px;
    background-color: #111827;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

#mobile-menu-toggle-btn.active .hamburger-inner:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#mobile-menu-toggle-btn.active .hamburger-inner:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-menu-toggle-btn.active .hamburger-inner:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu Reveal Animation */
#new-mobile-menu {
    display: block !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

#new-mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ============ LOGO CLOUD SCROLL ============ */
@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll-logos {
    animation: scroll-logos 30s linear infinite;
}

.logo-cloud-mask {
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
/* ============ HERO GLOW EFFECT ============ */
.hero-glow-blur {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background-color: var(--color-hero-glow);
    filter: blur(120px);
    border-radius: 9999px;
    z-index: 0;
    pointer-events: none;
}
