/* ===================================
   East End Web - Custom Styles
   =================================== */

/* ===================================
   Fluid Typography System
   All sizes scale with viewport using clamp()
   Format: clamp(min, preferred, max)
   =================================== */

:root {
    /* Fluid Base Font Size */
    --fluid-base: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);

    /* Fluid Heading Sizes */
    --fluid-h1: clamp(2.5rem, 5vw + 1rem, 8rem);
    --fluid-h2: clamp(2rem, 4vw + 0.5rem, 5rem);
    --fluid-h3: clamp(1.5rem, 2.5vw + 0.5rem, 3rem);
    --fluid-h4: clamp(1.25rem, 1.5vw + 0.5rem, 2rem);
    --fluid-h5: clamp(1.1rem, 1.2vw + 0.5rem, 1.5rem);
    --fluid-h6: clamp(1rem, 1vw + 0.5rem, 1.25rem);

    /* Fluid Spacing */
    --fluid-section-y: clamp(4rem, 8vw, 12rem);
    --fluid-section-x: clamp(1rem, 3vw, 4rem);
    --fluid-gap-lg: clamp(2rem, 4vw, 6rem);
    --fluid-gap-md: clamp(1.5rem, 3vw, 4rem);
    --fluid-gap-sm: clamp(1rem, 2vw, 2rem);

    /* Fluid Component Sizes */
    --fluid-card-padding: clamp(1.5rem, 3vw, 3rem);
    --fluid-btn-padding-x: clamp(1.5rem, 2vw, 3rem);
    --fluid-btn-padding-y: clamp(0.75rem, 1.2vw, 1.5rem);
    --fluid-icon-size: clamp(2.5rem, 4vw, 5rem);
}

/* Base Typography */
html {
    font-size: 100%;
    /* Respects user zoom preferences */
}

body {
    font-family: 'Inter', sans-serif;
    font-size: var(--fluid-base);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.1;
}

h1 {
    font-size: var(--fluid-h1);
}

h2 {
    font-size: var(--fluid-h2);
}

h3 {
    font-size: var(--fluid-h3);
}

h4 {
    font-size: var(--fluid-h4);
}

h5 {
    font-size: var(--fluid-h5);
}

h6 {
    font-size: var(--fluid-h6);
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Fluid Text Utilities */
.text-fluid-xs {
    font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
}

.text-fluid-sm {
    font-size: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
}

.text-fluid-base {
    font-size: var(--fluid-base);
}

.text-fluid-lg {
    font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
}

.text-fluid-xl {
    font-size: clamp(1.25rem, 1.1rem + 0.75vw, 2rem);
}

.text-fluid-2xl {
    font-size: clamp(1.5rem, 1.25rem + 1vw, 2.5rem);
}

.text-fluid-3xl {
    font-size: clamp(1.875rem, 1.5rem + 1.5vw, 3.5rem);
}

.text-fluid-4xl {
    font-size: clamp(2.25rem, 2rem + 2vw, 5rem);
}

.text-fluid-5xl {
    font-size: clamp(3rem, 2.5rem + 3vw, 7rem);
}

.text-fluid-hero {
    font-size: var(--fluid-h1);
}

/* Fluid Spacing Utilities */
.py-fluid {
    padding-top: var(--fluid-section-y);
    padding-bottom: var(--fluid-section-y);
}

.px-fluid {
    padding-left: var(--fluid-section-x);
    padding-right: var(--fluid-section-x);
}

.p-fluid {
    padding: var(--fluid-card-padding);
}

.gap-fluid {
    gap: var(--fluid-gap-md);
}

.gap-fluid-lg {
    gap: var(--fluid-gap-lg);
}

.gap-fluid-sm {
    gap: var(--fluid-gap-sm);
}

.mb-fluid {
    margin-bottom: var(--fluid-gap-md);
}

.mt-fluid {
    margin-top: var(--fluid-gap-md);
}

/* Fluid Button */
.btn-fluid {
    padding: var(--fluid-btn-padding-y) var(--fluid-btn-padding-x);
    font-size: clamp(0.9rem, 0.8rem + 0.4vw, 1.25rem);
}

/* Fluid Icon Container */
.icon-fluid {
    width: var(--fluid-icon-size);
    height: var(--fluid-icon-size);
}

/* Max Width for Readability */
.max-w-readable {
    max-width: 65ch;
}

/* ===================================
   FULL PROPORTIONAL SCALING (Desktop)
   Everything scales with viewport
   =================================== */

@media (min-width: 768px) {

    /* All sections use fluid padding */
    section,
    header,
    footer {
        padding-top: clamp(4rem, 8vw, 14rem) !important;
        padding-bottom: clamp(4rem, 8vw, 14rem) !important;
    }

    /* All H2 section titles - fluid */
    section h2,
    div h2 {
        font-size: clamp(2.5rem, 5vw, 6rem) !important;
        margin-bottom: clamp(1rem, 2vw, 3rem) !important;
    }

    /* H3 card titles */
    h3 {
        font-size: clamp(1.5rem, 2.5vw, 3rem) !important;
    }

    /* Body text scales - ONLY hero description */
    header>div>p {
        font-size: clamp(1rem, 1.2vw, 1.75rem) !important;
    }

    /* Cards use fluid padding - EXCLUDE small pills/badges */
    .glass-card:not([class*="rounded-full"]):not([class*="px-5"]):not([class*="px-4"]),
    [class*="rounded-3xl"]:not([class*="aspect-"]),
    [class*="rounded-[2rem]"],
    [class*="rounded-[3rem]"] {
        padding: clamp(1.5rem, 3vw, 4rem) !important;
    }

    /* Keep pills/badges compact - override any fluid padding */
    [class*="rounded-full"][class*="px-"] {
        padding: 0.5rem 1.25rem !important;
    }

    /* Grids use fluid gaps - ONLY service/industry grids */
    section#services .grid,
    section .grid[class*="gap-6"],
    section .grid[class*="gap-8"] {
        gap: clamp(1rem, 2vw, 3rem) !important;
    }

    /* Buttons scale - ONLY primary CTA buttons */
    header button[class*="px-8"],
    section button[class*="px-8"][class*="py-4"] {
        padding: clamp(0.75rem, 1.2vw, 1.5rem) clamp(1.5rem, 2.5vw, 3rem) !important;
        font-size: clamp(0.9rem, 1.1vw, 1.35rem) !important;
    }

    /* Icons scale - ONLY in cards */
    .glass-card .material-symbols-outlined {
        font-size: clamp(1.5rem, 2vw, 3rem) !important;
    }

    /* Large stat numbers */
    [class*="text-5xl"],
    [class*="text-6xl"],
    [class*="text-7xl"],
    [class*="text-8xl"] {
        font-size: clamp(3rem, 6vw, 10rem) !important;
    }

    /* Industry cards - fluid aspect */
    [class*="aspect-[4/5]"] {
        min-height: clamp(300px, 40vw, 600px);
    }

    /* Process step circles */
    [class*="w-24"][class*="h-24"] {
        width: clamp(4rem, 6vw, 10rem) !important;
        height: clamp(4rem, 6vw, 10rem) !important;
    }

    /* Navbar height scales */
    nav>div>div {
        height: clamp(4rem, 5vw, 7rem) !important;
    }

    /* Logo text scales */
    nav span[class*="text-xl"] {
        font-size: clamp(1.25rem, 2vw, 2.5rem) !important;
    }

    /* Nav links scale */
    nav a {
        font-size: clamp(0.875rem, 1.2vw, 1.5rem) !important;
    }

    /* Marquee images scale */
    .marquee-container>div {
        width: clamp(280px, 25vw, 500px) !important;
        height: clamp(180px, 18vw, 350px) !important;
    }

    /* Footer heading */
    footer h2 {
        font-size: clamp(3rem, 6vw, 8rem) !important;
    }
}

/* Utility: Hide Scrollbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

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

/* ===================================
   Glassmorphism
   =================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass-card {
    background: rgba(22, 32, 50, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===================================
   AI Orb Glow
   =================================== */
.ai-orb-glow {
    box-shadow: 0 0 60px 10px rgba(168, 85, 247, 0.4);
}

/* ===================================
   Button Glow Effect
   =================================== */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 20px 5px rgba(19, 127, 236, 0.5),
        0 0 40px 10px rgba(19, 127, 236, 0.3);
}

.btn-glow:hover::before {
    opacity: 1;
    animation: btn-pulse 2s ease-in-out infinite;
}

@keyframes btn-pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* ===================================
   Shrinking Navbar on Scroll
   =================================== */
nav {
    transition: all 0.3s ease;
}

nav.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

nav.navbar-scrolled>div>div {
    height: 4rem !important;
}

/* Logo shrinks on scroll */
nav img {
    transition: height 0.3s ease;
}

nav.navbar-scrolled img {
    height: 2.5rem !important;
}

.dark nav.navbar-scrolled {
    background: rgba(11, 17, 32, 0.95) !important;
}

/* ===================================
   Mobile Navigation Drawer
   =================================== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    padding: 2rem;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.dark .mobile-nav {
    background: rgba(22, 32, 50, 0.98);
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99;
}

.mobile-nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   Continuous Marquee Animation
   =================================== */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-container {
    display: flex;
    animation: marquee 30s linear infinite;
    width: fit-content;
}

.marquee-container:hover {
    animation-play-state: paused;
}

/* ===================================
   AOS Animation Delay Utilities
   =================================== */
[data-aos-delay="100"] {
    transition-delay: 100ms;
}

[data-aos-delay="200"] {
    transition-delay: 200ms;
}

[data-aos-delay="300"] {
    transition-delay: 300ms;
}

[data-aos-delay="400"] {
    transition-delay: 400ms;
}

/* ===================================
   CSS Animation Delay Utilities
   =================================== */
.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Honeypot Field (Spam Protection) */
.contact-internal-field {
    position: absolute;
    left: -5000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ===================================
   Keyframes (Moved from Inline)
   =================================== */
@keyframes grow {
    to {
        transform: scaleX(1);
    }
}

/* ===================================
   #13 — Button Press Micro-interaction
   Tactile "press" feel on click
   =================================== */
button:active,
a[class*="btn"]:active,
.btn-glow:active {
    transform: scale(0.97) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}

/* ===================================
   #5 — Gradient Border Glow on Hover
   Animated border sweep on glass cards
   =================================== */
.glass-card {
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--glow-angle, 0deg),
            transparent 40%,
            #137fec 50%,
            #06b6d4 60%,
            transparent 70%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.glass-card:hover::before {
    opacity: 1;
    animation: glow-rotate 3s linear infinite;
}

@keyframes glow-rotate {
    to {
        --glow-angle: 360deg;
    }
}

/* Register the custom property for animation */
@property --glow-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ===================================
   #11 — Text Gradient Shimmer
   Shine effect on gradient text
   =================================== */
.text-shimmer {
    background-size: 200% 100%;
    animation: text-shimmer 4s ease-in-out infinite;
}

@keyframes text-shimmer {

    0%,
    100% {
        background-position: 100% 50%;
    }

    50% {
        background-position: 0% 50%;
    }
}

/* ===================================
   #9 — Scroll Progress Indicator
   Thin gradient bar at top of page
   =================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
    transform-origin: left;
    transform: scaleX(0);
    background: linear-gradient(90deg, #137fec, #a855f7, #06b6d4);
    transition: transform 0.1s linear;
}

/* ===================================
   Accessibility: Reduced Motion
   =================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .scroll-progress {
        display: none;
    }

    .glass-card::before {
        display: none;
    }

    .marquee-container {
        animation: none !important;
    }
}