* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
    pointer-events: none;
}

.transition-row {
    flex: 1;
    display: flex;
}

.transition-row.row-1 .block {
    transform-origin: top;
}

.transition-row.row-2 .block {
    transform-origin: bottom;
}

/* Legacy full-screen block wipe — retired in favour of #route-bar below. */
.transition { display: none !important; }

:root {
    --brand: #0E2595;
    --brand-700: #0a1c70;
    --brand-300: #4f6dff;
}

/* Slim top progress bar shown while navigating between pages. */
#route-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--brand), var(--brand-300));
    box-shadow: 0 0 10px rgba(14, 37, 149, 0.55);
    z-index: 9999;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.2s ease;
}
#route-bar.loading {
    width: 82%;
    opacity: 1;
}

/* Soft cross-page fade — never blanks the screen for long. */
body {
    transition: opacity 0.32s ease, transform 0.32s ease;
}
body.page-enter { opacity: 0; transform: translateY(8px); }
body.page-exit  { opacity: 0; transform: translateY(-8px); }

@media (prefers-reduced-motion: reduce) {
    body, #route-bar { transition: none !important; }
    body.page-enter, body.page-exit { opacity: 1; transform: none; }
}


/* =====================================================================
   SHARED — motion, background sections, hover lift (all pages)
   ===================================================================== */

html { scroll-behavior: smooth; }

/* Scroll reveal — hidden state only applies when JS is active (.js-motion). */
.js-motion [data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 0.84, 0.44, 1),
                transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}
.js-motion [data-reveal="left"]  { transform: translateX(-36px); }
.js-motion [data-reveal="right"] { transform: translateX(36px); }
.js-motion [data-reveal="zoom"]  { transform: scale(0.93); }
.js-motion [data-reveal].is-in   { opacity: 1; transform: none; }

/* Full-bleed background sections with a readable overlay. */
.bg-cover {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    isolation: isolate;
}
.bg-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(7, 16, 31, 0.74), rgba(7, 16, 31, 0.9));
}
.bg-cover.bg-brand::before {
    background: linear-gradient(140deg, rgba(14, 37, 149, 0.86), rgba(8, 24, 88, 0.92));
}
.bg-fixed { background-attachment: fixed; }

/* Reusable hover lift for cards. */
.lift { transition: transform 0.35s cubic-bezier(0.16, 0.84, 0.44, 1), box-shadow 0.35s ease; }
.lift:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(14, 37, 149, 0.16); }

/* Condensed nav once scrolled. */
.nav-bar.scrolled {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}
.hero-header .main-nav.scrolled { box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .bg-fixed { background-attachment: scroll; }
}
/* background-attachment: fixed is janky on touch — disable there. */
@media (hover: none) {
    .bg-fixed { background-attachment: scroll; }
}


/* =====================================================================
   INNER-PAGE HERO BANDS (image-backed) + card hover lift
   ===================================================================== */

.page-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 46vh;
    padding: clamp(3.5rem, 9vw, 8rem) clamp(1.5rem, 5vw, 5rem) clamp(2.5rem, 5vw, 4rem);
    margin: 1rem;
    border-radius: 28px;
    overflow: hidden;
    color: #fff;
    background-color: #081858;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, rgba(8, 24, 88, 0.88) 0%, rgba(7, 16, 31, 0.62) 70%, rgba(7, 16, 31, 0.5) 100%);
}
.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(120% 90% at 80% 10%, #000 30%, transparent 75%);
            mask-image: radial-gradient(120% 90% at 80% 10%, #000 30%, transparent 75%);
}
.page-hero-inner { max-width: 920px; }
.page-hero .crumbs {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}
.page-hero .crumbs .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #4f6dff; box-shadow: 0 0 0 4px rgba(79, 109, 255, 0.25);
}
.page-hero h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: clamp(2.6rem, 6.5vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 1.1rem 0 0;
    color: #fff;
}

.page-hero--about     { background-image: url('./imgs/about.jpg'); }
.page-hero--services  { background-image: url('./imgs/database.jpg'); }
.page-hero--solutions { background-image: url('./imgs/cyber.jpg'); }
.page-hero--contact   { background-image: url('./imgs/audit.jpeg'); }

/* Card hover lift (CSS-only, applies wherever these cards appear). */
.service-card, .info-card, .feature-card, .product-carda, .glass-card {
    transition: transform 0.35s cubic-bezier(0.16, 0.84, 0.44, 1), box-shadow 0.35s ease, border-color 0.3s ease;
}
.service-card:hover, .info-card:hover, .feature-card:hover, .product-carda:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(14, 37, 149, 0.14);
}

/* CTA banner button hover (footer CTA). */
.hero-content-cta .btn-primary {
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.hero-content-cta .btn-primary:hover {
    transform: translateY(-2px);
    background-color: #fff;
    color: #0E2595;
}