/*
Theme Name: CFG Fast
Theme URI: https://computersfirstgroup.co.uk/
Author: Computers First Group
Description: Fast standalone recreation of the Computers First Group homepage. Requires PHP 8.3 or newer. No Brooklyn, Revolution Slider, or page builder required.
Version: 1.4.2
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 8.3
Text Domain: cfg-fast
*/

@font-face {
    font-family: "Raleway Medium";
    src: url("assets/fonts/raleway-medium.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Alegreya Sans SC";
    src: url("assets/fonts/alegreya-sans-sc-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --gold: #ffbf00;
    --ink: #131416;
    --header: 76px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fff;
    color: #151515;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    line-height: 1.55;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

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

.container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.screen-reader {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex: 0 0 16px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: var(--header);
    background: var(--ink);
    box-shadow: 0 5px 5px -4px rgba(0, 0, 0, 0.1);
    transition: height 0.25s ease;
}

.site-header.is-shrunk {
    height: 58px;
}

.nav-row,
.nav-inner,
.site-nav,
.primary-nav,
.primary-nav li,
.primary-nav a {
    height: 100%;
}

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    line-height: 0;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.logo img {
    width: 340px;
    height: auto;
    transition: width 0.25s ease;
}

.site-header.is-shrunk .logo img {
    width: 230px;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.nav-toggle .icon {
    width: 22px;
    height: 22px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.primary-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-nav li {
    display: flex;
    align-items: center;
}

.primary-nav a {
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    text-transform: uppercase;
    font-family: "Raleway Medium", "Segoe UI", sans-serif;
    font-size: 14px;
    letter-spacing: 0.06em;
    line-height: 1;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
    color: #fff;
}

.primary-nav li + li::before {
    content: "·";
    display: block;
    color: rgba(255, 255, 255, 0.45);
    font-size: 16px;
    line-height: 1;
}

.nav-ctas {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    color: var(--gold);
    background: transparent;
    font-family: "Raleway Medium", "Segoe UI", sans-serif;
    font-size: 13px;
    letter-spacing: 0.02em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, height 0.25s ease;
}

.nav-cta .icon {
    width: 14px;
    height: 14px;
}

.nav-cta-solid,
.nav-cta:hover,
.nav-cta:focus-visible {
    background: var(--gold);
    color: #151515;
}

.site-header.is-shrunk .nav-cta {
    height: 32px;
    padding: 0 12px;
}

.hero {
    position: relative;
    height: 100vh;
    min-height: 620px;
    background-color: #141618;
    overflow: hidden;
}

.hero-video,
.hero-shade,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-slide {
    top: var(--header);
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.cap {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%, -50%);
    margin: 0;
    text-align: center;
    font-family: "Alegreya Sans SC", "Times New Roman", serif;
    font-weight: 700;
    font-size: clamp(34px, 4.8vw, 64px);
    line-height: 1.05;
    color: #fff;
    opacity: 0;
}

.we,
.svc {
    display: block;
}

.svc {
    color: var(--gold);
}

.hero-slide.is-active .cap {
    animation: cfg-cap-in 0.8s ease forwards;
}

.hero-slide.is-active .cap:nth-child(1) { animation-delay: 0.6s; }
.hero-slide.is-active .cap:nth-child(2) { animation-delay: 1.14s; }
.hero-slide.is-active .cap:nth-child(3) { animation-delay: 2.41s; }

@keyframes cfg-cap-in {
    from {
        opacity: 0;
        transform: translate(calc(-50% - 40px), -50%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.hero-arrow {
    position: absolute;
    top: calc(var(--header) + (100% - var(--header)) / 2);
    z-index: 3;
    transform: translateY(-50%);
    width: 54px;
    height: 72px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.hero-arrow .icon {
    width: 34px;
    height: 34px;
}

.hero-prev { left: 10px; }
.hero-next { right: 10px; }

.hero-arrow:hover {
    color: var(--gold);
}

.hero-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    height: 3px;
    background: rgba(255, 191, 0, 0.25);
}

.hero-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--gold);
}

@keyframes cfg-progress {
    from { width: 0; }
    to { width: 100%; }
}

.office-map {
    display: block;
    width: 100%;
    height: auto;
}

.contact {
    position: relative;
    color: #fff;
    background-color: #141618;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 120px 0 150px;
}

.contact::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("assets/images/overlay-pattern.png") repeat;
    pointer-events: none;
}

.contact .container {
    position: relative;
    z-index: 1;
}

.contact-head {
    max-width: 840px;
    margin: 0 auto 28px;
    text-align: center;
    overflow: hidden;
}

.contact-title {
    margin: 0 0 12px;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.25;
}

.contact-title span {
    position: relative;
    display: inline-block;
    padding: 0 20px;
}

.contact-title span::before,
.contact-title span::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 1160px;
    height: 9px;
    margin-top: -4.5px;
    background: url("assets/images/divider1.png") repeat-x center;
}

.contact-title span::before { right: 100%; }
.contact-title span::after { left: 100%; }

.contact-lead {
    margin: 0;
    font-size: 19px;
    line-height: 1.6;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.location-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 40px;
}

.location-card h3,
.contact-form h3 {
    margin: 0 0 14px;
    color: var(--gold);
    font-size: 22px;
    font-weight: 400;
}

.location-card ul {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
}

.location-card li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 1.45;
}

.location-card li .icon {
    margin-top: 3px;
}

.location-card a {
    color: #fff;
    text-decoration: none;
}

.location-card a:hover {
    color: var(--gold);
}

.contact-form h3 {
    margin-bottom: 16px;
}

.contact-form .wpcf7-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
}

.contact-form .wpcf7-form > p,
.contact-form .wpcf7-response-output {
    grid-column: 1 / -1;
}

.contact-form .grid-50 {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.contact-form .wpcf7-form p {
    display: block;
    width: 100%;
    margin: 0 0 16px;
}

.contact-form label,
.contact-form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    font-size: 16px;
}

.contact-form label br {
    display: none;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    display: block;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    margin-top: 8px;
    padding: 10px 12px;
    font-size: 16px;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 191, 0, 0.49);
    border-radius: 0;
    box-shadow: none;
}

.contact-form input[type="hidden"] {
    display: none;
}

.contact-form input,
.contact-form select {
    height: 46px;
}

.contact-form select {
    color-scheme: dark;
}

.contact-form textarea {
    height: 130px;
    min-height: 130px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.contact-form input.wpcf7-submit {
    width: auto !important;
    height: auto;
    margin-top: 0;
    padding: 12px 18px;
    border: 0;
    background: #151515;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.contact-form input.wpcf7-submit:hover {
    background: var(--gold);
    color: #151515;
}

.contact-form .wpcf7-not-valid-tip {
    display: block;
    margin-top: 4px;
    color: var(--gold);
    font-size: 14px;
}

.contact-form .wpcf7-response-output {
    margin: 8px 0 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 191, 0, 0.5) !important;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 16px;
}

.contact-form .wpcf7-spinner {
    margin: 8px 0 0 8px;
}

.form-note {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 191, 0, 0.5);
}

.site-footer {
    background: #fff;
    color: #151515;
    text-align: center;
    padding: 36px 0;
}

.site-footer p {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #151515;
    color: #fff;
    text-decoration: none;
}

.to-top.is-visible {
    display: flex;
}

.to-top .icon {
    width: 16px;
    height: 16px;
}

.page-main {
    padding: calc(var(--header) + 48px) 0 80px;
    min-height: 70vh;
}

.page-main h1 {
    margin: 0 0 16px;
    font-size: 40px;
    font-weight: 400;
}

#contact {
    scroll-margin-top: 20px;
}

@media (max-width: 1100px) {
    .logo img,
    .site-header.is-shrunk .logo img {
        width: 240px;
    }

    .nav-cta span,
    .nav-cta {
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    :root {
        --header: 68px;
    }

    .logo img,
    .site-header.is-shrunk .logo img {
        width: 200px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--ink);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .site-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        height: auto;
        padding-bottom: 16px;
    }

    .primary-nav {
        flex-direction: column;
        align-items: stretch;
        height: auto;
    }

    .primary-nav li,
    .primary-nav a {
        height: auto;
    }

    .primary-nav a {
        min-height: 48px;
        padding: 0 20px;
    }

    .primary-nav li + li::before {
        display: none;
    }

    .nav-ctas {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 8px 20px 0;
    }

    .nav-cta {
        justify-content: center;
        height: 42px;
    }
}

@media (min-width: 801px) {
    .hero {
        background-image: url("assets/images/hero-poster.jpg");
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
    }

    .contact {
        background-image: url("assets/images/contact-bg.jpg");
    }
}

@media (max-width: 800px) {
    .hero {
        background-image: url("assets/images/hero-mobile.jpg");
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
    }

    .contact {
        padding: 72px 0 80px;
        background-image: url("assets/images/contact-bg-mobile.jpg");
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form .wpcf7-form {
        grid-template-columns: 1fr;
    }

    .location-card {
        padding: 28px 22px;
    }

    .hero {
        min-height: 560px;
    }

    .hero-slide {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 22px;
        padding: 96px 54px 48px;
    }

    .cap {
        position: static;
        transform: none;
    }

    .hero-slide.is-active .cap {
        animation-name: cfg-cap-in-mobile;
    }

    .contact-lead br {
        display: none;
    }
}

@keyframes cfg-cap-in-mobile {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-slide { transition: none; }
    .cap,
    .hero-slide.is-active .cap {
        animation: none;
        opacity: 1;
    }
}
