@font-face {
    font-family: 'Optima';
    src: url('../fonts/Optima.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-black: #000000;
    --text-white: #ffffff;
    --text-black: #000000;
    --gold: #c9a96e;
    --ff-display: 'Optima', 'Optima LT Std', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
    --ff-body: 'Optima', 'Optima LT Std', 'Palatino Linotype', Georgia, serif;
    --site-max-w: 1280px;
}

html {
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    text-rendering: optimizeLegibility;
    background: #000;
}

body {
    font-family: var(--ff-body);
    background: #000;
    color: var(--text-white);
    line-height: 1.75;
    font-size: 16px;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-canvas {
    width: 100%;
    max-width: var(--site-max-w);
    margin: 0 auto;
    background: var(--bg-black);
    position: relative;
    overflow-x: clip;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: var(--bg-black);
}

.site-header__inner {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 72px;
    padding: 12px 24px;
    max-width: var(--site-max-w);
    margin: 0 auto;
    width: 100%;
}

.logo-link {
    display: inline-flex;
    align-items: center;
}

.logo-link img {
    height: 36px;
    width: auto;
}

.header-spacer {
    width: 32px;
    height: 32px;
}

.nav-toggle {
    display: inline-flex;
    justify-self: end;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--text-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin-left: auto;
}

body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.primary-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--bg-black);
    min-height: calc(100dvh - 72px);
    padding-bottom: 48px;
    width: 100%;
}

body.nav-open .primary-nav {
    display: block;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 60px 24px;
    width: 100%;
}

.primary-nav li {
    width: 100%;
    text-align: center;
}

.primary-nav a {
    font-family: var(--ff-display);
    font-size: 1.1rem;
    letter-spacing: normal;
    text-transform: uppercase;
    color: var(--text-white);
    position: relative;
    padding: 4px 0;
    display: inline-block;
    text-align: center;
}

.primary-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.primary-nav a:hover::after {
    transform: scaleX(1);
}

.contact-main {
    max-width: var(--site-max-w);
    margin: 0 auto;
    padding: 40px 24px 56px;
}

.contact-main h1 {
    font-family: var(--ff-display);
    font-weight: 400;
    letter-spacing: normal;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.contact-card {
    background: #ffffff;
    color: #000000;
    border-radius: 4px;
    padding: 20px;
}

.contact-card p {
    margin-bottom: 14px;
}

.contact-card label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.contact-card input[type="text"],
.contact-card input[type="email"],
.contact-card input[type="tel"],
.contact-card select,
.contact-card textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
}

.contact-card textarea {
    resize: vertical;
}

.contact-card button {
    background-color: #000;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.contact-details {
    padding: 20px;
}

.site-footer {
    width: 100%;
    background: var(--bg-black);
    color: var(--text-white);
    padding: 48px 24px 28px;
}

.site-footer,
.site-footer p,
.site-footer span,
.site-footer li,
.site-footer h3,
.site-footer a {
    color: var(--text-white) !important;
}

.site-footer__inner {
    max-width: var(--site-max-w);
    margin: 0 auto;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
}

.site-footer__heading {
    font-family: var(--ff-display);
    font-size: 0.95rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: normal;
    margin-bottom: 1.25em;
}

.site-footer__links {
    list-style: none;
}

.site-footer__links li {
    margin-bottom: 0.65em;
}

.site-footer__links a {
    color: var(--text-white);
    font-size: 0.95rem;
}

.site-footer__contact {
    list-style: none;
}

.site-footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0.85em;
    font-size: 0.95rem;
    line-height: 1.5;
}

.site-footer__contact-icon {
    flex-shrink: 0;
    width: 16px;
    margin-top: 3px;
}

.site-footer__logos {
    text-align: center;
    margin: 8px 0 32px;
}

.site-footer__logos img {
    max-width: min(100%, 320px);
    height: auto;
    margin: 0 auto;
}

.site-footer__copy {
    text-align: center;
    font-size: 0.8rem;
    padding-top: 0;
    line-height: 1.6;
    width: 100%;
    margin: 0 auto;
    display: block;
}

@media (max-width: 899px) {
    .primary-nav {
        width: 100%;
    }

    .header-spacer {
        display: none;
    }
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1.3fr 1fr;
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 32px;
    }
}

@media (min-width: 900px) {
    .site-header__inner {
        padding: 12px 48px;
        min-height: 84px;
        grid-template-columns: 1fr auto 1fr;
    }

    .logo-link {
        justify-self: start;
        grid-column: 1;
    }

    .logo-link img {
        height: 44px;
    }

    .nav-toggle {
        display: none;
    }

    .header-spacer {
        grid-column: 3;
        justify-self: end;
        width: 180px;
    }

    .primary-nav {
        display: block;
        position: static;
        grid-column: 2;
        justify-self: center;
        min-height: 0;
        padding-bottom: 0;
        background: transparent;
        width: auto;
    }

    .primary-nav ul {
        flex-direction: row;
        gap: 36px;
        padding: 0;
        width: auto;
    }

    .primary-nav li {
        width: auto;
    }

    .primary-nav a {
        font-size: 0.95rem;
    }

    .contact-main {
        padding: 48px;
    }
}

/* Search results page — white background (overrides legacy Stacks + site-shell black) */
html.search-page,
html:has(body.search-page),
body.search-page {
    background: #fff !important;
    color: #666;
}

body.search-page .site-canvas,
body.search-page .stacks_out,
body.search-page .stacks_in {
    background: #fff !important;
}

.search-banner {
    width: 100%;
    max-width: 100%;
    line-height: 0;
}

.search-banner__img {
    display: block;
    width: 100%;
    height: auto;
}

.search-banner__img--mobile {
    display: none;
}

@media (max-width: 767px) {
    .search-banner__img--desktop {
        display: none;
    }

    .search-banner__img--mobile {
        display: block;
    }
}
