/* ==========================================================================
   Hi Quality Automotives — Shared Styles
   Black / #c8102e red / white. Barlow Condensed display + Barlow text.
   ========================================================================== */

:root {
    /* Brand color system */
    --bg: #0a0a0a;
    --surface: #121212;
    --surface-raised: #181818;
    --border: #242424;
    --border-strong: #383838;

    --red: #c8102e;
    --red-deep: #a00d25;
    /* Brightened tint: small red text on black needs this to stay readable */
    --red-text: #f04a5e;
    --red-tint: rgba(200, 16, 46, 0.10);

    --text-hi: #f5f5f5;
    --text-body: #c9c9c9;
    --text-muted: #9c9c9c;

    /* Type */
    --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --font-body: 'Barlow', 'Segoe UI', sans-serif;

    /* Rhythm */
    --space-section: clamp(64px, 9vw, 120px);
    --space-band: clamp(56px, 7vw, 88px);
    --container: 1200px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;

    --shadow-lift: 0 14px 34px rgba(0, 0, 0, 0.45);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    /* Z-scale */
    --z-sticky: 200;
    --z-overlay: 300;
    --z-drawer: 400;
    --z-modal: 500;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--text-hi);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.08;
    text-wrap: balance;
}

::selection {
    background-color: var(--red);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--red-text);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Anchor targets clear the sticky header */
[id] {
    scroll-margin-top: 90px;
}

/* ==========================================================================
   Header
   ========================================================================== */

header {
    background-color: rgba(10, 10, 10, 0.96);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.top-bar {
    background-color: #000;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}

.contact-info {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.contact-info i {
    color: var(--red-text);
    margin-right: 4px;
}

.contact-info a {
    color: var(--text-body);
    text-decoration: none;
    transition: color 0.2s var(--ease-out);
}

.contact-info a:hover {
    color: #fff;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-body);
    font-weight: 500;
    padding: 4px 0;
}

.social-link i {
    font-size: 15px;
}

.social-link:hover {
    color: #fff !important;
}

/* Navigation */
nav {
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    flex-shrink: 0;
    line-height: 0;
}

.logo a {
    display: inline-block;
    text-decoration: none;
}

.logo img {
    height: 52px;
    width: auto;
    transition: opacity 0.2s var(--ease-out);
}

.logo a:hover img {
    opacity: 0.85;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    list-style: none;
}

.nav-links a {
    position: relative;
    display: inline-block;
    color: var(--text-body);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 12px;
    transition: color 0.2s var(--ease-out);
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    height: 2px;
    background-color: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease-out);
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-links a.active {
    color: #fff;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    position: relative;
    background:
        url('https://images.unsplash.com/photo-1560958089-b8a1929cea89?ixlib=rb-4.0.3&auto=format&fit=crop&w=2071&q=80') center 60% / cover no-repeat;
    border-bottom: 1px solid var(--border);
    padding: clamp(80px, 12vw, 150px) 24px;
    display: flex;
    align-items: center;
    min-height: 560px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
        rgba(5, 5, 5, 0.95) 0%,
        rgba(5, 5, 5, 0.82) 45%,
        rgba(10, 10, 10, 0.45) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    text-align: left;
    animation: hero-rise 0.9s var(--ease-out) both;
}

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
    font-size: 22px;
    color: var(--red-text);
    background-color: var(--red-tint);
    border: 1px solid rgba(200, 16, 46, 0.35);
    border-radius: var(--radius-sm);
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    max-width: 14ch;
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--red-text);
}

.hero p {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    max-width: 54ch;
    margin-bottom: 36px;
    color: var(--text-body);
}

/* Hero stats — quiet inline strip, not a metric billboard */
.hero-stats {
    display: flex;
    align-items: stretch;
    gap: clamp(24px, 4vw, 48px);
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: left;
    padding-left: clamp(16px, 2vw, 24px);
    border-left: 2px solid var(--red);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
    color: var(--text-hi);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

/* Hero highlights (sell page) */
.hero-highlights {
    display: flex;
    gap: clamp(20px, 4vw, 44px);
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.highlight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 16px;
    color: var(--red-text);
    background-color: var(--red-tint);
    border: 1px solid rgba(200, 16, 46, 0.35);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.highlight-text {
    color: var(--text-hi);
    font-size: 15px;
    font-weight: 500;
}

/* Benefits row (pre-approved page) */
.benefits-row {
    display: flex;
    gap: 12px 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-hi);
    font-size: 15px;
    font-weight: 500;
}

.benefit-item > span {
    color: var(--red-text);
    font-size: 15px;
    line-height: 1;
}

/* CTA buttons */
.cta-buttons {
    display: flex;
    gap: 14px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    background-color: var(--red);
    color: #fff;
    padding: 15px 34px;
    border: 1px solid var(--red);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s var(--ease-out),
                border-color 0.2s var(--ease-out),
                transform 0.2s var(--ease-out),
                box-shadow 0.2s var(--ease-out);
}

.cta-button:hover {
    background-color: var(--red-deep);
    border-color: var(--red-deep);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.cta-button.secondary {
    background-color: transparent;
    border-color: var(--border-strong);
    color: var(--text-hi);
}

.cta-button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: #565656;
    box-shadow: none;
}

/* ==========================================================================
   Section scaffolding
   ========================================================================== */

.features,
.process-section,
.appointment-types,
.contact-section,
.why-join {
    max-width: var(--container);
    margin: var(--space-section) auto;
    padding: 0 24px;
}

.features h2,
.process-section h2,
.appointment-types h2,
.contact-section h2,
.why-join h2,
.section-title {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 700;
    margin-bottom: clamp(32px, 4vw, 48px);
}

/* Raised full-width bands */
.info-section,
.hours-section,
.benefits-section,
.faq-section,
.positions-section {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: var(--space-band) 24px;
    margin: var(--space-section) 0;
}

.info-content,
.benefits-content {
    max-width: var(--container);
    margin: 0 auto;
}

.info-content h2,
.hours-content h2,
.benefits-content h2,
.faq-content h2,
.positions-content h2,
.location-section h2,
.what-we-buy h2,
.culture-section h2,
.inventory-cta h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
    margin-bottom: 18px;
}

.info-content > p,
.location-section > p,
.what-we-buy > p,
.culture-section > p,
.inventory-cta p {
    font-size: 17px;
    max-width: 68ch;
    margin-bottom: 8px;
    text-wrap: pretty;
}

/* ==========================================================================
   Feature / benefit / type cards
   ========================================================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card,
.benefit-card,
.type-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: center;
    align-content: start;
    transition: border-color 0.25s var(--ease-out),
                transform 0.25s var(--ease-out),
                box-shadow 0.25s var(--ease-out);
}

.feature-card:hover,
.benefit-card:hover,
.type-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.feature-icon,
.benefit-icon,
.type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 18px;
    color: var(--red-text);
    background-color: var(--red-tint);
    border-radius: var(--radius-sm);
}

.feature-card h3,
.benefit-card h3,
.type-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.feature-card p,
.benefit-card p,
.type-card p {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 14px;
}

/* Appointment type cards carry a CTA */
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.type-card {
    grid-template-rows: auto 1fr auto;
}

.type-card p {
    align-self: start;
}

.type-card .cta-button {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 22px;
    padding: 11px 22px;
    font-size: 15px;
}

/* ==========================================================================
   Process steps — a real sequence, numbers earn their place
   ========================================================================== */

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    counter-reset: step;
}

.step-card {
    position: relative;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: left;
    transition: border-color 0.25s var(--ease-out),
                transform 0.25s var(--ease-out),
                box-shadow 0.25s var(--ease-out);
}

.step-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background-color: var(--red);
    color: #fff;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
}

.step-icon {
    display: none; /* the number carries the sequence; emoji icons retired */
}

.step-card h3 {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 10px;
}

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

/* ==========================================================================
   Info grid (services overview)
   ========================================================================== */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 36px;
}

.info-item {
    text-align: left;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: border-color 0.25s var(--ease-out);
}

.info-item:hover {
    border-color: var(--border-strong);
}

.info-item span {
    display: inline-flex;
    font-size: 20px;
    color: var(--red-text);
    margin-bottom: 12px;
    line-height: 1;
}

.info-item h4 {
    color: var(--text-hi);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-item p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 0;
}

/* ==========================================================================
   Benefits grid (sell + careers)
   ========================================================================== */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

/* Sell page re-uses .benefit-item inside the grid with h4/p structure */
.benefits-grid .benefit-item {
    display: block;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 24px;
    text-align: left;
    transition: border-color 0.25s var(--ease-out);
}

.benefits-grid .benefit-item:hover {
    border-color: var(--border-strong);
}

.benefits-grid .benefit-item > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 17px;
    color: var(--red-text);
    background-color: var(--red-tint);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.benefits-grid .benefit-item h4 {
    color: var(--text-hi);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.benefits-grid .benefit-item p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================================================
   Hours
   ========================================================================== */

.hours-content {
    max-width: 900px;
    margin: 0 auto;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.hours-item {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
}

.hours-item h4 {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.hours-item p {
    color: var(--text-hi);
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Location
   ========================================================================== */

.location-section {
    max-width: var(--container);
    margin: var(--space-section) auto;
    padding: 0 24px;
}

.location-details {
    display: flex;
    gap: 16px 40px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-hi);
    font-size: 16px;
}

.location-item > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 16px;
    color: var(--red-text);
    background-color: var(--red-tint);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* Inquiries page wraps location items (with h4/p) in a card */
.location-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 40px);
    margin-top: 28px;
}

.location-card .location-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    margin-top: 0;
}

.location-card .location-item {
    display: block;
}

.location-card .location-item > span {
    margin-bottom: 14px;
}

.location-card .location-item h4 {
    color: var(--text-hi);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.location-card .location-item p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* ==========================================================================
   What we buy
   ========================================================================== */

.what-we-buy {
    max-width: var(--container);
    margin: var(--space-section) auto;
    padding: 0 24px;
}

.vehicle-types {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.vehicle-type {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 11px 22px;
    color: var(--text-hi);
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.2s var(--ease-out);
}

.vehicle-type i {
    color: var(--red-text);
}

.vehicle-type:hover {
    border-color: var(--border-strong);
}

/* ==========================================================================
   Contact cards
   ========================================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.contact-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 28px;
    text-align: left;
    transition: border-color 0.25s var(--ease-out),
                transform 0.25s var(--ease-out),
                box-shadow 0.25s var(--ease-out);
}

.contact-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    font-size: 19px;
    color: var(--red-text);
    background-color: var(--red-tint);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.contact-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 16px;
}

.contact-card a {
    color: var(--red-text);
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.9;
    transition: color 0.2s var(--ease-out);
}

.contact-card a:hover {
    color: #fff;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-content {
    max-width: 860px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding: 24px 26px;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}

.faq-question h4 {
    color: var(--text-hi);
    font-size: 17px;
    font-weight: 600;
}

/* Answers are always visible — hide the misleading "+" glyph */
.faq-question > span {
    display: none;
}

.faq-answer {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 8px;
    max-width: 70ch;
    text-wrap: pretty;
}

/* ==========================================================================
   Careers
   ========================================================================== */

.positions-content {
    max-width: 1000px;
    margin: 0 auto;
}

.position-card {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    padding: clamp(26px, 4vw, 38px);
    transition: border-color 0.25s var(--ease-out);
}

.position-card:hover {
    border-color: var(--border-strong);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.position-header h3 {
    font-size: 26px;
    font-weight: 600;
}

.position-type {
    background-color: var(--red-tint);
    border: 1px solid rgba(200, 16, 46, 0.35);
    color: var(--red-text);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.position-card > p {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 70ch;
    margin-bottom: 18px;
}

.position-card .cta-button {
    padding: 12px 26px;
    font-size: 16px;
}

.position-requirements {
    list-style: none;
    margin: 18px 0 26px;
}

.position-requirements li {
    color: var(--text-body);
    font-size: 15px;
    margin-bottom: 9px;
    padding-left: 26px;
    position: relative;
}

.position-requirements li::before {
    content: "\2713";
    color: var(--red-text);
    position: absolute;
    left: 0;
    font-weight: 700;
}

/* Culture / values (legacy hooks) */
.culture-section {
    max-width: 1000px;
    margin: var(--space-section) auto;
    padding: 0 24px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 36px;
}

.value-item {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
}

.value-item span {
    display: inline-flex;
    font-size: 22px;
    margin-bottom: 12px;
}

.value-item h4 {
    color: var(--text-hi);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.value-item p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background-color: #000;
    border-top: 1px solid var(--border);
    padding: clamp(48px, 6vw, 72px) 24px 32px;
    margin-top: var(--space-section);
}

.footer-content {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 40px;
    align-items: start;
    text-align: left;
}

.footer-logo img {
    height: 56px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s var(--ease-out);
}

.footer-logo img:hover {
    opacity: 1;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-content: flex-start;
    gap: 10px 28px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s var(--ease-out);
}

.footer-links a:hover {
    color: #fff;
}

.footer-content > div:not(.footer-logo):not(.footer-links) {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
}

.footer-content > div:not(.footer-logo):not(.footer-links) strong {
    color: var(--text-hi);
    font-size: 15px;
}

.copyright {
    grid-column: 1 / -1;
    color: #8a8a8a;
    font-size: 13px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 16px;
    text-align: center;
}

/* ==========================================================================
   Inventory
   ========================================================================== */

.inventory-header {
    padding: clamp(56px, 8vw, 90px) 24px 0;
    max-width: var(--container);
    margin: 0 auto;
    text-align: left;
}

.inventory-header h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    margin-bottom: 14px;
}

.inventory-header p {
    color: var(--text-body);
    font-size: 17px;
    max-width: 60ch;
    margin-bottom: 22px;
}

.inventory-count {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    padding: 9px 20px;
    border-radius: 999px;
    color: var(--text-body);
    font-size: 14px;
}

.count-number {
    color: var(--red-text);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
}

.inventory-grid {
    max-width: 1300px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 56px) 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.vehicle-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s var(--ease-out),
                transform 0.25s var(--ease-out),
                box-shadow 0.25s var(--ease-out);
}

.vehicle-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.vehicle-images {
    position: relative;
    height: 220px;
    overflow: hidden;
    background-color: #0d0d0d;
}

.vehicle-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s var(--ease-out);
}

.vehicle-card:hover .vehicle-images img {
    transform: scale(1.04);
}

.image-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.vehicle-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vehicle-title {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--text-hi);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

.vehicle-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-item {
    background-color: var(--bg);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
}

.detail-label {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 3px;
}

.detail-value {
    display: block;
    color: var(--text-hi);
    font-size: 15px;
    font-weight: 500;
}

.vehicle-price {
    font-family: var(--font-display);
    font-size: 30px;
    color: var(--red-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: auto;
    margin-bottom: 16px;
}

.vehicle-btn {
    display: block;
    width: 100%;
    background-color: var(--red);
    color: #fff;
    text-align: center;
    padding: 13px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s var(--ease-out);
}

.vehicle-btn:hover {
    background-color: var(--red-deep);
}

.inventory-cta {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--space-band) 24px;
    margin-top: var(--space-section);
    text-align: center;
}

.inventory-cta p {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

.inventory-cta .cta-buttons {
    justify-content: center;
}

/* Loading / error / empty states */
.loading-message,
.error-message,
.no-vehicles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 17px;
}

.error-message {
    color: var(--red-text);
}

/* ==========================================================================
   Image modal gallery
   ========================================================================== */

.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.94);
    z-index: var(--z-modal);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 80%;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 28px;
    font-size: 36px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    z-index: 1;
    transition: color 0.2s var(--ease-out);
}

.modal-close:hover {
    color: var(--red-text);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(18, 18, 18, 0.85);
    border: 1px solid var(--border-strong);
    color: #fff;
    font-size: 18px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 999px;
    transition: background-color 0.2s var(--ease-out),
                border-color 0.2s var(--ease-out);
}

.modal-nav:hover {
    background-color: var(--red);
    border-color: var(--red);
}

.modal-prev {
    left: -72px;
}

.modal-next {
    right: -72px;
}

.modal-counter {
    color: var(--text-muted);
    margin-top: 20px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.application-section {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: var(--space-band) 24px;
    margin: var(--space-section) 0 0;
}

.application-container {
    max-width: 880px;
    margin: 0 auto;
}

.application-container h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.application-intro {
    color: var(--text-body);
    font-size: 16px;
    margin-bottom: 36px;
    max-width: 64ch;
}

.preapproval-form,
.inquiry-form,
.sell-form,
.career-form,
.appointment-form {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 44px);
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    color: var(--text-hi);
    font-size: 23px;
    font-weight: 600;
    margin-bottom: 22px;
}

.form-section h3 i {
    color: var(--red-text);
    margin-right: 10px;
}

.form-section h4 {
    color: var(--text-hi);
    font-size: 16px;
    font-weight: 600;
    margin: 18px 0 16px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text-body);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 7px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea,
.appointment-form select,
.appointment-form input[type="date"] {
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-hi);
    font-size: 16px;
    font-family: inherit;
    width: 100%;
    transition: border-color 0.2s var(--ease-out),
                box-shadow 0.2s var(--ease-out);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.appointment-form select:focus,
.appointment-form input[type="date"]:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.22);
}

/* Flag problems only after the user has interacted — not on page load */
.form-group input:user-invalid,
.form-group select:user-invalid,
.form-group textarea:user-invalid {
    border-color: var(--red-text);
}

.form-group select option {
    background-color: var(--surface);
    color: var(--text-hi);
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.career-form textarea::placeholder,
.sell-form textarea::placeholder {
    color: #7d7d7d;
}

.form-group small {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 6px;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator,
.appointment-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Textareas (all forms) */
.career-form textarea,
.sell-form textarea,
.inquiry-form textarea {
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-hi);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 110px;
    width: 100%;
    transition: border-color 0.2s var(--ease-out),
                box-shadow 0.2s var(--ease-out);
}

.career-form textarea:focus,
.sell-form textarea:focus,
.inquiry-form textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.22);
}

/* File inputs */
.career-form input[type="file"],
.sell-form input[type="file"] {
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-body);
    font-size: 15px;
    cursor: pointer;
    width: 100%;
}

.career-form input[type="file"]::file-selector-button,
.sell-form input[type="file"]::file-selector-button {
    background-color: var(--red);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    margin-right: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s var(--ease-out);
}

.career-form input[type="file"]::file-selector-button:hover,
.sell-form input[type="file"]::file-selector-button:hover {
    background-color: var(--red-deep);
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--red);
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
    color: var(--text-body);
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px 16px;
    margin-top: 10px;
}

/* Conditional sub-sections */
.previous-address-section,
.trade-in-section {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 18px;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 14px;
    justify-content: flex-start;
    margin-top: 32px;
    flex-wrap: wrap;
}

.submit-btn,
.reset-btn {
    padding: 14px 34px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    min-width: 150px;
    transition: background-color 0.2s var(--ease-out),
                border-color 0.2s var(--ease-out),
                transform 0.2s var(--ease-out),
                box-shadow 0.2s var(--ease-out);
}

.submit-btn {
    background-color: var(--red);
    color: #fff;
    border: 1px solid var(--red);
}

.submit-btn:hover {
    background-color: var(--red-deep);
    border-color: var(--red-deep);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.reset-btn {
    background-color: transparent;
    color: var(--text-body);
    border: 1px solid var(--border-strong);
}

.reset-btn:hover {
    border-color: #565656;
    color: #fff;
}

/* Notes */
.resume-note,
.form-note {
    background-color: var(--red-tint);
    border: 1px solid rgba(200, 16, 46, 0.3);
    padding: 16px 20px;
    margin: 20px 0 0;
    border-radius: var(--radius-sm);
    color: var(--text-body);
    font-size: 14px;
    text-align: left;
}

.resume-note i,
.form-note i {
    color: var(--red-text);
    margin-right: 8px;
}

.resume-note a,
.form-note a {
    color: var(--red-text);
    font-weight: 600;
    text-decoration: none;
}

.resume-note a:hover,
.form-note a:hover {
    text-decoration: underline;
}

.section-note {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Calendly wrapper inherits the page background */
.calendly-inline-widget {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ==========================================================================
   Mobile menu
   ========================================================================== */

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: calc(var(--z-drawer) + 1);
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 992px) {
    .mobile-menu-btn {
        display: flex;
    }

    nav {
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100vh;
        height: 100dvh;
        background-color: #0d0d0d;
        border-left: 1px solid var(--border);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 88px 24px 32px;
        gap: 0;
        transition: right 0.35s var(--ease-out);
        box-shadow: -16px 0 40px rgba(0, 0, 0, 0.6);
        z-index: var(--z-drawer);
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 16px 8px;
        font-size: 20px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--red-text);
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.7);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s var(--ease-out), visibility 0.3s var(--ease-out);
        z-index: var(--z-overlay);
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .contact-info {
        justify-content: center;
        font-size: 12px;
    }

    .contact-info > div:nth-child(2) {
        display: none;
    }

    .hero {
        min-height: 480px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: left;
    }

    .footer-links {
        justify-content: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    .modal-close {
        top: 12px;
        right: 16px;
        font-size: 30px;
    }

    .vehicle-details {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-stats {
        gap: 18px;
    }

    .cta-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .submit-btn,
    .reset-btn {
        width: 100%;
    }

    .vehicle-details {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

    .hero-content {
        animation: none;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
