/* ════════════════════════════════
   JR TECHNOLOGIES — LAYOUT.CSS
   Shared header (nav + mobile menu) and footer, used by EVERY page.
   The markup comes from assets/js/components.js.

   The header and footer carry their own copies of the design tokens they
   need (scoped below), so they render identically no matter which other
   stylesheets a page loads.
════════════════════════════════ */

#navbar,
.mob-menu,
.site-footer {
    --blue: #2563eb;
    --blue-bright: #3b82f6;
    --blue-light: #60a5fa;
    --black: #0f172a;
    --white: #ffffff;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gutter: 5vw;
    --nav-height: 72px;
    --nav-height-sm: 60px;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --nav-ease: cubic-bezier(0.45, 0, 0.2, 1);   /* soft start and soft finish */
    --nav-dur: 0.6s;

    font-family: "Inter", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}
#navbar *,
.mob-menu *,
.site-footer * {
    box-sizing: border-box;
}
#navbar a,
.mob-menu a,
.site-footer a {
    text-decoration: none;
}
#navbar ul,
.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ────────────────────────────────
   NAVIGATION
──────────────────────────────── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--gutter);
    height: var(--nav-height);
    margin: 0;
    background-color: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(37, 99, 235, 0.25);
    transition:
        height var(--nav-dur) var(--nav-ease),
        background-color var(--nav-dur) var(--nav-ease),
        border-color var(--nav-dur) var(--nav-ease);
}
#navbar.scrolled {
    height: var(--nav-height-sm);
    background-color: rgba(15, 23, 42, 0.97);
}

#navbar .nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
#navbar .nav-logo img {
    display: block;
    height: 57px;
    width: auto;
    max-width: 250px;
    /* Shrinks with the bar on scroll: scale (not height) so it animates smoothly */
    transform-origin: left center;
    transform: translateZ(0) scale(1);
    transition: transform var(--nav-dur) var(--nav-ease);
    will-change: transform;
    backface-visibility: hidden;
}
#navbar.scrolled .nav-logo img {
    transform: translateZ(0) scale(0.9);
}

#navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}
#navbar .nav-links li {
    margin: 0;
    padding: 0;
}
#navbar .nav-links a {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.3px;
    color: var(--gray-300);
    transition: color 0.2s;
    position: relative;
}
#navbar .nav-links a::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--blue-light);
    transition: width 0.3s var(--ease);
}
#navbar .nav-links a:hover,
#navbar .nav-links a.active {
    color: var(--white);
}
#navbar .nav-links a:hover::after,
#navbar .nav-links a.active::after {
    width: 100%;
}

#navbar .nav-cta,
.mob-menu .nav-cta {
    display: inline-block;
    background: var(--blue);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    padding: 9px 22px;
    border-radius: 4px;
    transition: background 0.2s, transform 0.2s;
}
#navbar .nav-cta:hover,
.mob-menu .nav-cta:hover {
    background: var(--blue-bright);
    color: var(--white);
    transform: translateY(-1px);
}
#navbar .nav-cta::after {
    display: none;
}

/* Mobile hamburger */
#navbar .nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
#navbar .nav-hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--gray-300);
    transition: transform 0.3s var(--ease), opacity 0.2s;
}
#navbar .nav-hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
#navbar .nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}
#navbar .nav-hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile menu */
.mob-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 12px var(--gutter) 28px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}
.mob-menu.open {
    display: flex;
}
.mob-menu a {
    font-size: 16px;
    color: var(--gray-300);
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.2s;
}
.mob-menu a:hover,
.mob-menu a.active {
    color: var(--white);
}
.mob-menu .nav-cta {
    margin-top: 12px;
    text-align: center;
    padding: 13px;
    border: none;
}

/* ────────────────────────────────
   FOOTER
──────────────────────────────── */
.site-footer {
    display: block;
    background: var(--black);
    padding: 80px var(--gutter) 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--gray-400);
}
.site-footer .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.site-footer .footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer .footer-brand-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
}
.site-footer .footer-brand-logo img {
    display: block;
    height: 66px;
    width: auto;
    max-width: 230px;
}
.site-footer .footer-brand-desc {
    font-size: 14px;
    line-height: 1.85;
    color: var(--gray-400);
    font-weight: 300;
    margin: 0 0 22px;
}
.site-footer .footer-social {
    display: flex;
    gap: 8px;
}
.site-footer .social-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.site-footer .social-btn:hover {
    background: var(--blue);
    border-color: var(--blue);
}
.site-footer .social-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--gray-400);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s;
}
.site-footer .social-btn:hover svg {
    stroke: var(--white);
}
.site-footer .footer-col-title {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 18px;
    font-weight: 500;
}
.site-footer .footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.site-footer .footer-links a {
    font-size: 14px;
    color: var(--gray-400);
    font-weight: 300;
    transition: color 0.2s;
}
.site-footer .footer-links a:hover {
    color: var(--white);
}
.site-footer .footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}
.site-footer .footer-contact-item svg {
    width: 14px;
    height: 14px;
    stroke: var(--blue-light);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    margin-top: 2px;
}
.site-footer .footer-contact-text {
    font-size: 14px;
    color: var(--gray-400);
    font-weight: 300;
    line-height: 1.5;
}
.site-footer .footer-contact-text a {
    color: var(--gray-400);
    transition: color 0.2s;
}
.site-footer .footer-contact-text a:hover {
    color: var(--white);
}
.site-footer .footer-bottom {
    padding-top: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.site-footer .footer-copy {
    font-size: 15px;
    color: var(--gray-400);
    font-weight: 300;
}
.site-footer .footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}
.site-footer .footer-legal a {
    font-size: 15px;
    color: var(--gray-400);
    transition: color 0.2s;
}
.site-footer .footer-legal a:hover,
.site-footer .footer-legal a.active {
    color: var(--white);
}

/* ────────────────────────────────
   RESPONSIVE
──────────────────────────────── */
@media (max-width: 1024px) {
    .site-footer .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}
@media (max-width: 768px) {
    #navbar .nav-links {
        display: none;
    }
    #navbar .nav-hamburger {
        display: flex;
    }
    .site-footer .footer-top {
        grid-template-columns: 1fr;
    }
    .site-footer .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (max-width: 480px) {
    #navbar .nav-logo img {
        height: 44px;
    }
    #navbar.scrolled .nav-logo img {
        transform: translateZ(0) scale(1);
    }
    .site-footer .footer-brand-logo img {
        height: 54px;
    }
}
