/* --------------------------------------------------
   FONTS
-------------------------------------------------- */

@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}


:root {
    /* 3NG Brand */
    --3ng-crimson: #801818;
    --3ng-crimson-light: #C43D3D;    
    --3ng-navy: #152952;
    --3ng-silver: #A7ADB5;
    --3ng-off-white: #F4F5F6;
    --3ng-charcoal: #30333B;
    --3ng-grey: #8F9094;
    --3ng-white: #FFFFFF;

    --page-width: 1440px;

    /* Dark Theme - Default */
    --page-background: #181B21;
    --surface-primary: #22262E;
    --surface-secondary: #1E2229;
    --surface-elevated: #292E37;

    --text-primary: #F4F5F6;
    --text-secondary: #A7ADB5;
    --text-muted: #8F9094;

    --border-primary: #373C46;
    --border-secondary: #2D323A;

    --header-background: #152952;
    --header-text: #FFFFFF;

    --heading-color: #F4F5F6;
    --accent-color: var(--3ng-silver);
}


/* --------------------------------------------------
   LIGHT THEME
-------------------------------------------------- */

html[data-theme="light"] {
    --page-background: #F4F5F6;
    --surface-primary: #FFFFFF;
    --surface-secondary: #ECEEF1;
    --surface-elevated: #FFFFFF;

    --text-primary: #30333B;
    --text-secondary: #62666E;
    --text-muted: #8F9094;

    --border-primary: #D5D8DD;
    --border-secondary: #E2E4E7;

    --header-background: #152952;
    --header-text: #FFFFFF;

    --heading-color: #152952;
    --accent-color: #801818;
}


/* --------------------------------------------------
   RESET
-------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    background: var(--page-background);
    color: var(--text-primary);
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select {
    font: inherit;
}


/* --------------------------------------------------
   TYPOGRAPHY
-------------------------------------------------- */

h1,
.section-heading h2 {
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-weight: 800;
    letter-spacing: -0.035em;
}

body,
button,
select,
input,
textarea {
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

table {
    font-variant-numeric: tabular-nums;
}


/* --------------------------------------------------
   GLOBAL LAYOUT
-------------------------------------------------- */

.container {
    width: min(calc(100% - 64px), var(--page-width));
    margin-inline: auto;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--accent-color);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


/* --------------------------------------------------
   HEADER
-------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-background);
    color: var(--header-text);
    border-bottom: 3px solid var(--3ng-crimson);
}

.site-header__inner {
    width: min(calc(100% - 64px), var(--page-width));
    min-height: 74px;
    margin-inline: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 32px;
}


/* --------------------------------------------------
   BRAND
-------------------------------------------------- */

.site-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-brand__logo {
    display: block;
    width: auto;
    height: 66px;
    object-fit: contain;
}


/* --------------------------------------------------
   MAIN NAVIGATION
-------------------------------------------------- */

.main-nav {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 2px;
}

.main-nav a {
    position: relative;

    display: flex;
    align-items: center;

    padding: 0 15px;

    color: var(--3ng-white);

    font-size: 0.82rem;
    font-weight: 700;
}

.main-nav a::after {
    content: "";

    position: absolute;
    right: 15px;
    bottom: 0;
    left: 15px;

    height: 3px;

    background: var(--3ng-crimson);

    transform: scaleX(0);
    transition: transform 0.18s ease;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.main-nav a:hover::after {
    transform: scaleX(1);
}


/* --------------------------------------------------
   MOBILE NAVIGATION
-------------------------------------------------- */

.mobile-menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    padding: 10px;

    background: transparent;

    border: 1px solid rgba(255, 255, 255, 0.25);

    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;

    width: 100%;
    height: 2px;

    margin: 5px 0;

    background: var(--3ng-white);
}

.mobile-nav {
    display: none;

    background: var(--3ng-navy);

    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav a {
    display: block;

    padding: 16px 26px;

    color: var(--3ng-white);

    font-size: 0.9rem;
    font-weight: 700;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-nav.is-open {
    display: block;
}


/* --------------------------------------------------
   THEME TOGGLE
-------------------------------------------------- */

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 7px;

    flex-shrink: 0;

    padding: 8px 11px;

    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;

    color: var(--3ng-white);

    font-size: 0.72rem;
    font-weight: 700;

    cursor: pointer;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.theme-toggle__icon {
    font-size: 0.9rem;
}


/* --------------------------------------------------
   SECTION HEADINGS
-------------------------------------------------- */

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;

    color: var(--heading-color);

    font-size: 1.55rem;
    line-height: 1.1;
}

.section-link {
    padding-bottom: 2px;

    color: var(--accent-color);

    font-size: 0.72rem;
    font-weight: 800;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}

.section-link:hover {
    text-decoration: underline;
}


/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */

.site-footer {
    background: #11141A;
    color: var(--3ng-silver);
    border-top: 3px solid var(--3ng-crimson);
}

.site-footer__inner {
    width: min(calc(100% - 64px), var(--page-width));
    margin-inline: auto;
}

.site-footer__top {
    min-height: 92px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
}

.site-footer__logo {
    display: block;
    width: auto;
    height: 66px;
    object-fit: contain;
}

.site-footer__description {
    margin: 0;
    color: var(--3ng-grey);
    font-size: 0.76rem;
}

.footer-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 26px;

    padding: 0;

    border: 0;
}

.footer-nav a {
    color: var(--3ng-silver);

    font-size: 0.80rem;
    font-weight: 700;
}

.footer-nav a:hover {
    color: var(--3ng-white);
}

.site-footer__bottom {
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;

    border-top: 1px solid #292D35;

    color: var(--3ng-grey);

    font-size: 0.73rem;
    line-height: 1.5;
}

.site-footer__bottom p {
    margin: 0;
}

.site-footer__bottom p:last-child {
    text-align: right;
}


/* --------------------------------------------------
   STANDARD PAGE HEADER
-------------------------------------------------- */

.page-header {
    background: var(--surface-primary);
    border-bottom: 1px solid var(--border-primary);
}

.page-header__inner {
    width: min(calc(100% - 64px), var(--page-width));
    margin-inline: auto;
    padding: 34px 0 30px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.page-header h1 {
    margin: 4px 0 8px;

    color: var(--text-primary);
    font-size: 2.25rem;
    line-height: 1.1;
}

.page-header__description {
    margin: 0;

    color: var(--text-secondary);
    font-size: 0.95rem;
}

.page-header__controls {
    display: flex;
    gap: 16px;
}


/* --------------------------------------------------
   STANDARD FILTER CONTROLS
-------------------------------------------------- */

.filter-control {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.filter-control label,
.page-search label {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.filter-control select,
.page-search input {
    height: 44px;

    padding: 0 14px;

    background: var(--surface-secondary);
    color: var(--text-primary);

    border: 1px solid var(--border-primary);

    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
}

.filter-control select {
    min-width: 150px;
}


/* --------------------------------------------------
   STANDARD PAGE CONTENT
-------------------------------------------------- */

.page-content {
    background: var(--page-background);
}

.page-content > .container {
    width: min(calc(100% - 64px), var(--page-width));
    margin-inline: auto;
    padding: 38px 0 64px;
}


/* --------------------------------------------------
   PAGE TOOLBAR
-------------------------------------------------- */

.page-toolbar {
    margin-bottom: 40px;

    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.page-search {
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 7px;
}

.page-search input {
    width: 100%;
}


/* --------------------------------------------------
   INTERACTIVE CONTROL SURFACES
-------------------------------------------------- */

.filter-control select,
.page-search input {
    background: var(--surface-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 2px;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}

.filter-control select:hover,
.page-search input:hover {
    border-color: var(--text-secondary);
}

.filter-control select:focus,
.page-search input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.page-search input::placeholder {
    color: var(--text-secondary);
    opacity: 0.75;
}


/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

@media (max-width: 1100px) {

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        margin-left: auto;
    }

}

@media (max-width: 700px) {

    .container,
    .site-header__inner,
    .site-footer__inner,
    .page-header__inner,
    .page-content > .container {
        width: calc(100% - 40px);
    }

    .site-header__inner {
        min-height: 66px;
    }

    .site-footer__brand {
        align-items: flex-start;
    }

    .footer-nav {
        gap: 16px 22px;
    }

    .site-footer__bottom {
        flex-direction: column;
        gap: 10px;
    }

    .site-footer__bottom p:last-child {
        text-align: left;
    }

    .page-header__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
    }

    .page-header__controls {
        width: 100%;
    }

    .page-header__controls .filter-control {
        width: 100%;
    }

    .page-header__controls .filter-control select {
        width: 100%;
    }

    .page-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .page-toolbar .filter-control,
    .page-toolbar .filter-control select {
        width: 100%;
    }

}


/* --------------------------------------------------
   GLOBAL BACK TO TOP
-------------------------------------------------- */

.back-to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 900;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;

    width: 58px;
    height: 58px;

    padding: 0;

    background: var(--surface-primary);
    color: var(--text-primary);

    border: 1px solid var(--border-primary);
    border-top: 3px solid var(--3ng-crimson);

    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease,
        border-color 0.18s ease;
}

.back-to-top span:first-child {
    font-size: 1.05rem;
    line-height: 1;
}

.back-to-top:hover {
    border-color: var(--text-secondary);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 700px) {

    .back-to-top {
        right: 18px;
        bottom: 18px;

        width: 52px;
        height: 52px;
    }

}

