/* Modern Gradient Background - Dark & Sophisticated */
/*
 * Prevent stretched images:
 * Many images in the HTML include width/height attributes for CLS.
 * If CSS later sets only width (e.g. Bootstrap `w-100`), the attribute height can remain
 * and distort the aspect ratio unless we explicitly force `height: auto`.
 */
img {
    max-width: 100%;
    height: auto;
}

/* Page Load Splash */
#page-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 25%, #24243e 50%, #0f2027 75%, #203a43 100%);
    opacity: 1;
    transition: opacity 0.5s ease;
}

#page-splash.splash-out {
    opacity: 0;
    pointer-events: none;
}

.splash-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
}

.splash-logo {
    width: min(180px, 38vw);
    height: auto;
    opacity: 0;
    transform: scale(0.8);
    animation: splash-logo-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

@keyframes splash-logo-in {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

body.splash-active .navbar,
body.splash-active #main-content,
body.splash-active .footer {
    opacity: 0;
}

body.splash-active .navbar,
body.splash-active #main-content,
body.splash-active .footer,
body.splash-done .navbar,
body.splash-done #main-content,
body.splash-done .footer {
    transition: opacity 0.5s ease;
}

body.splash-done .navbar,
body.splash-done #main-content,
body.splash-done .footer {
    opacity: 1;
}

body {
    /* Dark elegant gradient background matching TritonApps branding */
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 25%, #24243e 50%, #0f2027 75%, #203a43 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    background-attachment: fixed;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* Add subtle animated overlay for depth with softly drifting light orbs */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Premium noise texture overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.bg-orb--1 {
    top: 4%;
    left: 8%;
    width: 34rem;
    height: 34rem;
    background: rgba(79, 70, 229, 0.12);
    animation: orb-drift-1 38s ease-in-out infinite alternate;
}

.bg-orb--2 {
    top: 48%;
    left: 66%;
    width: 28rem;
    height: 28rem;
    background: rgba(20, 184, 166, 0.10);
    animation: orb-drift-2 32s ease-in-out infinite alternate;
}

.bg-orb--3 {
    top: 72%;
    left: 14%;
    width: 26rem;
    height: 26rem;
    background: rgba(59, 130, 246, 0.12);
    animation: orb-drift-3 40s ease-in-out infinite alternate;
}

.bg-orb--4 {
    top: 16%;
    left: 72%;
    width: 22rem;
    height: 22rem;
    background: rgba(124, 58, 237, 0.10);
    animation: orb-drift-4 26s ease-in-out infinite alternate;
}

@keyframes orb-drift-1 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(5rem, 7rem, 0) scale(1.14); }
}

@keyframes orb-drift-2 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-6rem, -5rem, 0) scale(0.92); }
}

@keyframes orb-drift-3 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(4rem, -6rem, 0) scale(1.08); }
}

@keyframes orb-drift-4 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-4.5rem, 6rem, 0) scale(0.88); }
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 10001;
    background: linear-gradient(90deg, #718096 0%, #a0aec0 50%, #cbd5e0 100%);
    box-shadow: 0 0 8px rgba(160, 174, 192, 0.6);
    transition: width 0.1s linear;
    pointer-events: none;
}

/* Scroll-to-top Button */
#scroll-top-btn {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.3s ease,
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scroll-top-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow:
        0 8px 30px rgba(160, 174, 192, 0.3),
        0 0 20px rgba(160, 174, 192, 0.15);
    transform: translateY(-3px);
}

#scroll-top-btn:focus-visible {
    outline: 3px solid #4a90e2;
    outline-offset: 2px;
}

/* Gradient animation */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmer-text {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Ensure content is above the overlay */
nav, header, main, footer, .container {
    position: relative;
    z-index: 1;
}

/* Modern Glass Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px 0;
}

/* Navbar scrolled state — added by JS when user scrolls > 50px */
.navbar-scrolled {
    padding: 12px 0;
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.15) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.navbar-scrolled .navbar-brand img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-brand img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Custom animated hamburger */
.custom-toggler {
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition:
        background 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-toggler:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.custom-toggler:focus-visible {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.4);
    outline: none;
}

.custom-toggler .toggler-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.custom-toggler[aria-expanded="true"] .toggler-bar--top {
    transform: translateY(8px) rotate(45deg);
}

.custom-toggler[aria-expanded="true"] .toggler-bar--middle {
    opacity: 0;
    transform: scaleX(0);
}

.custom-toggler[aria-expanded="true"] .toggler-bar--bottom {
    transform: translateY(-8px) rotate(-45deg);
}


.nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
    margin: 0 15px;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, #a0aec0, #cbd5e0);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: #cbd5e0 !important;
    text-shadow: 0 0 20px rgba(203, 213, 224, 0.6);
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Hero Section - Modern & Engaging */
.hero-section {
    padding: 40px 0 24px;
}

/* Tighter horizontal gap between headline column and logo on large screens */
@media (min-width: 992px) {
    .hero-section > .container > .row {
        --bs-gutter-x: 0.15rem;
    }
}

.hero-section h1.hero-headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
    margin-bottom: 1rem !important;
    line-height: 1.2;
}

.hero-section .lead.hero-tagline {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.25rem !important;
}

.hero-headline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em;
}

.hero-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.hero-word.revealed {
    opacity: 1;
    transform: translateY(0);
}

.hero-tagline {
    min-height: 1.75em;
}

.typewriter-cursor {
    display: inline-block;
    margin-left: 2px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    animation: blink-cursor 0.8s step-end infinite;
}

@keyframes blink-cursor {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-ctas {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-ctas.revealed {
    opacity: 1;
    transform: translateY(0);
}

.hero-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: min(480px, 52vh);
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

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

/* Modern Section Styling */
.section-title {
    font-weight: 800;
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: 20px;
    background: linear-gradient(
        90deg,
        #c8d6e5 0%,
        #ffffff 20%,
        #e0e7ff 40%,
        #a0b4c8 60%,
        #ffffff 80%,
        #c8d6e5 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 5s linear infinite;
}

.section-divider {
    height: 4px;
    width: 80px;
    background: linear-gradient(90deg, #718096 0%, #ffffff 50%, #718096 100%);
    background-size: 200% auto;
    animation: shimmer-text 3s linear infinite;
    margin: 0 auto 40px auto;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(160, 174, 192, 0.4);
}

.lead {
    font-size: 1.15rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}


/* About section */
.about-body-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.about-stat-tile {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

.about-stat-tile:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
}

.about-stat-number {
    display: block;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a0aec0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.about-stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-value-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.about-value-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.about-value-card-text {
    color: #fff;
    font-size: 0.9rem;
    margin: 0;
}

/* Premium Glass Cards */
.app-card, .contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    overflow: hidden;
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s ease-out;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}

.app-card::before, .contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.app-card:hover::before, .contact-card:hover::before {
    left: 100%;
}

.app-card:hover, .contact-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 30px rgba(160, 174, 192, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.app-card.tilt-enabled:hover, .contact-card.tilt-enabled:hover,
.app-card.is-tilting, .contact-card.is-tilting {
    transform: none;
}

.card-tilt-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    transition: background 0.12s ease-out;
}

.app-card .card-body, .contact-card .card-body {
    padding: 2.5rem;
}

.app-card h3 {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #fff;
}

.app-card .card-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.6;
}


.app-card-icon {
    border-radius: 18px;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(249, 194, 34, 0.3);
}


/* Emoji-based app icon for cards that do not have a dedicated icon asset */
.app-card-emoji-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.2) 0%, rgba(100, 200, 255, 0.15) 100%);
    border: 1px solid rgba(77, 171, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 8px 24px rgba(77, 171, 247, 0.2);
}

.gallery-carousel {
    max-width: 800px;
}

.recaptcha-disclaimer {
    font-size: 0.875rem;
}
/* Modern Buttons */
.btn {
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(45, 55, 72, 0.5);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(160, 174, 192, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4a5568 0%, #718096 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(113, 128, 150, 0.6);
    border-color: rgba(160, 174, 192, 0.4);
}

.btn-outline-primary {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(160, 174, 192, 0.5);
    backdrop-filter: blur(10px);
}

.btn-outline-primary:hover {
    background: rgba(160, 174, 192, 0.15);
    border-color: rgba(160, 174, 192, 0.8);
    color: #cbd5e0;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(160, 174, 192, 0.2);
}

.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(160, 174, 192, 0.3);
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.hero-section .btn,
#apps .btn {
    will-change: transform;
}

/* Modern Badge */
.badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.bg-info {
    background: linear-gradient(135deg, #4a5568 0%, #718096 100%) !important;
    box-shadow: 0 4px 15px rgba(113, 128, 150, 0.4);
}

/* Premium Form Styling */
.form-control {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(160, 174, 192, 0.5);
    box-shadow:
        0 0 0 4px rgba(160, 174, 192, 0.1),
        0 8px 24px rgba(160, 174, 192, 0.2);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-label {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

/* ── Floating Label Form ─────────────────────────────────────── */
.floating-label-group {
    position: relative;
}

.floating-input {
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}

textarea.floating-input {
    min-height: 9.5rem;
    resize: vertical;
}

.floating-label {
    position: absolute;
    top: 50%;
    left: 1.25rem;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition:
        top 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        font-size 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.25s ease,
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

textarea.floating-input ~ .floating-label {
    top: 1.25rem;
    transform: none;
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
    top: 0.45rem;
    font-size: 0.72rem;
    color: rgba(160, 174, 192, 0.9);
    transform: none;
}

@keyframes input-focus-shimmer {
    0% {
        box-shadow:
            0 0 0 4px rgba(160, 174, 192, 0.1),
            0 8px 24px rgba(160, 174, 192, 0.2);
    }
    50% {
        box-shadow:
            0 0 0 4px rgba(160, 174, 192, 0.25),
            0 8px 24px rgba(160, 174, 192, 0.35);
    }
    100% {
        box-shadow:
            0 0 0 4px rgba(160, 174, 192, 0.1),
            0 8px 24px rgba(160, 174, 192, 0.2);
    }
}

.floating-input:focus {
    animation: input-focus-shimmer 0.8s ease-out 1;
}

.contact-form-meta {
    gap: 1rem;
}

.contact-form-meta .invalid-feedback {
    margin-top: 0;
}

.char-counter {
    margin-left: auto;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.char-counter.char-warn {
    color: #f59e0b;
}

.char-counter.char-danger {
    color: #ef4444;
}

/* Text muted in contact card */
.contact-card .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.875rem;
}

.contact-card .text-muted a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.contact-card .text-muted a:hover {
    color: #cbd5e0 !important;
}

/* Modern Carousel */
.carousel {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.carousel-inner {
    border-radius: 24px;
}

.carousel-item img {
    border-radius: 24px;
    transition: transform 0.3s ease;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 10px 20px;
    bottom: 30px;
}

.carousel-caption h5 {
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin: 0;
    padding: 0;
    background: transparent !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: #a0aec0;
    border-color: #a0aec0;
    transform: scale(1.2);
}

/* Premium Footer */
.footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 40px 0;
    margin-top: 80px;
}

.footer-paragraph {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a0aec0, #cbd5e0);
    transition: width 0.3s ease;
}

.footer a:hover {
    color: #cbd5e0;
}

.footer a:hover::after {
    width: 100%;
}

.footer img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.footer img:hover {
    transform: scale(1.1) rotate(5deg);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social-link {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-social-link::after {
    display: none;
}

.footer-social-link:hover {
    color: #cbd5e0;
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.footer-social-note {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Alert Styling */
.alert {
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.alert:not(.d-none) {
    opacity: 1;
    transform: translateY(0);
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Form Validation */
.form-control.is-invalid {
    border-color: rgba(239, 68, 68, 0.5);
    background-image: none;
}

.form-control.is-valid {
    border-color: rgba(34, 197, 94, 0.5);
    background-image: none;
}

.invalid-feedback {
    color: #fca5a5;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
    font-weight: 500;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback,
.invalid-feedback.is-visible {
    display: block;
}

/* Button Loading State */
#submit-button {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

#submit-button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.24) 45%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
    transform: translateX(-130%);
    opacity: 0;
    pointer-events: none;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

.btn-loading::after {
    opacity: 1;
    animation: button-loading-sheen 1.2s linear infinite;
}

@keyframes button-loading-sheen {
    from {
        transform: translateX(-130%);
    }
    to {
        transform: translateX(130%);
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .navbar-nav {
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(20px);
        border-radius: 16px;
        padding: 1rem;
        margin-top: 1rem;
    }

    .nav-link {
        margin: 8px 0;
    }

    .hero-section {
        text-align: center;
        padding: 36px 0 20px;
    }

    .hero-logo {
        margin-top: 16px;
    }

    .hero-logo img {
        max-height: min(400px, 52vh);
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Smooth scrolling enhancement */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: rgba(160, 174, 192, 0.3);
    color: white;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4a5568 0%, #718096 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #718096 0%, #a0aec0 100%);
}

/* Accessibility: focus styles and skip link */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #4a90e2;
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.5);
}

.skip-to-main {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 0.75rem 1rem;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}

.skip-to-main:focus {
    left: 1rem;
    top: 1rem;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    #page-splash {
        display: none !important;
    }

    body.splash-active .navbar,
    body.splash-active #main-content,
    body.splash-active .footer {
        opacity: 1;
        transition: none;
    }


    /* Disable gradient animation */
    body {
        animation: none;
        background-position: 0% 50%;
    }

    /* Disable all transitions and animations */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* Disable AOS animations - show elements immediately */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-word {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .custom-toggler,
    .custom-toggler .toggler-bar {
        transition: none;
    }

    .typewriter-cursor {
        animation: none;
    }

    .hero-ctas {
        opacity: 1;
        transform: none;
        transition: none;
    }

    /* Disable floating animation */
    .hero-logo img {
        animation: none;
    }

    .bg-orb {
        animation: none;
    }

    .floating-label,
    .char-counter,
    .form-control,
    .floating-input:focus {
        transition: none !important;
        animation: none !important;
    }
}

/* ===========================
   Error Pages (404, 403, 500)
   =========================== */
.error-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: clamp(5rem, 15vw, 8rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-code--403 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-code--500 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 1rem 0;
    font-weight: 700;
}

.error-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    max-width: 400px;
    font-size: 1.1rem;
}


/* Custom cursor */
@media (pointer: fine) {
    body.custom-cursor-active,
    body.custom-cursor-active * {
        cursor: none !important;
    }
}

#cursor-dot,
#cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

#cursor-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    transition: width 0.2s ease, height 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    mix-blend-mode: difference;
}

#cursor-ring {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(160, 174, 192, 0.6);
    border-radius: 50%;
    backdrop-filter: blur(1px);
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease,
                background 0.3s ease,
                box-shadow 0.3s ease,
                opacity 0.2s ease,
                transform 0.1s ease;
}

#cursor-ring::after {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 180, 255, 0.18) 0%, rgba(100, 180, 255, 0.08) 35%, rgba(100, 180, 255, 0) 72%);
    opacity: 0.45;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: -1;
}

#cursor-ring.hovering {
    width: 52px;
    height: 52px;
    border-color: rgba(100, 180, 255, 0.8);
    background: rgba(100, 180, 255, 0.06);
    box-shadow: 0 0 20px rgba(100, 180, 255, 0.3);
}

#cursor-ring.hovering::after {
    opacity: 0.75;
    transform: scale(1.12);
}

#cursor-dot.hovering {
    width: 4px;
    height: 4px;
    background: rgba(100, 180, 255, 0.9);
}

#cursor-ring.clicking {
    transform: translate(-50%, -50%) scale(0.85);
}

@media (pointer: coarse), (hover: none), (prefers-reduced-motion: reduce) {
    #cursor-dot,
    #cursor-ring {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #scroll-progress {
        transition: none;
    }
}

@media (max-width: 576px) {
    #scroll-top-btn {
        right: 1rem;
        bottom: 1rem;
    }
}
