:root {
    --void: #001a2d;
    --ink: #f7f9fb;
    --blood: #8b0000;
    --steel: #5f6e7c;
    --gold: #c9a634;
    --slate: #1a1a1a;
    --glow-blood: rgba(139,0,0,.55);
    --glow-gold: rgba(201,166,52,.55);
    --line: rgba(255,255,255,.06);
}

/* Layout */
html, body {
    height: 100%;
}
.index-container {
    width: 100%;
}
.index-container > .tearoff-card {
    box-shadow: 8px 8px 20px rgba(0,0,0,0.15), -8px 8px 20px rgba(0,0,0,0.15);
    border-left: none;
}
.index-container > .tearoff-card:hover {
    transform: none;
}
@media (min-width: 992px) {
    .index-container {
        width: 75%;
    }
}
body {
    display: flex;
    flex-direction: column;
    background: #e9ecef;
    position: relative;
    overflow-x: hidden;
}
.parallax-grid {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image:
        linear-gradient(to right, rgba(0, 100, 180, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 100, 180, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: -2;
    transition: transform 0.2s ease-out;
}
.parallax-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: url('../img/logo.svg');
    background-size: 80vmax;
    background-repeat: no-repeat;
    background-position: center;
    filter: grayscale(100%) opacity(0.1);
    pointer-events: none;
    z-index: -1;
    transition: transform 0.15s ease-out;
}
.main-content {
    flex: 1 0 auto;
}

/* Forms */
.form-control {
    background: #fff;
    border-color: #ced4da;
    color: #212529;
}
.form-control:focus {
    background: #fff;
    border-color: #6c757d;
    box-shadow: 0 0 0 0.1rem rgba(108,117,125,0.15);
}

/* Summernote editor */
.note-editor.note-frame {
    border-color: #ced4da;
}
.note-editor .note-editing-area .note-editable {
    background: #fff;
    color: #212529;
}
.note-editor .note-toolbar {
    background: #e9ecef;
}

/* Navbar */
.navbar {
    background: linear-gradient(180deg, var(--void) 0%, #002a45 100%) !important;
    border-bottom: 2px solid var(--slate);
}
.navbar .nav-link {
    color: var(--ink) !important;
}
.navbar .nav-link:hover {
    color: var(--gold) !important;
}
.navbar .nav-item.active .nav-link {
    color: var(--gold) !important;
}
.navbar-brand {
    color: var(--ink) !important;
}
.navbar-brand:hover {
    color: var(--gold) !important;
}
.navbar-brand:hover img {
    filter: brightness(1.2);
}
.navbar-brand-title {
    color: var(--ink);
    letter-spacing: 0.15em;
}
.navbar-brand-tagline {
    color: var(--steel);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Dropdown menus */
.dropdown-menu {
    background: var(--void);
    border: 1px solid var(--line);
}

/* Mega menu sections */
.products-chevron,
.services-chevron,
.inquiries-chevron {
    transition: transform 0.1s ease;
}
.products-chevron.rotate,
.services-chevron.rotate,
.inquiries-chevron.rotate {
    transform: rotate(180deg);
}
.products-section,
.services-section,
.inquiries-section {
    background: transparent;
}
.products-section .card,
.services-section .card {
    background: var(--void);
    border: 1px solid var(--gold);
    border-top: none;
    border-left: 4px solid var(--gold);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
}
.inquiries-section .card {
    background: var(--blood);
    border: 1px solid var(--gold);
    border-top: none;
    border-left: 4px solid var(--gold);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
}
.products-section .mega-product:hover,
.services-section .mega-product:hover,
.inquiries-section .mega-product:hover {
    background: #fff;
    color: var(--void) !important;
    text-decoration: none;
}
.products-section .mega-product:hover i,
.services-section .mega-product:hover i,
.inquiries-section .mega-product:hover i {
    color: var(--void);
}

/* Mega menu */
.dropdown-menu-mega .mega-row {
    border-bottom: 1px solid var(--line);
    display: block;
    text-decoration: none;
}
.dropdown-menu-mega .mega-row:last-child {
    border-bottom: none;
}
.dropdown-menu-mega a.mega-row:hover {
    background: var(--steel);
    text-decoration: none;
}
.mega-row-header {
    background: var(--gold);
}
.mega-row-header.header-blood {
    background: var(--blood);
}
.mega-row-header.header-blood .mega-header {
    color: var(--ink);
}
.mega-row-header.header-steel {
    background: var(--steel);
}
.mega-row-header.header-steel .mega-header {
    color: var(--ink);
}
.mega-header {
    color: var(--void);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    margin: 0;
}
.dropdown-menu .dropdown-item {
    color: var(--ink);
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background: var(--steel);
    color: var(--ink);
}
.dropdown-menu .dropdown-item i {
    width: 1.25em;
    text-align: center;
}
.dropdown-menu .dropdown-divider {
    border-color: var(--line);
}
.dropdown-item-text {
    white-space: nowrap;
}

/* Hero section */
.hero {
    background: linear-gradient(180deg, #002a45 0%, var(--void) 30%, var(--void) 70%, #000d16 100%);
    color: var(--ink);
    padding: 4rem 0;
    text-align: center;
    border-bottom: 2px solid var(--slate);
    box-shadow: inset 0 10px 30px rgba(0,0,0,0.3), inset 0 -10px 30px rgba(0,0,0,0.4);
}
.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: 0.15em;
    color: var(--ink);
    white-space: nowrap;
}
.hero .slogan {
    color: var(--steel);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}
.hero .slogan-sm {
    color: var(--steel);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.hero-divider {
    border-color: var(--gold);
    width: 100px;
    margin: 0 auto 1.5rem;
}
.hero .tagline {
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: rgba(247, 249, 251, 0.85);
}
.hero.hero-sm {
    padding: 2.5rem 0;
}
.hero.hero-sm h1 {
    font-size: 2rem;
    margin-bottom: 0;
}

/* CTA section */
.cta-section {
    background: #f8f9fa;
    padding: 3rem 0;
    text-align: center;
}

/* Buttons */
.btn-gold {
    background: var(--gold);
    color: var(--void);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
}
.btn-gold:hover {
    background: #b8952e;
    color: var(--void);
}
.btn-gold.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}
.btn-void {
    background: var(--void);
    color: var(--ink);
    border: 1px solid var(--gold);
    padding: 0.75rem 2rem;
    font-weight: 600;
}
.btn-void:hover {
    background: #002a45;
    color: var(--ink);
}
.btn-void.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}
.btn-slate {
    background: var(--slate);
    color: var(--ink);
    border: 1px solid var(--gold);
    padding: 0.75rem 2rem;
    font-weight: 600;
}
.btn-slate:hover {
    background: #0f0f0f;
    color: var(--ink);
}
.btn-slate.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}
.btn-custom-engagements {
    color: var(--void);
    font-weight: 600;
}
.btn-glow-gold {
    box-shadow: 0 0 20px var(--glow-gold);
}
.btn-void-gold {
    background: var(--void);
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 0.75rem 2rem;
    font-weight: 600;
}
.btn-void-gold:hover {
    background: #002a45;
    color: var(--gold);
}

/* Footer */
.bg-slate {
    background: var(--slate);
}
.footer {
    background: var(--void);
    color: var(--ink);
    border-top: 2px solid var(--slate);
}
.footer-link {
    color: var(--ink);
    transition: color 0.1s ease;
}
.footer-link:hover {
    color: var(--gold);
    text-decoration: none;
}
.footer li .footer-link {
    display: block;
    padding: 0.25rem 0.5rem;
    margin-left: -0.5rem;
    transition: color 0.1s ease, background 0.1s ease;
}
.footer-top li .footer-link:hover {
    color: var(--ink);
    background: var(--void);
}
.footer-muted {
    color: var(--steel);
}
.footer-top {
    background: var(--blood);
}
.footer-top .bg-white {
    background: var(--ink) !important;
}
.footer-top .bg-white span {
    color: var(--blood) !important;
}
.footer-top .footer-link {
    color: var(--ink);
}
.footer-top li .footer-link:hover {
    color: var(--blood);
    background: var(--ink);
}

/* Expertise cards */
.tearoff-card {
    background: rgba(255,255,255,0.7);
    border: none;
    border-left: 4px solid var(--gold);
    transition: border-color 0.1s ease, transform 0.1s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.tearoff-card:hover {
    border-left-color: var(--blood);
    transform: translateX(4px);
}
.tearoff-card .card-body {
    color: var(--void);
    padding-right: 1rem !important;
}
.tearoff-card h3 {
    color: var(--void);
}
.tearoff-card p {
    color: var(--void);
}
.tearoff-card .tearoff-icon {
    color: var(--gold);
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* Content section cards (left column) */
.col-lg-8 .tearoff-card,
.tearoff-card.subcard {
    background: rgba(255,255,255,0.85);
    box-shadow: 0 2px 8px rgba(0,26,45,0.08);
    border: none;
    border-radius: 0;
    margin-bottom: 0 !important;
}
.col-lg-8 .tearoff-card:hover,
.tearoff-card.subcard:hover {
    background: rgba(255,255,255,1);
}
.col-lg-8 .tearoff-card h2,
.tearoff-card.subcard h2 {
    color: var(--void);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 0.5rem;
    display: inline-block;
}
.col-lg-8 .tearoff-card p,
.tearoff-card.subcard p {
    color: #2a3a4a;
    line-height: 1.7;
}

/* Right column link cards */
.tearoff-card a.d-block {
    transition: background 0.1s ease, border-color 0.1s ease;
}
.tearoff-card a.d-block:hover,
.tearoff-card a.d-block.active {
    background: var(--void) !important;
    border-left-color: var(--gold) !important;
}
.tearoff-card a.d-block:hover h3,
.tearoff-card a.d-block:hover p,
.tearoff-card a.d-block.active h3,
.tearoff-card a.d-block.active p {
    color: var(--ink);
}
.tearoff-card a.d-block:hover .tearoff-icon,
.tearoff-card a.d-block.active .tearoff-icon {
    color: var(--gold);
}

/* Product cards */
.product-card {
    background: var(--void);
    border: none;
    display: flex !important;
    flex-direction: row;
    align-items: stretch;
    transition: transform 0.2s ease;
    text-decoration: none;
}
.product-card:hover {
    transform: translateX(4px);
    text-decoration: none;
}
.product-card .card-body {
    color: var(--ink);
    padding: 1.5rem;
    flex: 1;
}
.product-card h3 {
    color: var(--ink);
}
.product-card p {
    color: rgba(247, 249, 251, 0.85);
}
.product-icon-box {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}
.product-card .product-icon {
    color: var(--gold);
    font-size: 48px;
}
.product-card .product-icon-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.product-tags {
    display: flex;
    flex-shrink: 0;
}
.product-tag {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    padding: 0.75rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
}
.product-tag-opensource {
    background: var(--gold);
    color: var(--void);
}
.product-tag-proprietary {
    background: var(--blood);
    color: var(--ink);
}
.product-tag-selfhosted {
    background: var(--steel);
    color: var(--ink);
}
.product-tag-saas {
    background: var(--slate);
    color: var(--ink);
}

/* Subpage hero */
.hero-subpage {
    background: linear-gradient(180deg, var(--void) 0%, #002a45 100%);
    color: var(--ink);
    padding: 2.5rem 0;
    text-align: center;
    border-bottom: 2px solid var(--slate);
}
.hero-subpage h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.15em;
}
.hero-subpage .tagline {
    font-size: 1.1rem;
    color: rgba(247, 249, 251, 0.85);
    max-width: 600px;
    margin: 0 auto;
}

/* Product detail page */
.product-badge-band {
    padding: 0.5rem 0;
}
.product-badge-band.badge-opensource {
    background: var(--gold);
}
.product-badge-band.badge-proprietary {
    background: var(--blood);
}
.product-badge-band.badge-custom {
    background: var(--steel);
}
.product-badge-band.badge-service {
    background: var(--slate);
}
.product-badge-band.badge-ink {
    background: var(--ink);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 -8px 20px rgba(0,0,0,0.4);
    position: relative;
    z-index: 10;
}
.product-badge-band .badge-text {
    text-transform: uppercase;
    font-weight: 600;
    color: var(--void);
    letter-spacing: 0.1em;
}
.product-badge-band.badge-proprietary .badge-text,
.product-badge-band.badge-custom .badge-text,
.product-badge-band.badge-service .badge-text {
    color: var(--ink);
}
.product-detail-card {
    background: rgba(255,255,255,0.7);
    border: none;
    border-left: 4px solid var(--gold);
    color: var(--void);
}
.product-detail-card a.resource-link,
.tearoff-card.subcard a.resource-link {
    display: block;
    padding: 0.5rem;
    background: rgba(0,26,45,0.15);
    color: var(--void);
    transition: background 0.2s ease;
}
.product-detail-card a.resource-link:hover,
.tearoff-card.subcard a.resource-link:hover {
    background: rgba(0,26,45,0.25);
    text-decoration: none;
}
.product-detail-cta {
    background: rgba(0,26,45,0.15);
    border-radius: 4px;
}
.product-hero-logo {
    height: 120px;
}
.product-hero-title {
    letter-spacing: 0.15em;
}

/* Mobile responsive navbar */
.navbar-toggler {
    border: 2px solid var(--ink);
    padding: 0.5rem;
    flex-shrink: 0;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23f7f9fb' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.5em;
    height: 1.5em;
}

@media (max-width: 1199.98px) {
    .navbar {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .navbar-brand {
        flex: 0 1 auto;
        min-width: 0;
        margin-right: 0.5rem;
    }
    .navbar-brand > span {
        min-width: 0;
        overflow: hidden;
    }
    .navbar-brand img {
        height: 40px;
        flex-shrink: 0;
    }
    .navbar-brand-title {
        font-size: 0.9rem;
        white-space: nowrap;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .navbar-brand-tagline {
        font-size: 0.6rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .navbar-collapse {
        flex-basis: 100%;
    }
    .navbar-nav .nav-link {
        padding: 0.75rem 0 !important;
    }
    .navbar-nav .nav-item {
        border-bottom: 1px solid var(--line);
    }
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
    .products-section,
    .services-section,
    .inquiries-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .products-section .container-fluid,
    .services-section .container-fluid,
    .inquiries-section .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .products-section .card,
    .services-section .card,
    .inquiries-section .card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand-tagline {
        display: none;
    }
    .navbar-brand img {
        height: 35px;
    }
    .navbar-brand-title {
        font-size: 0.85rem;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
}

/* Utility classes for inline style consolidation */
.logo-invert {
    filter: invert(1);
}

.card-flat-top {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.sidebar-link {
    background: rgba(0,26,45,0.1);
    border-left: 3px solid var(--gold);
}