/* Mike's High Torque Auto Performance */

:root {
    --orange: #e49908;
    --gold: #feb737;
    --ink: #252525;
    --text: #464646;
    --body: #666;
    --header-bg: #212121;
    --panel: #2a2a2a;
    --header-h: 84px;
    --row-w: 80%;
    --row-max: 1180px;
    --gutter: 3%;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fff;
    color: var(--body);
    font: 500 14px/1.7em "Roboto", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, p, ul, figure {
    margin: 0;
}

h1, h2, h3, h4, h5 {
    padding-bottom: 10px;
    color: #333;
    font-family: "Oswald", Helvetica, Arial, sans-serif;
    font-weight: 700;
    line-height: 120%;
    text-transform: uppercase;
}

h1 { font-size: 50px; line-height: 56px; }
h2 { font-size: 40px; }
h3 { font-size: 30px; }
h4 { font-size: 24px; }
h5 { font-size: 20px; font-weight: 400; }

p {
    padding-bottom: 1em;
    font-size: 16px;
    line-height: 1.5em;
}

p:last-child {
    padding-bottom: 0;
}

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

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

ul {
    padding: 0;
    list-style: none;
}

/* Colour helpers */
.accent { color: var(--gold); }
.light { color: #fff; }
.dark { color: var(--text); }
.ink { color: var(--ink); }

/* Layout */
.container,
.row {
    width: var(--row-w);
    max-width: var(--row-max);
    margin: 0 auto;
}

.row {
    padding: 27px 0;
}

.section {
    padding: 50px 0;
}

.cols {
    display: flex;
    gap: var(--gutter);
}

.cols > * {
    flex: 1 1 0;
    min-width: 0;
}

.cols--2-3 > :first-child { flex-grow: 2; }
.cols--2-3 > :last-child { flex-grow: 3; }
.cols--flush { gap: 0; }
.row--flush-top { padding-top: 0; }
.center { text-align: center; }
.narrow { width: 70%; margin: 0 auto; }
.half { width: 48.5%; }

.parallax {
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

/* Header */
.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--header-bg);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo img {
    display: block;
    max-height: calc(var(--header-h) * 0.75);
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-menu a {
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    transition: opacity 0.4s;
}

.nav-menu a:hover {
    opacity: 0.7;
}

.nav-menu a[aria-current="page"] {
    color: var(--gold);
    opacity: 1;
}

.nav-toggle {
    display: none;
    width: 32px;
    height: 32px;
    padding: 6px 2px;
    border: 0;
    background: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 3px;
    margin-bottom: 5px;
    background: #fff;
}

.nav-toggle span:last-child {
    margin-bottom: 0;
}

/* Skewed button */
.btn {
    display: inline-block;
    position: relative;
    z-index: 0;
    padding: 10px 40px;
    border: 0;
    background: #0f0f0f;
    color: #fff;
    font: 600 17px/1.7em "Roboto", Helvetica, Arial, sans-serif;
    transform: skew(-21deg);
    cursor: pointer;
}

.btn::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: var(--orange);
    transition: transform 0.3s ease-out;
}

.btn:hover::before,
.btn:focus::before {
    transform: scale(0);
}

.btn > span {
    display: inline-block;
    transform: skew(21deg);
}

.btn--lg {
    padding: 15px 50px;
    font-size: 18px;
    text-transform: uppercase;
}

/* Home: hero slider */
.hero {
    position: relative;
    display: grid;
    margin-top: var(--header-h);
    background: #fff url("../img/hero.jpg") center / cover;
}

.slide {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s, visibility 0.8s;
}

.slide.is-active {
    opacity: 1;
    visibility: visible;
}

.slide .row {
    padding: 0;
}

.slide-content {
    box-sizing: content-box;
    width: 55%;
    padding: calc(16% + 44px) 3%;
}

.slide h5 { color: var(--orange); }
.slide h1 { margin: 10px 0; color: #fff; }

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 360px;
    display: flex;
    gap: 10px;
}

.slider-dots button {
    width: 37px;
    height: 3px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.slider-dots button.is-active {
    background: var(--orange);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 48px;
    line-height: 1;
    opacity: 0;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.slider-arrow--prev { left: -22px; }
.slider-arrow--next { right: -22px; }
.hero:hover .slider-arrow { opacity: 1; }
.hero:hover .slider-arrow--prev { left: 22px; }
.hero:hover .slider-arrow--next { right: 22px; }

/* Home: service tiles */
.tile {
    display: block;
    padding: 320px 20px 30px;
    background: center / cover;
    text-align: center;
    transition: transform 0.3s ease;
}

.tile:hover {
    transform: scale(1.1);
}

.tile h4 { color: #fff; }
.tile span { color: var(--gold); font-size: 16px; font-weight: 600; }

/* Home: reviews */
.reviews {
    background-image: url("../img/reviews-bg.jpg");
}

.reviews h2 { color: #fff; }

.review {
    padding: 30px;
    background: #fff;
    text-align: center;
}

.review blockquote {
    margin: 10px 0;
    padding-bottom: 1em;
    color: var(--text);
    font-size: 16px;
    font-style: italic;
    line-height: 1.5em;
}

.review cite {
    display: block;
    margin-top: 10px;
    color: var(--text);
    font-size: 16px;
    font-style: normal;
}

/* Home: gallery */
.gallery {
    display: grid;
    margin-bottom: 27px;
    grid-template-columns: repeat(4, 1fr);
}

.gallery img {
    display: block;
    width: 100%;
}

/* Inner pages: banner */
.page-banner {
    padding: calc(75px + var(--header-h)) 0 84px;
    background: center / cover;
    text-align: center;
}

.page-banner h1 {
    color: #fff;
    padding-bottom: 43px;
}

.breadcrumbs {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.breadcrumbs [aria-current] {
    color: var(--gold);
}

/* Body text */
.lead { margin-top: 10px; font-size: 18px; font-weight: 500; line-height: 25px; }

/* About */
.feature {
    position: relative;
    padding: 40px;
    background: var(--panel);
    color: #fff;
    text-align: center;
}

.feature--light {
    background: #fff;
    color: var(--text);
}

.feature h3 { color: inherit; }
.feature a { color: var(--gold); }
.feature--light a { color: var(--text); }

.feature a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.discounts {
    background-image: url("../img/about-parallax.jpg");
}

.discounts h2,
.discounts p {
    color: #fff;
}

.signup {
    display: flex;
    width: 50%;
    margin: 27px auto 0;
}

.signup input {
    width: 70%;
    height: 52px;
    padding: 10px;
    border: 1px solid #ccc;
    font: inherit;
    transform: skew(-21deg);
}

.signup .btn {
    width: 25%;
    padding-left: 0;
    padding-right: 0;
}

.brands {
    justify-content: center;
    align-items: center;
}

.brands > * {
    flex: 0 1 17.6%;
    text-align: center;
}

/* Services */
.services {
    display: flex;
    scroll-margin-top: var(--header-h);
    align-items: flex-start;
    padding-bottom: 80px;
}

.services aside {
    flex: 0 0 30%;
}

.tab-list li {
    position: relative;
    margin-bottom: 5px;
    background: #e4e4e4;
}

.tab-list a {
    display: block;
    padding: 22px 40px 22px 14px;
    border-left: 5px solid transparent;
    color: var(--ink);
    font: 600 18px/1.2 "Oswald", Helvetica, Arial, sans-serif;
    transition: background 0.3s ease-out;
}

.tab-list a::after {
    content: "\00BB";
    position: absolute;
    top: 50%;
    right: 10px;
    color: var(--orange);
    font-size: 30px;
    transform: translateY(-55%);
}

.tab-list a[aria-selected="true"] {
    border-left-color: var(--orange);
    background: #fff;
}

.tab-panels {
    flex: 0 0 65%;
    min-width: 0;
}

.tab-panel {
    padding: 0 30px;
}

.tab-panel img {
    display: block;
    margin-bottom: 1em;
}

.tab-panel ul li {
    color: var(--ink);
    font-size: 16px;
    line-height: 29px;
}

.tab-panel ul {
    padding: 0 0 1em 1em;
    list-style: disc;
}

.js .tab-panel:not(.is-active) {
    display: none;
}

.get-in-touch {
    margin-top: 30px;
    text-align: center;
}

.get-in-touch > div {
    padding: 40px;
    background: var(--panel);
}

.get-in-touch h3 {
    color: #fff;
}

.get-in-touch p {
    margin-top: 10px;
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    padding-bottom: 0;
}

.get-in-touch h4 {
    padding: 20px 40px 12px;
    background: var(--orange);
}

.get-in-touch h4 a {
    color: #fff;
}

/* Contact */
.contact-form {
    display: flex;
    flex-wrap: wrap;
}

.contact-form .field {
    width: 50%;
    padding: 5px;
}

.contact-form .field--full {
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    height: 50px;
    padding: 10px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    font: inherit;
}

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

.contact-form .btn {
    margin-top: 10px;
}

.contact-form .btn:disabled {
    opacity: 0.7;
}

.visually-hidden,
.contact-form .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.honeypot {
    position: absolute !important;
    left: -9000px !important;
    top: -9000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-info h3 { margin-bottom: 10px; }

.contact-info p a {
    color: var(--ink);
    font-size: 22px;
    font-weight: 600;
    line-height: 36px;
}

.map {
    display: block;
    width: 100%;
    height: 400px;
    border: 0;
}

/* Footer */
.site-footer {
    background: url("../img/footer-bg.jpg");
    color: #fff;
    text-align: center;
}

.site-footer .container {
    padding-top: 6%;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 30px;
}

.footer-contact,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 16px;
}

.footer-contact {
    gap: 0 14px;
    margin-bottom: 30px;
    padding-bottom: 27px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.footer-contact li + li::before {
    content: "|";
    margin-right: 14px;
}

.footer-links {
    gap: 0 14px;
    margin-bottom: 20px;
}

.footer-social {
    margin-bottom: 76px;
}

.footer-bottom {
    padding: 15px 0 10px;
    font-size: 14px;
    line-height: 1.7em;
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    z-index: 99;
    right: 0;
    bottom: 125px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 5px 0 0 5px;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.scroll-top::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 13px;
    width: 12px;
    height: 12px;
    border-top: 3px solid #fff;
    border-left: 3px solid #fff;
    transform: rotate(45deg);
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Tablet & mobile */
@media (max-width: 980px) {
    h1 { font-size: 30px; line-height: 1.2; }
    h2 { font-size: 26px; }
    h3 { font-size: 22px; }
    h4 { font-size: 18px; }
    h5 { font-size: 16px; }

    .section { padding: 30px 0; }
    .row { padding: 30px 0; }

    .site-header { position: absolute; }

    .nav-toggle { display: block; }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 5%;
        border-top: 3px solid #fff;
        background: #000;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .nav-open .nav-menu { display: flex; }

    .nav-menu a {
        display: block;
        padding: 10px 5%;
        font-size: 14px;
        font-weight: 600;
    }

    .cols,
    .services {
        flex-direction: column;
        gap: 30px;
    }

    .services aside,
    .tab-panels { flex: none; width: 100%; }
    .footer-contact { flex-direction: column; }
    .footer-contact li + li::before { content: none; }
    .cols--flush { gap: 0; }
    .half, .narrow, .signup { width: 100%; }
    .slide-content { width: auto; padding: 16% 8%; }
    .slider-dots { left: 50%; transform: translateX(-50%); }

    .gallery { grid-template-columns: repeat(2, 1fr); }

    .parallax { background-attachment: scroll; }

    .feature,
    .get-in-touch > div { padding: 20px; }
    .get-in-touch h4 { padding: 20px 20px 12px; }

    .tab-panel { padding: 30px 0 0; }

    .brands { flex-direction: row; flex-wrap: wrap; }
    .brands > * { flex-basis: 40%; }
}

@media (max-width: 767px) {
    .gallery { grid-template-columns: 1fr; }
}

@media (max-width: 599px) {
    :root { --row-w: 90%; }

    .slide-content { padding: 14% 0; }
    .btn { font-size: 14px; }
    .slider-arrow { display: none; }
    .tab-list a { padding: 10px 40px 10px 8px; font-size: 15px; }
    .contact-form .field { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .slide, .tile, .btn::before { transition: none; }
}
