/* OTF Website - Shared Styles */

/* Base Styles */
body {
    font-family: 'Space Grotesk', sans-serif;
}

/* Text Selection */
::selection {
    background-color: rgb(11, 42, 68);
    color: white;
}

::-moz-selection {
    background-color: rgb(11, 42, 68);
    color: white;
}

/* Navbar */
.navbar-header {
    transition:
        top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.3s ease-out,
        border-radius 0.3s ease-out,
        background-color 0.3s ease-out,
        backdrop-filter 0.3s ease-out,
        box-shadow 0.3s ease-out,
        transform 0.3s ease-out;
}

/* Expanded state (at top) */
.navbar-expanded {
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Compact state (scrolled) */
.navbar-scrolled {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: rgba(11, 42, 68, 0.9);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -2px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Hero Overlay */
.hero-overlay {
    background-color: rgba(11, 42, 68, 0.85);
}

/* Industrial Grid Pattern */
.industrial-grid {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Timeline (History Page) */
.timeline-line {
    background: linear-gradient(to bottom, transparent, #1a4a6e, #1a4a6e, transparent);
}

/* Service Cards */
.service-card:hover .service-icon {
    transform: scale(1.1);
    color: white;
}

/* Project Cards */
.project-card:hover .project-overlay {
    opacity: 1;
}

/* Glass Card (Contact Page) */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
}

/* ===== GLOWING CARD EFFECT ===== */
.glow-card {
    --glow-angle: 0;
    --glow-opacity: 0;
    --border-width: 1.5px;
    position: relative;
    border-radius: 1.25rem;
    padding: var(--border-width);
    background: transparent;
    transition: transform 0.3s ease;
}

.glow-card:hover {
    transform: translateY(-4px);
}

/* Glowing border - masked to stroke only */
.glow-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(from calc(var(--glow-angle) * 1deg),
            rgba(26, 74, 110, 0.6) 0deg,
            rgba(61, 139, 189, 0.7) 90deg,
            rgba(100, 181, 217, 0.8) 180deg,
            rgba(61, 139, 189, 0.7) 270deg,
            rgba(26, 74, 110, 0.6) 360deg);
    opacity: calc(var(--glow-opacity) * 0.6);
    transition: opacity 0.3s ease;
    /* Mask to show only the border */
    -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;
    padding: var(--border-width);
    pointer-events: none;
}

/* Default border when not glowing */
.glow-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
    opacity: calc(1 - var(--glow-opacity));
    transition: opacity 0.3s ease;
}

/* Card inner content wrapper */
.glow-card-inner {
    background: linear-gradient(135deg, rgba(11, 42, 68, 0.95) 0%, rgba(8, 27, 42, 0.98) 100%);
    border-radius: calc(1.25rem - var(--border-width));
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
}

.glow-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== MODERN FOOTER ===== */
.footer-modern {
    position: relative;
    max-width: 80rem;
    margin: 0 auto;
    border-radius: 3rem 3rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(35% 128px at 50% 0%, rgba(255, 255, 255, 0.08), transparent),
        linear-gradient(180deg, rgba(11, 42, 68, 1) 0%, rgba(8, 27, 42, 1) 100%);
    overflow: hidden;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 33%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    filter: blur(1px);
}

.footer-section {
    opacity: 0;
    transform: translateY(-8px);
    filter: blur(4px);
    transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}

.footer-section.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.footer-link {
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-link:hover {
    color: white;
    transform: translateX(4px);
}

.footer-social-link {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    background: linear-gradient(180deg, rgba(8, 27, 42, 0.98) 0%, rgba(11, 42, 68, 0.98) 100%);
}

.mobile-nav-link {
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

/* ===== MOBILE RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {

    /* Hero Section */
    .hero-overlay {
        background-color: rgba(11, 42, 68, 0.9);
    }

    /* Reduce spacing on mobile */
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Footer adjustments */
    .footer-modern {
        border-radius: 1.5rem 1.5rem 0 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Glowing cards */
    .glow-card-inner {
        padding: 1rem;
    }

    /* Counter cards on mobile */
    .counter-value {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {

    /* Smaller footer corners on very small screens */
    .footer-modern {
        border-radius: 1rem 1rem 0 0;
    }

    /* Stack grid items */
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* ===== TOUCH-FRIENDLY ENHANCEMENTS ===== */
@media (hover: none) and (pointer: coarse) {

    /* Larger tap targets for touch devices */
    .nav-link,
    .mobile-nav-link {
        padding: 0.5rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .footer-link {
        padding: 0.25rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .footer-social-link {
        width: 3rem;
        height: 3rem;
    }

    /* Disable hover effects on touch */
    .glow-card:hover {
        transform: none;
    }
}

/* ===== SAFE AREA INSETS (Notched phones) ===== */
@supports (padding: max(0px)) {
    .navbar-header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .mobile-menu nav {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    .footer-modern {
        padding-bottom: max(3rem, env(safe-area-inset-bottom));
    }
}