/* ==========================================================================
   Spartan Performance — Design System
   Palette:  #0a0a0a (black) / #161616 (charcoal) / #1c1c1c (charcoal-alt)
             #f2f2f0 (off-white) / #8a8a8a (muted) / #b81d24 (spartan red)
   Type:     Oswald (display) / Inter (body) / JetBrains Mono (spec/utility)
   Signature: angular cut-corner panels + red "blade" mark on headings —
              echoes the helmet's armor plating from the logo.
   ========================================================================== */

:root {
    --black: #0a0a0a;
    --charcoal: #161616;
    --charcoal-alt: #1c1c1c;
    --steel: #2a2a2a;
    --white: #f2f2f0;
    --muted: #8f8f8c;
    --red: #b81d24;
    --red-dark: #7d1218;
    --red-glow: rgba(184, 29, 36, 0.35);

    --font-display: "Oswald", Arial, sans-serif;
    --font-body: "Inter", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "Courier New", monospace;

    --cut: 16px;      /* corner-cut size for panels/cards */
    --cut-sm: 8px;    /* corner-cut size for buttons/inputs */
}

/* Honeypot spam trap — hidden from real visitors, catches basic bots */
.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}


/* Footer link button (Cookie Preferences) */
.footer-link-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.footer-link-btn:hover {
    color: var(--white);
}


/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    background: var(--charcoal);
    border-top: 2px solid var(--red);
    padding: 18px 0;
}

.cookie-banner-content {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-content p {
    color: #ccc;
    font-size: 14px;
    margin: 0;
    flex: 1;
    min-width: 240px;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .cookie-banner {
        bottom: 56px; /* sit above the mobile sticky contact bar */
    }
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .cookie-banner-actions {
        justify-content: center;
    }
}


/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 20px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}


/* General */
body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Section heading "blade" mark — the recurring signature motif */
main h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 34px;
    margin-bottom: 32px;
}

main h2::before {
    content: "";
    display: block;
    width: 30px;
    height: 4px;
    flex-shrink: 0;
    background: var(--red);
    transform: skewX(-20deg);
}


/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* Header */
.header-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

header {
    border-bottom: 2px solid var(--red);
    background: var(--black);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 220px;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.main-nav {
    display: flex;
    gap: 34px;
}

.main-nav a {
    position: relative;
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 6px 0;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: transform 0.2s, opacity 0.2s, background 0.2s;
}

.nav-toggle.open span {
    background: var(--red);
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* Buttons — angular cut-corner, the signature shape applied at small scale */
.contact-button {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    padding: 12px 26px;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - var(--cut-sm)) 0, 100% var(--cut-sm), 100% 100%, var(--cut-sm) 100%, 0 calc(100% - var(--cut-sm)));
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-button:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--red-glow);
}

.btn-outline,
.filter-reset-btn,
.contact-modal-call,
.vehicle-carfax-btn {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--steel);
}

.btn-outline:hover,
.filter-reset-btn:hover,
.contact-modal-call:hover,
.vehicle-carfax-btn:hover {
    background: var(--charcoal);
    border-color: var(--red);
    box-shadow: none;
}


/* Introduction / Hero */
.intro {
    position: relative;
    padding: 150px 0 130px;
    text-align: center;
    overflow: hidden;
    background: var(--black);
}

.intro-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--black);
    background-image:
        repeating-linear-gradient(135deg, rgba(184, 29, 36, 0.05) 0px, rgba(184, 29, 36, 0.05) 1px, transparent 1px, transparent 60px);
    transition: background-image 0.4s ease;
}

.intro-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.75) 0%, rgba(10, 10, 10, 0.88) 60%, var(--black) 100%);
}

.intro-content {
    position: relative;
    z-index: 2;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 18px;
}

.intro h1 {
    font-size: 60px;
    margin-bottom: 20px;
}

.intro p {
    max-width: 560px;
    margin: 0 auto 34px;
    color: #ccc;
    font-size: 18px;
}

.intro-cta-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.intro-cta {
    font-size: 15px;
    padding: 16px 38px;
}


/* Sections */
.cars-for-sale,
.representative,
.contact {
    padding: 90px 0;
}

.representative {
    background: var(--charcoal-alt);
}

.section-description {
    color: var(--muted);
    margin-bottom: 40px;
}


/* Category pills */
.category-pills {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-pill {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--steel);
    padding: 9px 22px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.category-pill:hover {
    color: var(--white);
    border-color: var(--muted);
}

.category-pill.active {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}


/* Vehicle filters */
.vehicle-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 34px;
    align-items: center;
    font-family: var(--font-mono);
}

.vehicle-filters select,
.vehicle-filters input {
    padding: 10px 14px;
    border: 1px solid var(--steel);
    background: var(--charcoal);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 13px;
}

.vehicle-filters input[type="number"] {
    width: 120px;
}

@media (max-width: 700px) {
    .vehicle-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .vehicle-filters input[type="number"] {
        width: 100%;
    }
}


/* Vehicle cards — angular cut-corner panel, the signature shape */
.vehicle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--charcoal);
    border: 1px solid var(--steel);
    margin-bottom: 34px;
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.vehicle-image {
    position: relative;
    min-height: 280px;
    background: var(--charcoal-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    overflow: hidden;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px;
}

.vehicle-info h3 {
    font-size: 26px;
    margin-bottom: 12px;
}

.vehicle-info p {
    color: var(--muted);
    margin-bottom: 20px;
}

.vehicle-info p strong {
    font-family: var(--font-mono);
    color: var(--white);
    font-size: 20px;
    letter-spacing: 0.5px;
}

.vehicle-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: var(--white);
    border: none;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.gallery-arrow:hover {
    background: var(--red);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 3px 10px;
}

@media (max-width: 700px) {
    .vehicle {
        grid-template-columns: 1fr;
    }
    .vehicle-image {
        min-height: 220px;
    }
    .vehicle-info {
        padding: 24px;
    }
}


/* Representative */
.representative-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.representative-photo {
    height: 320px;
    background: var(--charcoal);
    border: 1px solid var(--steel);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.representative-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.representative-info h3 {
    font-size: 28px;
    margin-bottom: 6px;
    border-left: 3px solid var(--red);
    padding-left: 14px;
}

.representative-info p {
    color: var(--muted);
    margin-bottom: 20px;
    padding-left: 17px;
}

@media (max-width: 700px) {
    .representative-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .representative-photo {
        height: 240px;
    }
    .representative-info h3,
    .representative-info p {
        border-left: none;
        padding-left: 0;
    }
}


/* Budget-Friendly Picks */
.budget-picks {
    padding: 90px 0;
    background: var(--charcoal-alt);
}

.budget-picks .vehicle {
    position: relative;
}

.budget-picks .vehicle::before {
    content: "GREAT PRICE";
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 5px 12px;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}


/* Why Spartan Performance */
.why-spartan {
    padding: 90px 0;
    background: var(--black);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.why-card {
    background: var(--charcoal);
    border: 1px solid var(--steel);
    border-top: 3px solid var(--red);
    padding: 30px 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.why-card:hover {
    transform: translateY(-4px);
    border-color: var(--red);
}

.why-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.why-card p {
    color: var(--muted);
    font-size: 15px;
}

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

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


/* Customer Reviews */
.reviews {
    padding: 90px 0;
    background: var(--charcoal-alt);
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.review-card {
    background: var(--charcoal);
    border: 1px solid var(--steel);
    padding: 26px;
}

.review-stars {
    color: var(--red);
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.review-text {
    color: #ddd;
    font-size: 15px;
    margin-bottom: 16px;
}

.review-author {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
}

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


/* Contact */
.contact {
    text-align: center;
}

.contact h2 {
    justify-content: center;
}

.contact p {
    color: var(--muted);
    margin-bottom: 30px;
}


/* Contact choice modal */
.contact-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.contact-modal-box {
    position: relative;
    background: var(--charcoal);
    border: 1px solid var(--steel);
    padding: 44px 32px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.contact-modal-box h3 {
    font-size: 22px;
    margin-bottom: 26px;
}

.contact-modal-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

.newsletter-popup-close:hover {
    color: var(--red);
}


/* Trade-In */
.trade-in {
    padding: 90px 0;
    background: var(--charcoal-alt);
}

.tradein-intro {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.tradein-intro h2 {
    justify-content: center;
    font-size: 32px;
    margin-bottom: 12px;
}

.tradein-intro h2::before {
    display: none;
}

.tradein-intro-sub {
    color: #bbb;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.tradein-intro-detail {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 28px;
}

.tradein-start-btn {
    font-size: 16px;
    padding: 16px 36px;
}

.tradein-microcopy {
    font-family: var(--font-mono);
    color: var(--muted);
    font-size: 12px;
    margin-top: 16px;
    letter-spacing: 0.5px;
}

.tradein-wizard {
    max-width: 550px;
    margin: 30px auto 0;
}

.tradein-progress {
    display: flex;
    align-items: flex-start;
    margin-bottom: 35px;
}

.tradein-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.tradein-progress-num {
    width: 32px;
    height: 32px;
    background: var(--charcoal);
    border: 2px solid var(--steel);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.tradein-progress-label {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s;
}

.tradein-progress-step.active .tradein-progress-num {
    border-color: var(--red);
    background: var(--red);
    color: var(--white);
}

.tradein-progress-step.active .tradein-progress-label,
.tradein-progress-step.done .tradein-progress-label {
    color: var(--white);
}

.tradein-progress-step.done .tradein-progress-num {
    border-color: var(--red);
    background: var(--charcoal);
    color: var(--red);
}

.tradein-progress-line {
    flex: 1;
    height: 2px;
    background: var(--steel);
    margin: 16px 8px 0;
}

.tradein-step {
    display: none;
    flex-direction: column;
    gap: 15px;
}

.tradein-step.active {
    display: flex;
    animation: tradeinFadeIn 0.25s ease;
}

@keyframes tradeinFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.tradein-step label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
}

.tradein-step input,
.tradein-step select {
    padding: 12px 14px;
    border: 1px solid var(--steel);
    background: var(--charcoal);
    color: var(--white);
    font-family: var(--font-body);
    width: 100%;
}

.tradein-step-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.tradein-success {
    text-align: center;
    padding: 10px 0;
}

.tradein-success h3 {
    font-size: 26px;
    margin-bottom: 10px;
}

.tradein-success p {
    color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
    .tradein-step.active {
        animation: none;
    }
}


/* Newsletter */
.newsletter {
    padding: 90px 0;
    text-align: center;
}

.newsletter h2 {
    justify-content: center;
    font-size: 30px;
    margin-bottom: 10px;
}

.newsletter p {
    color: var(--muted);
    margin-bottom: 25px;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
    padding: 12px 16px;
    border: 1px solid var(--steel);
    background: var(--charcoal);
    color: var(--white);
    width: 280px;
    max-width: 100%;
    font-family: var(--font-body);
}

.newsletter-status {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
    min-height: 18px;
}

.newsletter-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.newsletter-popup-box {
    position: relative;
    background: var(--charcoal);
    border: 1px solid var(--steel);
    padding: 44px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.newsletter-popup-box h3 {
    font-size: 26px;
    margin-bottom: 10px;
}

.newsletter-popup-box p {
    color: var(--muted);
    margin-bottom: 20px;
}

.newsletter-popup .newsletter-form {
    flex-direction: column;
}

.newsletter-popup .newsletter-form input[type="email"] {
    width: 100%;
}


/* Footer */
footer {
    background: var(--black);
    border-top: 1px solid var(--steel);
    padding: 30px 0;
    color: var(--muted);
}

footer p {
    margin-bottom: 5px;
}


/* Mobile */
@media (max-width: 700px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        position: relative;
    }

    .logo img {
        width: 110px;
    }

    .header-contact-btn {
        display: none;
    }

    .nav-toggle {
        display: flex;
        order: 3;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--charcoal);
        border-top: 1px solid var(--steel);
        border-bottom: 1px solid var(--steel);
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        z-index: 500;
    }

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

    .main-nav a {
        padding: 14px 20px;
        border-bottom: 1px solid var(--steel);
        width: 100%;
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    .intro {
        padding: 90px 0 70px;
    }

    .intro h1 {
        font-size: 42px;
    }

    main h2 {
        font-size: 26px;
    }

    .why-grid {
        margin-top: 30px;
    }

    body {
        padding-bottom: 56px; /* leave room for the mobile sticky bar */
    }

    .mobile-sticky-bar {
        display: flex;
    }
}


/* Mobile sticky contact bar */
.mobile-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: var(--charcoal);
    border-top: 2px solid var(--red);
}

.mobile-sticky-item {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-right: 1px solid var(--steel);
}

.mobile-sticky-item:last-child {
    border-right: none;
}

.mobile-sticky-item:active {
    background: var(--red);
}
