/* ─── Fluid font scale ──────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }
@media (max-width: 1200px) { html { font-size: 15px; } }
@media (max-width: 992px)  { html { font-size: 14px; } }
@media (max-width: 576px)  { html { font-size: 13px; } }

/* ─── Typography ────────────────────────────────────────────────── */
body {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: #1a1a2e;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.display-4, .display-5,
.footer-brand,
.btn,
.section-tag,
.service-name,
.stat-box h2 {
    font-family: 'Barlow Condensed', sans-serif;
    letter-spacing: 0.01em;
}

/* Tighten display headings for industrial feel */
.display-4 { font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.display-5 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }

/* Body text stays Inter */
p, li, label, input, textarea, small, .lead { font-family: 'Inter', sans-serif; }

/* Navbar brand — Barlow Condensed is perfect for all-caps branding */
#mainNavbar .navbar-brand {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    letter-spacing: 0.05em;
    font-size: 1.6rem;
}

/* ─── Design tokens ─────────────────────────────────────────────── */
:root {
    --opt-red:        #cc0000;
    --opt-red-dark:   #a80000;
    --opt-navy:       #001f3f;
    --opt-light:      #f8f9fa;
    --opt-dark:       #0b1c2d;
    --focus-ring:     0 0 0 0.19rem rgba(204,0,0,0.45);
}

/* ─── Accessibility: Skip link ──────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    background: var(--opt-red);
    color: #fff;
    padding: 0.5rem 1rem;
    font-weight: 700;
    border-radius: 0 0 0.25rem 0.25rem;
    transition: top 0.2s;
    text-decoration: none;
}
.skip-link:focus { top: 0; color: #fff; }

/* ─── Accessibility: Screen-reader only ─────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ─── Focus rings — all interactive elements ────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 0.13rem;
}

/* ─── Reduced motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn { font-weight: 700; transition: background-color 0.3s, box-shadow 0.3s, transform 0.2s; }

.btn:hover {
    box-shadow: 0 0.50rem 0.38rem -0.38rem #555;
}

.btn-square    { width: 2.25rem; height: 2.25rem; }
.btn-sm-square { width: 1.75rem; height: 1.75rem; }
.btn-lg-square { width: 2.88rem; height: 2.88rem; }
.btn-square, .btn-sm-square, .btn-lg-square { padding-left: 0; padding-right: 0; text-align: center; }

.btn-optimus-red {
    background-color: var(--opt-red);
    color: #fff;
    border-radius: 0;
    letter-spacing: 0.06rem;
    border: 0.13rem solid var(--opt-red);
}
.btn-optimus-red:hover, .btn-optimus-red:focus-visible {
    background-color: var(--opt-red-dark);
    border-color: var(--opt-red-dark);
    color: #fff;
}

.btn-outline-navy {
    border: 0.13rem solid var(--opt-navy);
    color: var(--opt-navy);
    border-radius: 0;
}
.btn-outline-navy:hover, .btn-outline-navy:focus-visible {
    background-color: var(--opt-navy);
    color: #fff;
}

/* ─── Color utilities ───────────────────────────────────────────── */
.text-optimus-red { color: var(--opt-red) !important; text-shadow: 0 0 40px white;}
.text-navy        { color: var(--opt-navy) !important; }

/* ─── Back to top ───────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    display: none;
    right: 1.88rem;
    bottom: 1.5rem;
    border-radius: 50% 50% 0 0;
    z-index: 99;
    transition: opacity 0.3s, transform 0.3s;
}
.back-to-top:hover { transform: translateY(-3px); }

/* ─── Navbar ────────────────────────────────────────────────────── */
#mainNavbar .navbar-brand span, .theme-text-red-color, .theme-text-red-color:hover { color: var(--opt-red);  text-shadow: 0 0 40px white; }

.navbar{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.nav-underline-custom .nav-link {
    position: relative;
    padding: 1.38rem 1.00rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    transition: color 0.2s;
}
.nav-underline-custom .nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 0.25rem;
    background-color: var(--opt-red);
    transition: width 0.3s ease-in-out;
}
.nav-underline-custom .nav-link:hover,
.nav-underline-custom .nav-link.active { color: #fff; }
.nav-underline-custom .nav-link.active::after,
.nav-underline-custom .nav-link:hover::after { width: 100%; }

/* Mobile drawer */
@media (max-width: 991.98px) {
    #mainNavbar .navbar-collapse {
        position: fixed;
        top: 0; right: -100%;
        height: 100vh;
        width: 70vw; max-width: 18.75rem;
        background: #1a1e21;
        padding: 1.25rem 0.75rem;
        box-shadow: -0.25rem 0 1.50rem rgba(0,0,0,0.4);
        z-index: 1050;
        overflow-y: auto;
        transition: right 0.3s ease;
        border-radius: 0;
    }
    #mainNavbar .navbar-collapse.show { right: 0; }
    #mainNavbar .navbar-nav { text-align: left; }
    #mainNavbar .navbar-nav .nav-link { padding: 0.75rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
    #mainNavbar .btn-optimus-red { margin: 0.75rem 0.63rem; width: calc(100% - 1.25rem); }

    /* Drawer close button */
    .drawer-close {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0.5rem 0.75rem 1rem;
    }
    .drawer-close-btn {
        background: none;
        border: none;
        color: rgba(255,255,255,0.7);
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        transition: color 0.2s;
    }
    .drawer-close-btn:hover, .drawer-close-btn:focus-visible { color: #fff; }
}

@media (min-width: 992px) {
    .drawer-close { display: none; }
}

@media (max-width: 700px) {
    .navbar .btn { padding: 0.38rem 0.75rem; font-size: 0.88rem; }
    #optimus-rebar-theme { padding: 1.25rem; }
    main{
        margin-top: 50px !important;
    }
}

/* ─── Page hero shared pattern ──────────────────────────────────── */
.page-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
    background-color: var(--opt-navy); /* fallback */
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55));
}
.page-hero .container { position: relative; z-index: 1; }

/* ─── Section headings (pill pattern from home) ─────────────────── */
.section-heading { position: relative; text-align: center; margin-bottom: 3rem; }
.section-heading .service-separator { margin: 0 auto 0; }
.section-heading h2 { display: inline-block; }

.service-separator {
    width: 100%;
    height: 0.06rem;
    background-color: rgba(0,0,0,0.1);
    margin: 0.75rem 0;
}

.service-name {
    color: #202f55 !important;
    margin-top: -2.19rem !important;
    background-color: white;
    width: fit-content;
    margin: auto;
    padding: 0 1.25rem;
}

/* On dark backgrounds the pill needs dark bg */
.section-heading-light .service-name { background-color: var(--opt-light); }

.section-tag {
    display: inline-block;
    color: var(--opt-red);
    font-weight: 700;
    letter-spacing: 0.19rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* On dark hero backgrounds section-tag should be lighter red/white */
.page-hero .section-tag { color: rgba(255,180,180,0.9); }

.header-underline { width: 3.75rem; height: 0.31rem; background-color: var(--opt-red); }

/* ─── Service cards ─────────────────────────────────────────────── */
.service-card {
    border: none;
    border-radius: 0.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0.63rem 1.56rem rgba(0,0,0,0.08), 0 0.25rem 0.63rem rgba(0,0,0,0.04) !important;
}
.service-card:hover, .service-card:focus-within {
    transform: translateY(-0.38rem);
    box-shadow: 0 1.25rem 2.81rem rgba(0,0,0,0.12), 0 0.50rem 1.25rem rgba(0,0,0,0.06) !important;
}

/* ─── Trust cards ───────────────────────────────────────────────── */
.trust-section { position: relative; }
.trust-card {
    background: #fff;
    padding: 2.19rem 1.56rem;
    border-radius: 0.75rem;
    border-bottom: 0.19rem solid transparent;
    box-shadow: 0 0.50rem 1.56rem rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}
.trust-card:hover, .trust-card:focus-within {
    transform: translateY(-0.38rem);
    box-shadow: 0 0.88rem 2.19rem rgba(0,0,0,0.12);
    border-bottom-color: var(--opt-red);
}
.trust-card i { font-size: 2.50rem; color: var(--opt-red); margin-bottom: 0.94rem; display: block; }
.trust-card h6 { font-weight: 700; color: var(--opt-dark); margin-bottom: 0.63rem; }
.trust-card p  { font-size: 0.88rem; color: #6c757d; margin-bottom: 0; }

/* ─── About / visual panel ──────────────────────────────────────── */
.about-section { overflow: hidden; }
.about-visual-container { position: relative; width: 100%; height: 100%; overflow: hidden; min-height: 400px; }
.main-image { width: 100%; height: 100%; background-size: cover; background-position: center; transition: transform 0.6s ease; }
.about-visual-container:hover .main-image { transform: scale(1.04); }
.image-accent-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(0,31,63,0.45), transparent);
}
.experience-badge {
    position: absolute; bottom: 2.50rem; right: 2.50rem;
    background: var(--opt-red); color: white;
    padding: 1.56rem; display: flex; flex-direction: column; align-items: center;
    border-radius: 0.25rem; z-index: 10;
}
.experience-badge .number { font-size: 2.50rem; font-weight: 800; line-height: 1; }
.experience-badge .label  { font-size: 0.8rem; text-transform: uppercase; text-align: center; letter-spacing: 0.06rem; }
.diagonal-mask {
    position: absolute; top: 0; right: -0.06rem;
    height: 100%; width: 6.25rem;
    background-color: var(--opt-light);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}
.vision-card { border-left: 0.25rem solid var(--opt-red); padding-left: 0.94rem; transition: border-color 0.3s; }
.vision-card:hover { border-left-color: var(--opt-navy); }

/* ─── Stats ─────────────────────────────────────────────────────── */
.stat-box { border-radius: 0.50rem; text-align: center; padding: 1.25rem; }
.stat-box h2 { font-size: 2.50rem; font-weight: 800; line-height: 1.1; }

/* ─── Team images ───────────────────────────────────────────────── */
.team-card { transition: transform 0.3s ease; }
.team-card:hover { transform: translateY(-0.25rem); }
.team-img {
    width: 8.75rem; height: 8.75rem; object-fit: cover;
    border-radius: 50%;
    border: 0.19rem solid var(--opt-red);
}

/* ─── Project cards ─────────────────────────────────────────────── */
.project-card {
    position: relative; overflow: hidden;
    border-radius: 0.50rem;
    box-shadow: 0 0.50rem 1.25rem rgba(0,0,0,0.15);
    background: #000;
}
.project-card img { width: 100%; height: 14.38rem; object-fit: cover; display: block; }
.project-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,33,71,0.85); color: white;
    padding: 0.63rem; text-align: center; font-size: 0.9rem; font-weight: bold;
}

/* ─── Footer ────────────────────────────────────────────────────── */
.site-footer {
    background-color: #0d1117;
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
}
.site-footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; }
.site-footer .footer-brand span { color: var(--opt-red); }
.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 1rem 0;
}
.footer-social{
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.25rem; height: 2.25rem;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: background-color 0.2s, color 0.2s;
    margin-right: 0.4rem;
}
.footer-social a:hover, .footer-social a:focus-visible {
    background: var(--opt-red);
    color: #fff;
}

/* ─── Form focus ────────────────────────────────────────────────── */
.form-control:focus {
    border-color: var(--opt-red);
    box-shadow: 0 0 0 0.19rem rgba(204,0,0,0.2);
}

/* ─── Scrollbar hide ────────────────────────────────────────────── */
.overflow-auto::-webkit-scrollbar { display: none; }
.overflow-auto { -ms-overflow-style: none; scrollbar-width: none; }

main{
    margin-top: 60px;
}
