/*
    Theme Name: Legacy Companies
    Author: Borderline
    Author URI: www.bordrlne.com
    Version: 1
    Date Updated: 03/02/2026
*/

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; scroll-padding-top: 10em; scrollbar-gutter: stable; }
body {
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-color: var(--light-grey);
}
img, picture, video, canvas, svg { display: block; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
:root {
  overscroll-behavior: none;
}
/* ─── Variables ──────────────────────────────────────────────────────────── */
:root {
    --legacy-red: #E22726;
    --legacy-grey: #6c6869;
    --legacy-medgrey: #353233;
    --legacy-darkgrey: #231F20;
    --light-grey: #F6F6F6;
    --black: #000000;
    --white: #ffffff;
    
}
/* ─── Misc fixes ─────────────────────────────────────────────────────────── */
input { border-radius: 0; appearance: none; }  /* iPhone form fix */
div { transition: all .25s ease-out; }          /* resize transition */

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1 {
    font-family: roc-grotesk, sans-serif;
    font-weight: 700;
    font-size: clamp(50px, 4.5vw, 120px);
    line-height: clamp(50px, 4.5vw, 120px);
    color: var(--white);
    text-transform: uppercase;
    text-align: center;
}
h2 {
    font-family: roc-grotesk, sans-serif;
    font-weight: 700;
    font-size: clamp(38px, 4vw, 100px);
    line-height: clamp(50px, 3.5vw, 100px);
    letter-spacing: 1px;
    color: var(--black);
    text-transform: uppercase;
}
h3 {
    font-family: roc-grotesk, sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 22px;
    letter-spacing: 2px;
    color: var(--legacy-grey);
    text-transform: uppercase;
}
h4 {
    font-family: roc-grotesk, sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 24px;
    letter-spacing: 2px;
    color: var(--legacy-red);
    text-transform: uppercase;
}
h5 {
    font-family: roc-grotesk, sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 22px;
    letter-spacing: 2px;
    color: var(--legacy-red);
    text-transform: uppercase;
}
p {
    font-family: roc-grotesk, sans-serif;
    font-weight: 400;
    font-size: clamp(18px, 1.4vw, 22px);
    line-height: 1.4em;
    color: var(--legacy-grey);
}
a {
    font-family: roc-grotesk, sans-serif;
    font-weight: 400;
    font-size: clamp(18px, 1vw, 22px);
    line-height: 1.15em;
    text-decoration: none;
    color: var(--white);
}
li {
    font-family: roc-grotesk, sans-serif;
    font-weight: 400;
    font-size: clamp(18px, 3vw, 22px);
    line-height: clamp(18px, 3vw, 22px);
    text-decoration: none;
    color: var(--legacy-grey);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.call-cta-btn {
    border-radius: 4px;
    padding: 10px 20px;
    white-space: nowrap;
    text-transform: uppercase;
    background-color: var(--legacy-red);
    color: var(--white);
}
.call-cta-btn a {
    color: var(--white) !important;
    font-weight: 500;
}
.contact-cta-btn {
    display: inline-block;
    padding: 15px 25px;
    border-radius: 4px;
    color: var(--white);
    background-color: var(--legacy-red);
    font-family: roc-grotesk, sans-serif;
    font-weight: 500;
    font-size: clamp(16px, 1vw, 20px);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    clip-path: inset(0 round 4px);
    z-index: 0;
}
.solid-btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--legacy-red);
    color: var(--white);
    font-family: roc-grotesk, sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    position: relative;
    clip-path: inset(0 round 4px);
    z-index: 0;
}
.contact-cta-btn::before,
.solid-btn::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: var(--legacy-medgrey);
    transform: translateX(-100%);
    transition: transform .35s ease;
    z-index: -1;
}
.contact-cta-btn:hover::before,
.solid-btn:hover::before {
    transform: translateX(0);
}

/* ─── Header / Nav ───────────────────────────────────────────────────────── */
.nav { width: 100%; z-index: 10; }
.scroll-pause { overflow: hidden; }
.mobile-nav-toggle { display: none; }

#scroll-header {
    padding-bottom: .5em;
    transition: background-color .25s ease;
}

.mobile-nav-toggle {
    color: white;
    background: none;
}

/* Animated hamburger → X */
.nav-icon__line {
    transition: transform .3s ease, opacity .3s ease;
    transform-box: fill-box;
    transform-origin: center;
}
.menu-x .nav-icon__line--top { transform: translateY(6px) rotate(45deg); }
.menu-x .nav-icon__line--mid { opacity: 0; transform: scaleX(0); }
.menu-x .nav-icon__line--bot { transform: translateY(-6px) rotate(-45deg); }
.menu-x { color: black; }

/* Black variant (contact page) */
.menu-burger-black { color: black; }

/* Invert when header scrolls to white */
.mobile-nav-toggle.invert {
    filter: none;
    color: black;
}

.invert { filter: invert(100%); }

header {
    position: absolute;
    top: 0;
    width: 100%;
    border-top: 18px solid var(--legacy-darkgrey);
}
header > div {
    display: flex;
    align-items: center;
}
.header ul {
    display: flex;
    gap: .5em;
    padding: 0;
}
.header li {
    padding: .5em;
    list-style-type: none;
    white-space: nowrap;
}
.header li a { font-weight: 500; transition: color .2s ease; }
.header li a:hover { color: var(--legacy-red); }

.nav-container { margin: 1.2em 4.5em; overflow: hidden; position: relative; z-index: 1; }

.logo img,
.footer-logo img,
.inverted-logo img { max-width: 16em; }

.icon { display: none; }
.icon img { max-width: 50px; }

.gradient {
    background-image: linear-gradient(rgba(0,0,0,.2), rgba(0,0,0,0));
    background-color: transparent;
    background-repeat: no-repeat;
}
.transparent { background: none; }
.white { background-color: var(--white); }
.transparent .header a,
.white .header a { color: var(--black); }

.fixed { position: fixed !important; }
.hidden { display: none !important; }
.sr-only { display: none; }

/* ─── Page Hero ──────────────────────────────────────────────────────────── */
.page-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 35vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.page-hero__overlay {
    position: absolute;
    inset: 0;
}
.page-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 4em 4.5em;
}
.page-hero__content h1 {
    margin: 0;
}

/* ─── Body Content ───────────────────────────────────────────────────────── */
.body-content {
    padding: 5em 4.5em;
}
.body-content__inner {
    max-width: 900px;
    margin: 0 auto;
}
.body-content__inner h1 { color: var(--black); }
.body-content__inner h2 { color: var(--black); }
.body-content__inner h3,
.body-content__inner h4,
.body-content__inner h5,
.body-content__inner h6 { margin-bottom: .4em; }
.body-content__inner p { margin-bottom: 1.2em; }
.body-content__inner a { color: var(--legacy-red); font-size: inherit; transition: opacity .2s ease; }
.body-content__inner a:hover { opacity: .75; }
.body-content__inner ul,
.body-content__inner ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.body-content__inner li { font-family: roc-grotesk, sans-serif; font-size: clamp(18px, 1.4vw, 22px); line-height: 1.6em; color: var(--legacy-grey); }
.body-content__inner img { max-width: 100%; height: auto; display: block; margin: 1.5em 0; }
.body-content__inner blockquote { border-left: 4px solid var(--legacy-red); margin: 1.5em 0; padding: .75em 1.5em; }
.body-content__inner blockquote p { font-style: italic; margin-bottom: 0; }
.body-content__inner hr { border: none; border-top: 1px solid var(--light-grey); margin: 2em 0; }

/* ─── Post Grid ──────────────────────────────────────────────────────────── */
.post-grid {
    padding: 5em 4.5em;
}
.post-grid__inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5em;
    max-width: 1400px;
    margin: 0 auto;
}
.post-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}
.post-card__image-link {
    display: block;
}
.post-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--light-grey);
}
.post-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.5em;
    gap: .75em;
}
.post-card__body h3 {
    font-size: clamp(18px, 1.2vw, 22px);
    line-height: 1.25em;
    letter-spacing: .5px;
    color: var(--legacy-darkgrey);
    text-transform: uppercase;
}
.post-card__body h3 a {
    color: inherit;
    font-size: inherit;
    transition: color .2s ease;
}
.post-card__body h3 a:hover {
    color: var(--legacy-red);
}
.post-card__body p {
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.6em;
    color: var(--legacy-grey);
    flex: 1;
}
.post-card__link {
    display: inline-block;
    font-family: roc-grotesk, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--legacy-red);
    transition: opacity .2s ease;
    margin-top: auto;
}
.post-card__link:hover {
    opacity: .7;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
    padding: 120px 0;
    overflow: hidden;
    background-color: var(--legacy-darkgrey);
}
.footer-inner {
    width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
footer p, footer li { color: var(--white); }
footer h5 { margin-bottom: 1em; }
footer h5:first-of-type { margin-top: 0 !important; }
footer ul { padding-left: 0; list-style-type: none; }

.footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: .75em 2em;
}
.footer li { white-space: nowrap; }
.footer li a {
    color: var(--white);
    font-weight: 500;
    transition: color .2s;
}
.footer li a:hover { color: var(--legacy-red); }

footer .footer-copy {
    color: var(--legacy-grey);
    font-size: 14px;
    text-align: center;
    padding-top: 3em;
    width: 90%;
    margin: 0 auto;
    border-top: 1px solid #3a3637;
    margin-top: 3em;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
#hero {
    position: relative;
    width: 100%;
    height: 90vh;
}
.hero-scroll {
    position: absolute;
    bottom: 2.5em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9;
}
.hero-scroll svg {
    width: 2.5em;
    height: 2.5em;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
}
.hero-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    max-height: 100%;
}
.hero-content {
    width: 100%;
    max-width: 90%;
    position: relative;
    top: 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    gap: 1rem;
    color: var(--white);
    z-index: 9;
}
.hero-content > h1 {
    text-align: left;
}
.hero-content > p {
    max-width: 70%;
    line-height: 1.15em;
    text-align: left;
    color: var(--white);
}
.hero-btns {
    display: flex;
    border-radius: 4px;
}
.hero-btns a { font-weight: 500; }

.vid-overlay {
    background: linear-gradient(rgba(0,0,0,.4), rgba(0,0,0,.4));
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 8;
}
.vid-poster {
    position: absolute;
    height: 100%;
    top: 0;
    width: 100%;
    bottom: 0;
    z-index: 7;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
#bgvideo {
    min-height: 100%;
    min-width: 100%;
    width: 100vw;
    object-fit: cover;
    position: absolute;
    bottom: 0;
    right: 0;
    transform: translateX(calc((100% - 100vw) / 2));
    z-index: 6;
}

/* ─── 50/50 Sections ─────────────────────────────────────────────────────── */
.section-fifty {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 580px;
}
.section-fifty__image {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.section-fifty__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 5rem 6rem;
    background-color: var(--light-grey);
}
.section-fifty:nth-of-type(even) .section-fifty__content {
    background-color: var(--light-grey);
}
.section-fifty__content .solid-btn {
    align-self: flex-start;
    margin-top: .5rem;
}
/* Reverse: image flips to the right */
.section-fifty--reverse .section-fifty__image { order: 2; }
.section-fifty--reverse .section-fifty__content { order: 1; }

/* ─── Image Banner ───────────────────────────────────────────────────────── */
.image-banner {
    position: relative;
    width: 100%;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.image-banner--parallax { background-attachment: fixed; }
.image-banner__overlay {
    position: absolute;
    inset: 0;
    background: rgba(35, 31, 32, 0.65);
    z-index: 1;
}
.image-banner__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 5rem 2rem;
    max-width: 65%;
    text-align: center;
}
.image-banner__content h2 {
    color: var(--white);
    line-height: 1.1em;
}
.image-banner__content p {
    color: var(--white);
    opacity: .9;
}

/* ─── 404 ────────────────────────────────────────────────────────────────── */
.error-404 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--legacy-darkgrey);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.error-404__overlay {
    position: absolute;
    inset: 0;
    background: rgba(35, 31, 32, 0.65);
    z-index: 0;
}
.error-404__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 4em 2em;
}
.error-404__content h1 {
    font-size: clamp(120px, 15vw, 280px);
    line-height: 1;
    color: var(--white);
    margin-bottom: 0.1em;
}
.error-404__content p {
    max-width: 480px;
    margin: 0 auto 2em;
    color: var(--white);
    opacity: .9;
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Hero – page-load entry */
.hero-content h1 { animation: fadeLeft .9s ease both; }
.hero-content p  { animation: fadeLeft .9s .15s ease both; }
.hero-btns       { animation: fadeLeft .9s .3s ease both; }

/* Scroll-reveal: initial hidden state (body.js-anim added by JS) */
.js-anim .section-fifty__image {
    opacity: 0;
    transition: opacity 1.1s ease;
    will-change: opacity;
}
.js-anim .section-fifty__content {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 1.1s .25s ease, transform 1.1s .25s ease;
    will-change: opacity, transform;
}
.js-anim .section-fifty--reverse .section-fifty__content {
    transform: translateX(-50px);
}
.js-anim .image-banner__content {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 1.1s ease, transform 1.1s ease;
    will-change: opacity, transform;
}

/* Visible state */
.js-anim .section-fifty.is-visible .section-fifty__image,
.js-anim .section-fifty.is-visible .section-fifty__content,
.js-anim .image-banner.is-visible .image-banner__content {
    opacity: 1;
    transform: none;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-content h1,
    .hero-content p,
    .hero-btns { animation: none; opacity: 1; transform: none; }

    .js-anim .section-fifty__image,
    .js-anim .section-fifty__content,
    .js-anim .image-banner__content { opacity: 1; transform: none; transition: none; }
}

/* ─── Media Queries ──────────────────────────────────────────────────────── */
@media (min-width: 65em) {
    .header {
        display: flex !important;
        align-items: center;
        margin-left: auto;
        opacity: 1;
    }
}

@media (max-width: 95em) {
    .nav-container .logo   { display: none !important; }
    .inverted-logo          { display: none !important; }
    .icon                   { display: block; z-index: 99999; }
    .call-cta-btn           { display: none; }
}

@media (max-width: 65em) {
    #scroll-header {
        z-index: 1000;
        transition: background-color .35s ease, min-height .4s ease;
    }
    body.nav-open #scroll-header {
        min-height: 100dvh;
        background-color: var(--white) !important;
        background-image: none !important;
    }

    .call-cta-btn {
        display: block !important;
        width: 100%;
        text-align: center;
        padding: 20px !important;
    }

    /* Nav links fade in on top of the expanding header background */
    .header {
        display: block !important;
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: transparent;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }
    body.nav-open .header {
        opacity: 1;
        pointer-events: auto;
        transition: opacity .2s ease .25s;
    }

    #bgvideo { height: 100%; }

    .header li { padding: .1em 0; }
    .header li a {
        display: inline-block;
        color: var(--black) !important;
        font-size: clamp(20px, 5.5vw, 36px) !important;
        font-weight: 600 !important;
        letter-spacing: -.01em;
        transition: color .2s ease !important;
    }
    .header li a:hover { color: var(--legacy-red) !important; }
    .header ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        text-align: left;
        gap: 0.5em !important;
        margin: 0 !important;
        padding: 5em 2.5em 2.5em;
        list-style: none;
        height: 100vh;
    }
    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-left: 2.5em;
        margin-right: 1.25em;
        z-index: 2000;
    }
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        border: 0;
        width: 2rem;
        height: 2rem;
        flex-shrink: 0;
        z-index: 9999;
        cursor: pointer;
    }
    .mobile-nav-toggle svg {
        width: 100%;
        height: 100%;
    }
    .header li:last-child { margin-right: 0 !important; }

    #hero {
        height: 75vh;
        display: flex;
        padding-top: 3em;
    }
    .hero-content { top: auto; gap: 2.5em; }
    .hero-content > p { max-width: 85%; }

    .section-fifty {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    /* On single-column layout, side-slide breaks alignment — switch to fade-up */
    .js-anim .section-fifty__content,
    .js-anim .section-fifty--reverse .section-fifty__content {
        transform: translateY(20px);
    }
    .section-fifty__image {
        height: 380px;
        order: 2;
    }
    .section-fifty__content {
        order: 1;
        padding: 3.5rem 2.5rem;
    }

    .image-banner--parallax { background-attachment: scroll; }
    .image-banner__content { max-width: 90%; }

    .footer-inner {
        flex-direction: column;
        gap: 2em;
        text-align: center;
    }
    .footer ul {
        flex-direction: column;
        gap: .75em;
    }
    .footer-logo img { margin: 0 auto; }
}

@media (max-width: 75em) {
    .post-grid__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 35em) {
    .post-grid { padding: 3em 1.5em; }
    .post-grid__inner { grid-template-columns: minmax(0, 1fr); }
    p { line-height: 1.4em; }
    h2 {
        font-size: clamp(36px, 7vw, 60px);
        text-align: center;
        padding: 0 .5rem;
    }
    h1 {
        font-size: clamp(32px, 8vw, 80px);
        line-height: 1.2em;
        letter-spacing: 2px;
    }
    .hero-content h1 {
        font-size: clamp(28px, 6vw, 60px);
        line-height: 1.25em;
    }
    .hero-content { gap: 1em; }
    .hero-content p { width: 95%; }

    .section-fifty__content { padding: 2.5rem 1.5rem; }
    .image-banner__content { max-width: 95%; padding: 3rem 1rem; }
}

@media (max-height: 50em) {
    .hero-content p { display: none; }
}
@media (max-height: 40em) {
    .hero-content     { display: none; }
    .call-cta-btn     { display: none !important; }
    .header ul        { gap: 1em !important; }
}
