:root {
    /* Machined Graphite system. Legacy --market-* names kept to match
       existing selectors; values are the new dark visual language. */
    /* Text & surface */
    --market-ink: #f3f5f8;
    --market-muted: #aab3c0;
    --market-on-surface-variant: #aab3c0;
    --market-faint: #909aac;
    /* Surfaces */
    --market-bg: #131821;
    --market-surface: #1a202a;
    --market-panel: #1f2631;
    --market-surface-container: #232b37;
    --market-surface-container-low: #1f2631;
    --market-surface-container-high: #2a3341;
    --market-outline: #343d4c;
    --market-outline-variant: #2d3543;
    --market-outline-strong: #455064;
    --market-line: #2d3543;
    /* Accent: single ultramarine logo blue */
    --market-accent: #1d3fd9;
    --market-accent-dark: #1734b8;
    --market-primary-container: #3a5cff;
    --market-primary-fixed: rgba(29, 63, 217, 0.16);
    --market-on-accent: #f3f5f8;
    --market-tertiary: #aab3c0;
    --market-highlight: #1d3fd9;
    --market-highlight-ink: #f3f5f8;
    /* Logo blue in asset and UI accent palette */
    --market-logo-blue: #1d3fd9;
    /* Special surfaces */
    --market-night: #10151d;
    /* Fonts */
    --font-display: 'Archivo', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    /* Shadow */
    --soft-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    --lift-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    /* Clearance below the absolutely positioned navbar.
       Desktop value also sets the page-topper top distance (About is the
       visual reference); the mobile value is redefined in the media query. */
    --nav-clearance: 9.5rem;
}

body.marketplace-page,
body {
    font-family: var(--font-body);
    color: var(--market-ink);
    background: var(--market-bg);
}

.marketplace-page p,
.marketplace-page li,
.marketplace-page figcaption {
    font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.brand-lockup strong {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--market-ink);
}

h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

a {
    color: var(--market-accent);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--market-primary-container);
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--market-accent);
    outline-offset: 2px;
}

/* Navigation */
.marketplace-nav {
    background: rgba(26, 32, 42, 0.94);
    border: 1px solid var(--market-outline);
    border-radius: 0.75rem;
    box-shadow: var(--soft-shadow);
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.brand-logo {
    height: 3.0rem;
    width: auto;
    border-radius: 0;
    object-fit: contain;
    display: block;
}

.brand-lockup span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-lockup strong {
    font-size: 1rem;
    color: var(--market-ink);
}

.brand-lockup small {
    font-size: 0.74rem;
    color: var(--market-muted);
    font-family: var(--font-body);
    letter-spacing: 0;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.2rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.navbar-nav .nav-link {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--market-ink);
    margin-right: 0.35rem;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--market-accent);
    text-decoration: none;
}

.navbar-nav .nav-link.active {
    color: var(--market-accent);
}

/* Dropdown menu (Products) */
.navbar-nav .dropdown-menu {
    margin-top: 0.5rem;
    background: var(--market-surface);
    border: 1px solid var(--market-outline-variant);
    border-radius: 0.5rem;
    box-shadow: var(--soft-shadow);
    padding: 0.5rem;
    min-width: 16rem;
}

.navbar-nav .dropdown-item {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--market-ink);
    border-radius: 0.35rem;
    padding: 0.5rem 0.75rem;
    white-space: normal;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus {
    background: var(--market-surface-container-low);
    color: var(--market-accent);
}

.navbar-nav .dropdown-divider {
    border-top-color: var(--market-outline-variant);
    margin: 0.35rem 0;
}

.breadcrumb-link {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--market-muted);
}

.breadcrumb-link:hover,
.breadcrumb-link:focus {
    color: var(--market-accent);
}

/* Buttons */
.nav-cta,
.hero-primary,
.contact-submit,
.btn-round.contact-submit {
    background: var(--market-accent);
    border: 0;
    color: var(--market-on-accent);
    border-radius: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 22px rgba(29, 63, 217, 0.24);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover,
.hero-primary:hover,
.contact-submit:hover,
.btn-round.contact-submit:hover {
    background: var(--market-primary-container);
    color: var(--market-on-accent);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(29, 63, 217, 0.34);
    text-decoration: none;
}

.btn.btn-outline-dark {
    border: 1.5px solid var(--market-accent);
    color: var(--market-accent);
    background: transparent;
    border-radius: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.btn.btn-outline-dark:hover,
.btn.btn-outline-dark:focus {
    background: var(--market-accent);
    color: #ffffff;
    border-color: var(--market-accent);
}

.btn.btn-dark {
    background: var(--market-accent);
    border-color: var(--market-accent);
    color: var(--market-on-accent);
}

.btn.btn-dark:hover,
.btn.btn-dark:focus {
    background: var(--market-primary-container);
    border-color: var(--market-primary-container);
    color: var(--market-on-accent);
}

.hero-secondary {
    background: transparent;
    color: var(--market-accent);
    border: 1.5px solid var(--market-accent);
    border-radius: 0.5rem;
    font-weight: 600;
}

/* Page-topper hero */
.hero-banner {
    position: relative;
    display: flex;
    width: 100%;
    min-height: clamp(320px, 52vw, 620px);
    margin: 0;
    border-bottom: 1px solid var(--market-outline);
    background: var(--market-night);
    overflow: hidden;
}

.hero-banner img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(16, 21, 29, 0.10) 0%, rgba(16, 21, 29, 0.18) 40%, rgba(16, 21, 29, 0.78) 100%),
        linear-gradient(90deg, rgba(16, 21, 29, 0.55) 0%, rgba(16, 21, 29, 0.20) 55%, rgba(16, 21, 29, 0.08) 100%);
    pointer-events: none;
}

.hero-banner__overlay {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    padding: var(--nav-clearance) 0 2.75rem;
    z-index: 1;
}

.hero-banner__overlay h1,
.hero-banner__overlay p,
.hero-banner__overlay .eyebrow {
    color: #ffffff;
}

.hero-banner__overlay h1 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    line-height: 1.02;
    margin-bottom: 1.25rem;
    max-width: 22ch;
}

.hero-banner__overlay p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 64ch;
    margin-bottom: 1.25rem;
}

.hero-banner__overlay .btn.btn-outline-dark {
    border-color: rgba(255, 255, 255, 0.8);
    color: #ffffff;
    background: rgba(16, 21, 29, 0.12);
}

.hero-banner__overlay .btn.btn-outline-dark:hover,
.hero-banner__overlay .btn.btn-outline-dark:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.95);
}

.hero-media-card {
    margin: 0;
    border-radius: 0.85rem;
    overflow: hidden;
    background: var(--market-surface);
    border: 1px solid var(--market-outline-variant);
    box-shadow: var(--soft-shadow);
}

.hero-media-card img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center center;
}

.hero-media-card.hero-media-card--full img {
    height: auto;
    aspect-ratio: 1717 / 916;
    object-fit: contain;
}

/* Contact page image uses its native ratio to avoid unnecessary crop. */
.contact-hero-media-card {
    aspect-ratio: 1180 / 482;
}

.contact-hero-media-card img {
    height: 100%;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--market-accent);
}

/* Page-topper padding for sticky navbar clearance */
body.marketplace-page:not(.landing-page) .page-topper {
    padding-top: var(--nav-clearance);
    padding-bottom: 2.5rem;
}

/* Sections */
.section-space {
    padding: 4.5rem 0;
}

.surface-panel {
    background: var(--market-surface-container-low);
}

/* Cards (home category, products category, about partner) */
.card {
    background: var(--market-surface);
    border: 1px solid var(--market-outline-variant);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 41, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card.shadow-sm {
    box-shadow: 0 1px 3px rgba(15, 23, 41, 0.04);
}

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

.card .card-body {
    padding: 1.5rem;
}

.card-media {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center center;
    display: block;
    border-bottom: 1px solid var(--market-outline-variant);
}

.card h3 {
    font-size: 1.5rem;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--market-muted);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

/* Partner card on about: brand-blue left rail */
.card.partner-card {
    border-left: 4px solid var(--market-accent);
}

/* Manufacturer logo on category hero */
.manufacturer-logo {
    height: 2.6rem;
    width: auto;
    max-width: 12rem;
    object-fit: contain;
    display: block;
}

/* 404 illustration keeps the full graphic visible */
.error-illustration {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.error-illustration img {
    height: auto;
    max-height: 280px;
    object-fit: contain;
}

/* Contact / legal panels */
.contact-side-panel,
.contact-card,
.legal-card {
    background: var(--market-surface);
    border: 1px solid var(--market-outline-variant);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(15, 23, 41, 0.04);
    padding: 2rem;
}

.contact-side-panel {
    display: flex;
    flex-direction: column;
    padding: 2rem 2rem 0;
}

.contact-side-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-side-panel a {
    color: var(--market-accent);
    font-weight: 600;
}

.contact-side-panel a:hover {
    color: var(--market-primary-container);
}

/* Image within contact side panel */
.contact-side-panel-image {
    display: block;
    margin: 0;
    margin-left: -2rem;
    margin-right: -2rem;
    margin-top: auto;
    margin-bottom: 0;
    border-radius: 0 0 0.75rem 0.75rem;
    overflow: hidden;
}

.contact-side-panel-image img {
    display: block;
    width: 100%;
    aspect-ratio: 826 / 482;
    object-fit: cover;
    object-position: center center;
}

.contact-form-facebook {
    display: flex;
    justify-content: flex-start;
}

.contact-facebook-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 11rem;
    background: #1877f2;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(24, 119, 242, 0.28);
}

.contact-facebook-btn:hover,
.contact-facebook-btn:focus {
    background: #0f5fcc;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(24, 119, 242, 0.36);
}

/* Safety tag */
.safety-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    background: var(--market-highlight);
    color: var(--market-highlight-ink);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* CTA strip (forward-use) */
.cta-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    padding: 3rem;
    border-radius: 1rem;
    background: var(--market-night);
    color: #ffffff;
}

.cta-strip h2 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.cta-strip p {
    color: rgba(238, 242, 255, 0.80);
    margin-bottom: 0;
}

.cta-strip .hero-primary,
.cta-strip .contact-submit {
    background: var(--market-highlight);
    color: var(--market-highlight-ink);
    box-shadow: 0 8px 20px rgba(29, 63, 217, 0.30);
}

.cta-strip .hero-primary:hover,
.cta-strip .contact-submit:hover {
    background: #3a5cff;
    color: var(--market-highlight-ink);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(29, 63, 217, 0.36);
}

/* Footer */
.site-footer {
    background: var(--market-night);
    color: rgba(238, 242, 255, 0.78);
    border-top: 0;
}

.site-footer .brand-logo {
    /* The current logo asset is a JPEG with a white plate. A transparent
       SVG would let us drop this background rule. */
    background: #ffffff;
    padding: 0.35rem 0.55rem;
    border-radius: 0.4rem;
}

.site-footer .brand-lockup strong {
    color: #ffffff;
    font-family: var(--font-display);
}

.site-footer .brand-lockup small {
    color: rgba(238, 242, 255, 0.55);
}

.footer-heading {
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #ffffff;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li + li {
    margin-top: 0.5rem;
}

.footer-links a {
    color: rgba(238, 242, 255, 0.70);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--market-highlight);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(238, 242, 255, 0.10);
    color: rgba(238, 242, 255, 0.45);
}

.site-footer .footer-copy,
.site-footer .contact-meta {
    color: rgba(238, 242, 255, 0.70);
}

/* Legal pages */
.legal-shell {
    max-width: 900px;
}

.legal-card h2 {
    margin-top: 1.8rem;
    font-size: 1.35rem;
}

.legal-card h2:first-child {
    margin-top: 0;
}

/* Forms */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    background: var(--market-surface);
    color: var(--market-ink);
    border: 1px solid var(--market-outline);
    border-radius: 0.5rem;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--market-accent);
    box-shadow: 0 0 0 3px rgba(29, 63, 217, 0.22);
    outline: 0;
}

.form-label,
label {
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--market-muted);
}

.page-loader {
    background: var(--market-bg);
}

/* Responsive */
@media (max-width: 1199.98px) {
    .brand-lockup small {
        display: none;
    }
}

@media (max-width: 767.98px) {
    :root {
        --nav-clearance: 6.5rem;
    }
    .marketplace-nav {
        margin-left: 1rem !important;
        margin-right: 1rem !important;
    }

    .brand-lockup small {
        display: none;
    }

    .contact-side-panel,
    .contact-card,
    .legal-card {
        padding: 1.4rem;
    }

    .contact-side-panel {
        padding: 1.4rem 1.4rem 0;
    }

    .contact-side-panel-image {
        margin-left: -1.4rem;
        margin-right: -1.4rem;
        margin-bottom: 0;
    }

    body.marketplace-page:not(.landing-page) .page-topper {
        padding-bottom: 2rem;
    }

    .hero-banner__overlay {
        padding-bottom: 2rem;
    }

    .hero-banner__overlay h1 {
        max-width: 14ch;
    }

    .section-space {
        padding: 3rem 0;
    }

    .hero-media-card img {
        height: 220px;
    }

    .contact-hero-media-card img {
        height: 100%;
    }

    .card-media {
        height: 190px;
    }
}

/* === Machined Graphite refinements ================================= */

/* The logo bitmap is ultramarine-on-white, so it rides a clean white plate
   to stay legible on the graphite canvas. */
.marketplace-nav .brand-logo {
    background: #ffffff;
    padding: 0.3rem 0.5rem;
    border-radius: 0.4rem;
}

/* Mobile menu toggler stays visible on the dark nav. */
.marketplace-nav .navbar-toggler {
    border-color: var(--market-outline-strong);
}

.marketplace-nav .navbar-toggler-bar {
    background-color: var(--market-ink) !important;
}

/* Precision tick before every eyebrow: a small logo-blue rule. */
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 1.6rem;
    height: 2px;
    margin-right: 0.6rem;
    vertical-align: middle;
    background: var(--market-accent);
}

/* Carried-manufacturer strip, sitting directly under the hero. */
.brand-strip {
    border-top: 1px solid var(--market-outline);
    border-bottom: 1px solid var(--market-outline);
    padding: 1.6rem 0;
}

.brand-strip-label {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--market-faint);
}

.brand-wordmarks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.brand-wordmarks li {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    color: var(--market-muted);
}

/* Scroll reveal: active only when JS opts in and motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
    body.reveal-on .reveal {
        opacity: 0;
        transform: translateY(18px);
        transition:
            opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
            transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: opacity, transform;
    }

    body.reveal-on .reveal.is-visible {
        opacity: 1;
        transform: none;
    }
}
