@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Core Colors */
    --primary-navy: #0A192F;
    --primary-blue: #0A66C2;
    --primary-blue-rgb: 37, 99, 235;
    /* Keeping original RGB for existing uses, though it might not match new primary-blue */
    --secondary-blue: #E1E8EE;
    --highlight-blue: #1E88E5;

    /* Accents */
    --accent-teal: #00B4D8;
    --accent-orange: #D97706;
    --accent-red: #DC2626;

    /* ESS Infinity Logo Colors */
    --ess-red: #E63946;
    --primary-blue: #1e3a8a;
    --accent-blue: #3b82f6;
    --dark-blue: #0f172a;
    --off-white: rgba(248, 250, 252, 0.7);
    /* Slightly silver/transparent */
    --silver-light: #e2e8f0;
    /* New Premium Silver */
    --silver-bg: rgba(226, 232, 240, 0.6);
    /* Translucent Silver */
    --cream: #FFFDF9;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-400: #94a3b8;
    --gray-800: #1e293b;
    --text-main: #0f172a;
    --text-muted: #475569;

    /* ESS Logo Colors */
    --ess-red: rgba(220, 38, 38, 0.6);
    --ess-yellow: rgba(234, 179, 8, 0.5);
    --ess-blue: rgba(37, 99, 235, 0.6);
    --ess-green: rgba(22, 163, 74, 0.5);

    /* Silver Theme Backgrounds */
    --bg-main: transparent;
    /* Relying on underlying silver/waves */
    --surface-color: rgba(255, 255, 255, 0.6);
    /* Increased transparency for glass */

    /* Wet Glass Variables */
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.9), inset 0 -1px 2px rgba(226, 232, 240, 0.3);

    /* Typography */
    --font-main: 'Outfit', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --container-max: 1280px;
    --section-padding: 120px 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--gray-800);
    line-height: 1.65;
    overflow-x: hidden;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1,
h2,
h3 {
    color: var(--primary-navy);
}

.subheadline {
    color: var(--gray-400);
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* Layout */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: var(--section-padding);
}

/* Glassmorphism Components */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.3) 100%);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07), var(--glass-highlight);
    border-radius: 24px;
    padding: 2.5rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.12), var(--glass-highlight);
    border-color: rgba(255, 255, 255, 0.9);
}

.hero {
    position: relative;
    padding-top: 140px;
    padding-bottom: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    z-index: 1;
    /* Keep text above background wave */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 10px 20px rgba(var(--primary-blue-rgb), 0.3);
}

.btn-primary:hover {
    background: #2563EB;
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(var(--primary-blue-rgb), 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-navy);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.portal-logo {
    display: flex;
    align-items: center;
}

.portal-logo img {
    height: 56px;
    width: auto;
    object-fit: contain;
}


/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(var(--primary-blue-rgb), 0.08) 0%, transparent 70%);
    z-index: -1;
    animation: glow 4s infinite;
}

/* Feature Sections */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-grid.reverse {
    direction: rtl;
}

.feature-grid.reverse>* {
    direction: ltr;
}

.feature-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.feature-list li::before {
    content: '→';
    color: var(--primary-blue);
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(var(--primary-blue-rgb), 0.1);
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Dashboard Visuals */
.ui-mockup {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.pulse {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-teal);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-teal);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Testimonials */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.testimonial-card {
    padding: 3rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.4s ease;
}

.testimonial-card.featured {
    border: 2px solid var(--primary-blue);
    background: rgba(var(--primary-blue-rgb), 0.02);
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(var(--primary-blue-rgb), 0.1);
}

.testimonial-text {
    font-style: italic;
    color: var(--gray-800);
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    position: absolute;
    top: -2rem;
    left: -1rem;
    font-size: 5rem;
    color: rgba(var(--primary-blue-rgb), 0.1);
    font-family: serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info h4 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.author-info p {
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* Package Cards Grid */
.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.package-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(10, 37, 64, 0.08);
    border-color: rgba(var(--primary-blue-rgb), 0.15);
}

.package-image {
    height: 200px;
    width: 100%;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--gray-200);
}

.package-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.package-card:hover .package-image img {
    transform: scale(1.05);
}

.package-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.package-content h3 {
    font-size: 1.5rem;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.package-content .price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--success-green);
    margin-bottom: 0.5rem;
}

.package-content .price-subtext {
    font-size: 0.95rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.feature-list.small {
    margin-top: 0;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.feature-list.small li {
    font-size: 1rem;
    color: var(--gray-800);
    margin-bottom: 1rem;
    gap: 0.75rem;
    font-weight: 500;
}

.feature-list.small li svg {
    width: 20px;
    height: 20px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.w-100 {
    width: 100%;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
    margin: 6rem 0;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--gray-400);
}

/* Closing CTA */
.closing-cta {
    background: linear-gradient(135deg, var(--primary-navy) 0%, #000 100%);
    border-radius: 40px;
    padding: 6rem 2rem;
    text-align: center;
    margin: 8rem 0;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

/* Tech Stack Section */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    opacity: 0.6;
    filter: grayscale(1);
    transition: opacity 0.3s, filter 0.3s;
    margin-top: 3rem;
}

.tech-grid:hover {
    opacity: 1;
    filter: grayscale(0);
}

/* Footer */
footer {
    background: var(--white);
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-links h4 {
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 1rem;
}

.footer-links ul li a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* Responsiveness */
@media (max-width: 968px) {

    .feature-grid,
    .feature-grid.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr;
    }

    h1 {
        font-size: 2.5rem !important;
    }
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Refinement */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07), var(--glass-highlight);
    border-radius: 24px;
    padding: 2.5rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: 0.6s ease;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.12), var(--glass-highlight);
    border-color: rgba(255, 255, 255, 0.9);
}

/* Star Effect */
.star-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    /* Above blobs, below content */
}

.star {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: blinkStar var(--blink-duration, 3s) infinite ease-in-out;
    box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.8);
}

@keyframes blinkStar {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Portfolio Section Styles */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 10, 24, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* Infinity Wave Background */
.infinity-wave-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--cream);
    opacity: 0.6;
    /* Subtle intensity */
}

.wave-blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.7;
    animation: waveFlow 25s infinite alternate ease-in-out;
    border-radius: 50%;
}

.blob-red {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--ess-red) 0%, transparent 60%);
    animation-delay: 0s;
}

.blob-yellow {
    top: 40%;
    right: -20%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, var(--ess-yellow) 0%, transparent 60%);
    animation-delay: -5s;
    animation-direction: alternate-reverse;
}

.blob-blue {
    bottom: -20%;
    left: 10%;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, var(--ess-blue) 0%, transparent 60%);
    animation-delay: -10s;
}

.blob-green {
    top: 20%;
    left: 30%;
    width: 65vw;
    height: 65vw;
    background: radial-gradient(circle, var(--ess-green) 0%, transparent 60%);
    animation-delay: -15s;
    animation-direction: alternate-reverse;
}

@keyframes waveFlow {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(15vw, 10vh) scale(1.1) rotate(45deg);
    }

    66% {
        transform: translate(-10vw, 20vh) scale(0.9) rotate(90deg);
    }

    100% {
        transform: translate(5vw, -15vh) scale(1.2) rotate(135deg);
    }
}

.portfolio-overlay p {
    color: var(--gray-300);
    font-size: 0.9rem;
}

/* New Section Spacing */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 5rem;
}

.section-header h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

/* Enhanced Animations */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes rainbowFill {
    0% {
        fill: rgba(255, 59, 48, 0.6);
    }

    15% {
        fill: rgba(255, 149, 0, 0.6);
    }

    30% {
        fill: rgba(255, 204, 0, 0.6);
    }

    45% {
        fill: rgba(52, 199, 89, 0.6);
    }

    60% {
        fill: rgba(0, 122, 255, 0.6);
    }

    75% {
        fill: rgba(88, 86, 214, 0.6);
    }

    100% {
        fill: rgba(255, 59, 48, 0.6);
    }
}

.loading-shimmer {
    background: linear-gradient(90deg, var(--glass-bg) 25%, rgba(255, 255, 255, 0.05) 50%, var(--glass-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Float variations */
.float-slow {
    animation: float 8s ease-in-out infinite;
}

.float-fast {
    animation: float 4s ease-in-out infinite;
}

/* Comparison table hover */
tr:hover td {
    background: rgba(var(--primary-blue-rgb), 0.05);
}

/* Gradient text utility improvement */
.title-xl {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
}

/* =========================================================================
   Mobile Optimization (Smartphones and Tablets)
========================================================================= */
@media (max-width: 900px) {
    .package-grid {
        grid-template-columns: 1fr;
    }

    .trust-indicators {
        flex-direction: column;
        gap: 1rem !important;
        align-items: center;
    }
}

@media (max-width: 768px) {

    /* Base Resets */
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 5%;
    }

    /* Boost Background & Stars Visibility on Mobile */
    .infinity-wave-bg {
        opacity: 0.9 !important;
        /* Brighter wave background on mobile */
    }

    .wave-blob {
        opacity: 0.9 !important;
        /* Brighter blobs */
        filter: blur(50px) !important;
        /* Less blur so color pops more */
        transform: scale(1.5);
        /* Make them larger to cover the screen better */
    }

    .star-overlay {
        opacity: 1 !important;
        /* Ensure stars are fully visible */
    }

    .star {
        transform: scale(1.5);
        /* Make stars 50% larger on mobile */
    }

    /* Typography Adjustments */
    .hero-content h1 {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    .hero-content h2 {
        font-size: 1.15rem !important;
        line-height: 1.3;
        margin-bottom: 2rem !important;
    }

    .section-header h2 {
        font-size: 2.25rem;
    }

    .subheadline {
        font-size: 1rem;
        padding: 0;
    }

    /* Hero Section Fixes */
    .hero-content {
        margin-top: 2rem !important;
    }

    .cta-group {
        flex-direction: column;
        gap: 1rem !important;
        width: 100%;
        padding: 0;
    }

    .cta-group .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Blurred Infinity Logo Fix */
    .hero-content>div[style*="filter: blur"] {
        width: 150vw !important;
        height: 300px !important;
        top: 30% !important;
        opacity: 0.15 !important;
    }

    /* Responsive Grids & Layouts */
    .services-grid,
    .value-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Package Cards Fixes */
    .package-card {
        margin: 0;
        flex-direction: column;
        height: auto;
    }

    .package-image {
        height: 250px;
        /* Reduced image height for mobile */
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .package-content {
        padding: 1.5rem;
    }

    /* Navigation */
    nav {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .nav-links {
        display: none;
        /* Hide nav links on mobile for cleaner look */
    }

    nav .btn-primary {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* Footer adjustments */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .social-links {
        justify-content: center;
    }
}