:root {
    --legacy-navy: #000f1f;
    --legacy-navy-soft: #05233b;
    --legacy-yellow: #ffca1c;
}

body {
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

/* Old ChipServis header character, isolated from the modern content below. */
.legacy-header {
    position: relative;
    z-index: 120;
    color: #fff;
    background: linear-gradient(180deg, #000914 0%, #00172a 100%);
}

.home .legacy-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0, 10, 20, .92) 0%, rgba(0, 15, 31, .48) 100%);
}

.admin-bar.home .legacy-header {
    top: 32px;
}

.legacy-header__top {
    min-height: 116px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    border-bottom: 2px solid rgba(255, 202, 28, .76);
}

.legacy-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.legacy-brand__mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 15px;
    background: var(--legacy-yellow);
    color: var(--legacy-navy);
    font-weight: 800;
    letter-spacing: -.04em;
    box-shadow: 0 12px 30px rgba(255, 202, 28, .22);
}

.legacy-brand__text {
    display: grid;
    line-height: 1.1;
}

.legacy-brand__text strong {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -.02em;
}

.legacy-brand__text small {
    margin-top: 6px;
    color: rgba(255,255,255,.72);
    font-size: 12px;
    font-weight: 500;
}

.legacy-brand__logo .custom-logo-link {
    display: block;
}

.legacy-brand__logo img {
    width: auto;
    max-height: 64px;
}

.legacy-header__contacts {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    min-width: 0;
}

.legacy-contact,
.legacy-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.94);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.legacy-contact__icon {
    color: #fff;
    font-size: 18px;
    line-height: 1;
}

.legacy-phone {
    display: grid;
    gap: 3px;
}

.legacy-phone > a:first-child {
    color: #fff;
    font-weight: 800;
}


.legacy-phone__secondary {
    color: rgba(255,255,255,.86);
    font-size: 12px;
    font-weight: 650;
}

.legacy-phone__callback {
    color: var(--legacy-yellow);
    font-size: 12px;
    font-weight: 700;
}

.legacy-header__navline {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.legacy-nav__list,
.legacy-mobile-menu__list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.legacy-nav__list {
    display: flex;
    align-items: center;
    gap: 30px;
}

.legacy-nav__list a {
    display: block;
    padding: 12px 0;
    color: rgba(255,255,255,.92);
    font-size: 15px;
    font-weight: 700;
    transition: color .18s ease;
}

.legacy-nav__list a:hover,
.legacy-nav__list .current-menu-item > a {
    color: var(--legacy-yellow);
}

.legacy-menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    color: #fff;
}

.legacy-menu-toggle > span:not(.screen-reader-text) {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 20px;
    background: currentColor;
}

.legacy-mobile-menu {
    border-top: 1px solid rgba(255,255,255,.08);
    background: #001426;
}

.legacy-mobile-menu__list {
    padding-block: 12px 20px;
}

.legacy-mobile-menu__list a {
    display: block;
    padding: 13px 0;
    color: #fff;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Old top block: same atmosphere, but with a straight, clean bottom edge. */
.legacy-hero {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    color: #fff;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.legacy-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 76% 28%, rgba(255,255,255,.10), transparent 18%),
        linear-gradient(180deg, transparent 60%, rgba(0,15,31,.28) 100%);
}

.legacy-hero__inner {
    position: relative;
    z-index: 2;
    min-height: 720px;
    display: flex;
    align-items: flex-end;
    padding-top: 210px;
    padding-bottom: 95px;
}

.legacy-hero__content {
    max-width: 690px;
}

.legacy-hero__kicker {
    margin: 0 0 18px;
    color: var(--legacy-yellow);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.legacy-hero h1 {
    margin: 0;
    font-size: clamp(46px, 5.2vw, 76px);
    line-height: .98;
    letter-spacing: -.045em;
    text-transform: uppercase;
    text-shadow: 0 10px 34px rgba(0,0,0,.34);
}

.legacy-hero__lead {
    max-width: 590px;
    margin: 26px 0 0;
    color: rgba(255,255,255,.90);
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 600;
    line-height: 1.6;
}

.legacy-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 30px;
}

.legacy-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 28px;
    color: var(--legacy-navy);
    background: var(--legacy-yellow);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    box-shadow: 0 14px 28px rgba(255, 202, 28, .18);
}

.legacy-button::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 0;
    width: 18px;
    height: 100%;
    border-top: 2px solid var(--legacy-yellow);
    border-right: 2px solid var(--legacy-yellow);
    border-bottom: 2px solid var(--legacy-yellow);
    transform: skewX(12deg);
}

.legacy-button:hover {
    background: #fff;
}

.legacy-hero__phone {
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: var(--legacy-yellow);
    text-underline-offset: 5px;
}

/* Everything below the hero stays in the modern design. */
.home #services {
    padding-top: 88px;
}

.home .section-heading h2,
.home .feature-card h3,
.home .service-card h3,
.home .case-card h3,
.home .contact-band h2 {
    font-family: inherit;
}

/* Internal pages: old header on top, current modern templates below. */
.page-shell {
    padding-top: 26px;
}

@media (max-width: 1050px) {
    .legacy-header__contacts {
        gap: 16px;
    }

    .legacy-contact {
        max-width: 230px;
        font-size: 12px;
    }
}

@media (max-width: 880px) {
    .legacy-header__top {
        min-height: 82px;
    }

    .legacy-header__contacts,
    .legacy-nav {
        display: none;
    }

    .legacy-header__navline {
        position: absolute;
        top: 17px;
        right: 20px;
        width: auto;
        min-height: 48px;
        padding: 0;
    }

    .legacy-menu-toggle {
        display: block;
    }

    .legacy-hero,
    .legacy-hero__inner {
        min-height: 650px;
    }

    .legacy-hero__inner {
        padding-top: 160px;
        padding-bottom: 70px;
    }
}

@media (max-width: 782px) {
    .admin-bar.home .legacy-header {
        top: 46px;
    }
}

@media (max-width: 620px) {
    .legacy-header__top {
        border-bottom-width: 1px;
    }

    .legacy-brand__mark {
        width: 48px;
        height: 48px;
    }

    .legacy-brand__text strong {
        font-size: 17px;
    }

    .legacy-brand__text small {
        font-size: 10px;
    }

    .legacy-hero {
        background-position: 60% center;
    }

    .legacy-hero,
    .legacy-hero__inner {
        min-height: 590px;
    }

    .legacy-hero__inner {
        align-items: flex-end;
        padding-top: 135px;
        padding-bottom: 56px;
    }

    .legacy-hero h1 {
        font-size: clamp(38px, 12vw, 54px);
    }

    .legacy-hero__lead {
        font-size: 17px;
    }

    .legacy-hero__actions {
        gap: 18px;
    }
}
