/* Visual effects layered on modern-theme.css: parallax, floating, glassmorphism, 3D tilt.
   All colours stay in the blue palette defined by the theme variables. */

:root {
    --deep: #0b1f4d;
    --deep-2: #12307a;
    --glass-bg: rgba(255, 255, 255, 0.10);
    --glass-bg-strong: rgba(255, 255, 255, 0.16);
    --glass-border: rgba(255, 255, 255, 0.28);
    --glass-shadow: 0 8px 32px rgba(7, 20, 60, 0.35);
}

/* ---------- Header / navigation ---------- */
.header.scrolled {
    box-shadow: 0 8px 30px rgba(30, 58, 138, 0.12);
}
.header.scrolled .navbar { padding: 0.7rem 0; }
.navbar { transition: padding 0.3s ease; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 0.5rem;
    cursor: pointer;
}
.hamburger .bar {
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-menu {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0.25rem;
        padding: 1rem 2rem 1.5rem;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    }
    .nav-menu.active { opacity: 1; visibility: visible; transform: none; }
}

/* ---------- Parallax layers ---------- */
.parallax-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    will-change: transform;
}
.orb-1 {
    width: 460px; height: 460px;
    top: -120px; right: -80px;
    background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.55), rgba(14, 165, 233, 0.05) 70%);
}
.orb-2 {
    width: 320px; height: 320px;
    bottom: -100px; left: -60px;
    background: radial-gradient(circle at 60% 40%, rgba(59, 130, 246, 0.5), rgba(30, 64, 175, 0.05) 70%);
}
.orb-3 {
    width: 160px; height: 160px;
    top: 40%; left: 42%;
    background: radial-gradient(circle at 40% 40%, rgba(125, 211, 252, 0.45), rgba(14, 165, 233, 0) 70%);
}
.grid-lines {
    position: absolute;
    inset: -10% 0;
    background-image:
        linear-gradient(rgba(125, 211, 252, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.07) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    will-change: transform;
}

.hero { background: linear-gradient(160deg, var(--deep) 0%, var(--primary) 55%, var(--deep-2) 100%); }
.hero::before, .hero::after { display: none; }
.hero-content { z-index: 2; }
.hero-text h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.hero-text { min-width: 0; }
.hero-visual { position: relative; }
.hero-image { perspective: 1000px; overflow: visible; background: none; box-shadow: none; }
.hero-img {
    border-radius: 20px;
    box-shadow: 0 30px 60px -15px rgba(2, 8, 30, 0.6);
}
.hero-image:hover .hero-img { transform: none; }
.hero-image-overlay { top: auto; right: -1rem; bottom: -1.5rem; transform: translateZ(60px); }

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 1rem;
}

/* Inner-page banner */
.page-hero {
    position: relative;
    padding: 9rem 0 5rem;
    background: linear-gradient(160deg, var(--deep) 0%, var(--primary) 60%, var(--deep-2) 100%);
    overflow: hidden;
}
.page-hero-inner { position: relative; z-index: 1; display: flex; justify-content: center; }
.page-hero .glass-panel { text-align: center; max-width: 760px; }
.page-hero h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.page-hero p { font-size: 1.15rem; opacity: 0.9; }

/* Parallax photo band */
.parallax-band {
    position: relative;
    overflow: hidden;
    padding: 8rem 0;
    color: #fff;
    isolation: isolate;
}
.band-bg {
    position: absolute;
    inset: -25% 0;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(11, 31, 77, 0.85), rgba(30, 64, 175, 0.7)),
        url('/images/industrial-equipment.jpg') center / cover no-repeat;
    will-change: transform;
}
.band-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 4rem;
    align-items: center;
}
.band-inner h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1rem; }
.band-inner p { opacity: 0.92; margin-bottom: 1.75rem; font-size: 1.1rem; }
.band-cards { display: grid; gap: 1.25rem; }
.glass-mini {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    font-weight: 700;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: var(--glass-shadow);
}
.glass-mini i { font-size: 1.5rem; color: var(--accent-light); }
.glass-mini:nth-child(2) { margin-left: 2rem; }

/* ---------- Glassmorphism ---------- */
.glass, .glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    color: #fff;
}
.glass-panel { padding: 3rem; border-radius: 24px; }

/* the existing light "floating card" gets a proper frosted look */
.floating-card.glass { padding: 1.25rem 1.5rem; border-radius: 16px; color: #fff; }
.floating-card.glass h4 { color: #fff; }
.floating-card.glass p { color: rgba(255, 255, 255, 0.85); }
.floating-card.glass i { background: none; -webkit-text-fill-color: var(--accent-light); color: var(--accent-light); }

.stat.glass:hover { background: var(--glass-bg-strong); }
.hero-stats .stat { padding: 1.25rem 1.5rem; }
.hero-stats .stat h3 { font-size: 2.4rem; margin-bottom: 0.25rem; }

.value-card.glass { padding: 2.25rem 1.5rem; }
.value-card.glass:hover { background: var(--glass-bg-strong); }

.section-header.on-dark h2, .section-header.on-dark p { color: #fff; }
.values-section { padding: 6rem 0; }
.values-section .section-header { margin-bottom: 3.5rem; }

/* contact on a parallax background */
.contact {
    position: relative;
    overflow: hidden;
    padding-top: 9rem;
    background: linear-gradient(160deg, var(--deep) 0%, var(--primary) 55%, var(--deep-2) 100%);
}
.contact-inner { position: relative; z-index: 1; }
.contact-item.glass, .contact-form.glass { border-radius: 20px; }
.contact-item h4 { color: #fff; margin-bottom: 0.25rem; }
.contact-item p { color: rgba(255, 255, 255, 0.85); }
.contact-item i { background: none; -webkit-text-fill-color: var(--accent-light); color: var(--accent-light); }

/* light sections: slightly more depth for cards */
.about, .services, .gallery { padding-top: 5rem; }
.about-card, .feature, .service-card, .gallery-item { will-change: transform; }
.about { background: linear-gradient(180deg, #eef4ff 0%, #f8fafc 100%); }
.services { background: linear-gradient(180deg, #eef4ff 0%, #ffffff 100%); }
.service-card li { background: rgba(14, 165, 233, 0.06); }
.service-card li:hover { background: rgba(14, 165, 233, 0.14); }

/* ---------- Soft floating ---------- */
@keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -14px; }
}
@keyframes float-slow {
    0%, 100% { translate: 0 0; scale: 1; }
    50% { translate: 18px -26px; scale: 1.06; }
}
.float { animation: float 6s ease-in-out infinite; }
.float-slow { animation: float-slow 14s ease-in-out infinite; }
.delay-1 { animation-delay: -1s; } .delay-2 { animation-delay: -2s; }
.delay-3 { animation-delay: -3s; } .delay-4 { animation-delay: -4s; }
.delay-5 { animation-delay: -5s; }

/* ---------- Scroll reveal ---------- */
.js .reveal {
    opacity: 0;
    translate: 0 36px;
    transition: opacity 0.8s ease, translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.in-view { opacity: 1; translate: 0 0; }

/* ---------- 3D tilt ---------- */
[data-tilt] {
    transform-style: preserve-3d;
    transition: transform 0.25s ease-out, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
}
[data-tilt].is-tilting { transition: transform 0.06s linear, box-shadow 0.3s ease; }
[data-tilt]::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.28), transparent 55%);
    transition: opacity 0.3s ease;
}
[data-tilt].is-tilting::after { opacity: 1; }
.hero-image[data-tilt]::after { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr 1fr; }
    .hero-stats { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .hero-content { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: 1fr; }
    .hero-buttons { justify-content: center; flex-wrap: wrap; }
    .hero-image-overlay { right: 0.5rem; bottom: -1rem; }
    .band-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .glass-mini:nth-child(2) { margin-left: 0; }
    .glass-panel { padding: 2rem 1.5rem; }
    .parallax-band { padding: 5rem 0; }
    .page-hero { padding: 7.5rem 0 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .float, .float-slow { animation: none; }
    .js .reveal { opacity: 1; translate: none; transition: none; }
    [data-tilt] { transition: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Notifications ---------- */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 2000;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: #fff;
    background: var(--accent);
    box-shadow: var(--shadow-lg);
    animation: slide-in 0.3s ease-out;
}
.notification.success { background: #0284c7; }
.notification.error { background: #1e3a8a; border: 1px solid #f87171; }
@keyframes slide-in { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
