/* MAX-Tender — dark edition. Shared by the layout and every section template. */

/* Fonts: self-hosted variable fonts, latin subset (no requests to Google) */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/cormorant-garamond-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/cormorant-garamond-italic.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url('../fonts/inter-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #0d0c0b;
    --bg-alt: #141311;
    --bg-deep: #080807;
    --ink: #f1ece2;
    --ink-soft: #b9b2a5;
    --ink-mute: #857f74;
    --line: rgba(241, 236, 226, 0.09);
    --line-strong: rgba(241, 236, 226, 0.22);
    --gold: #c9ad7a;
    --gold-light: #dcc497;
    --gold-line: rgba(201, 173, 122, 0.38);
    --serif: 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --maxw: 1080px;
    --gutter: 24px;
    --header-h: 76px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
    background-color: var(--bg);
    color-scheme: dark;
}

body {
    background-color: var(--bg);
    color: var(--ink-soft);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background-color: var(--gold);
    color: var(--bg);
}

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
}

/* Typography */
h1, h2, h3 {
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -0.005em;
    line-height: 1.08;
}

h1 {
    font-size: clamp(2.7rem, 6.4vw, 5rem);
    margin-bottom: 1.6rem;
}

h2 {
    font-size: clamp(2.1rem, 4.2vw, 3.1rem);
    margin-bottom: 1.8rem;
}

/* Thin gold rule above every section heading */
section:not(.hero) h2::before {
    content: "";
    display: block;
    width: 48px;
    height: 1px;
    background-color: var(--gold);
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.7rem;
}

p {
    max-width: 64ch;
    margin-bottom: 1.3rem;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--gold);
    margin-bottom: 1.8rem;
}

.lead {
    font-family: var(--serif);
    font-size: clamp(1.35rem, 2.2vw, 1.6rem);
    font-style: italic;
    line-height: 1.45;
    color: var(--ink);
}

.text-plain {
    color: var(--ink);
    font-weight: 500;
}

.text-link {
    color: var(--ink);
    border-bottom: 1px solid var(--gold-line);
    padding-bottom: 2px;
}

.text-link:hover {
    color: var(--gold-light);
    border-color: var(--gold);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}

header.scrolled {
    background-color: rgba(13, 12, 11, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}

/* Header bar only; the mobile menu is a <nav> too and has its own rules */
header nav {
    max-width: 1240px;
    height: var(--header-h);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.wordmark {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nav-links a {
    color: var(--ink-soft);
    padding: 6px 0;
}

.nav-links a:hover {
    color: var(--gold-light);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Language switcher */
.language-switcher {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    padding-left: 22px;
    border-left: 1px solid var(--line-strong);
}

.lang-link {
    color: var(--ink-mute);
}

.lang-link:hover {
    color: var(--ink);
}

.lang-link.active {
    color: var(--gold);
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 13px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    height: 1px;
    width: 100%;
    background-color: var(--ink);
}

.mobile-menu-toggle span:nth-child(2) {
    width: 70%;
    margin-left: auto;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--bg);
    z-index: 200;
    display: none;
    padding: 24px var(--gutter);
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    color: var(--ink);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    margin-top: 72px;
}

.mobile-nav a {
    font-family: var(--serif);
    font-size: 1.75rem;
    color: var(--ink);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.mobile-nav a:hover {
    color: var(--gold-light);
}

.mobile-lang {
    display: flex;
    gap: 22px;
    margin-top: 36px;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
}

/* Hero */
.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--header-h) + 60px) var(--gutter) clamp(72px, 12vh, 130px);
    background-color: var(--bg);
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 72%;
    display: block;
    filter: brightness(0.82) saturate(0.88) contrast(1.06);
}

/* Shade the photo: dark top for the header, dark left for the text, and a fade into the page */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(13, 12, 11, 0.75) 0%, rgba(13, 12, 11, 0) 26%),
        linear-gradient(90deg, rgba(13, 12, 11, 0.92) 0%, rgba(13, 12, 11, 0.62) 34%, rgba(13, 12, 11, 0) 64%),
        linear-gradient(0deg, var(--bg) 0%, rgba(13, 12, 11, 0.55) 20%, rgba(13, 12, 11, 0) 46%);
}

.hero .wrap {
    width: 100%;
}

.hero h1 {
    max-width: 13ch;
}

.hero p {
    font-size: 1.1rem;
    max-width: 50ch;
    color: rgba(241, 236, 226, 0.8);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 2.6rem;
}

.hero .btn:not(.btn-solid) {
    background-color: rgba(13, 12, 11, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 17px 34px;
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    background-color: transparent;
    cursor: pointer;
}

.btn:hover {
    border-color: var(--gold);
    color: var(--gold-light);
}

.btn-solid {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--bg);
}

.btn-solid:hover {
    background-color: var(--gold-light);
    border-color: var(--gold-light);
    color: var(--bg);
}

/* Sections */
section {
    padding: clamp(80px, 11vw, 140px) var(--gutter);
}

section.alt {
    background-color: var(--bg-alt);
}

.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 2.6rem;
}

/* Two-column layout */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(36px, 7vw, 90px);
    align-items: center;
}

.split.narrow-text {
    grid-template-columns: 1.15fr 1fr;
}

/* Images */
.band {
    width: 100%;
    aspect-ratio: 21 / 8;
    overflow: hidden;
    background-color: var(--bg-alt);
}

.band img,
.media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--bg-alt);
}

.media.portrait {
    aspect-ratio: 3 / 4;
}

/* Lightbox triggers */
.lb {
    cursor: zoom-in;
    position: relative;
}

.lb img {
    transition: transform 1.2s var(--ease), filter 0.6s var(--ease);
    filter: brightness(0.92);
}

.lb:hover img,
.lb:focus-visible img {
    transform: scale(1.035);
    filter: brightness(1);
}

.lb:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 3px;
}

/* Lists */
.feature-list {
    list-style: none;
    max-width: 64ch;
    margin-bottom: 1.6rem;
}

.feature-list li {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.feature-list li:first-child {
    border-top: 1px solid var(--line);
}

/* Image trio */
.trio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 3.4rem;
}

.trio > div {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--bg);
}

.trio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Audience rows */
.rows {
    margin-top: 3rem;
    border-top: 1px solid var(--gold-line);
}

.row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: clamp(20px, 4vw, 64px);
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
}

.row-label h3 {
    margin-bottom: 12px;
}

.row-label .text-link {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.row-body p {
    max-width: 62ch;
}

/* Numbered points */
.points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
    gap: clamp(32px, 4vw, 52px);
    margin-top: 3rem;
}

.point {
    border-top: 1px solid var(--gold-line);
    padding-top: 24px;
}

.point-index {
    display: block;
    font-family: var(--serif);
    font-size: 2.2rem;
    font-style: italic;
    line-height: 1;
    color: var(--gold);
    margin-bottom: 18px;
}

.point p {
    font-size: 0.95rem;
    max-width: none;
}

/* Link columns */
.link-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(36px, 6vw, 80px);
    margin-top: 3.2rem;
}

.link-columns h3 {
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

.link-list {
    list-style: none;
    margin-bottom: 1.8rem;
    border-top: 1px solid var(--line);
}

.link-list li {
    border-bottom: 1px solid var(--line);
}

.link-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    font-family: var(--serif);
    font-size: 1.3rem;
    color: var(--ink);
}

.link-list a::after {
    content: "\2192";
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--ink-mute);
    transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

.link-list a:hover {
    color: var(--gold-light);
}

.link-list a:hover::after {
    color: var(--gold);
    transform: translateX(4px);
}

/* Request block: centred, the closing statement of the page */
section.cta {
    text-align: center;
}

section.cta h2::before {
    margin-left: auto;
    margin-right: auto;
}

section.cta p {
    margin-left: auto;
    margin-right: auto;
}

section.cta .section-actions {
    justify-content: center;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(8, 8, 7, 0.97);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 100%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
}

.lightbox-caption {
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-soft);
    font-size: 1.05rem;
    text-align: center;
    margin: 0;
    max-width: 60ch;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: none;
    border: none;
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font);
    font-weight: 300;
    opacity: 0.6;
    transition: opacity 0.3s var(--ease), color 0.3s var(--ease);
}

.lightbox-close:hover,
.lightbox-nav:hover {
    opacity: 1;
    color: var(--gold-light);
}

.lightbox-close {
    top: 18px;
    right: 22px;
    font-size: 2.2rem;
    line-height: 1;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    padding: 12px;
}

.lightbox-prev {
    left: 12px;
}

.lightbox-next {
    right: 12px;
}

.lightbox-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--ink-mute);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
}

/* Footer */
footer {
    background-color: var(--bg-deep);
    border-top: 1px solid var(--line);
    padding: 44px var(--gutter);
}

footer .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-text {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--ink-mute);
    margin: 0;
    max-width: none;
}

/* Scroll to top */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    background-color: rgba(13, 12, 11, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--ink);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

#scrollToTopBtn:hover {
    border-color: var(--gold);
    color: var(--gold-light);
}

/* Responsive */
@media (max-width: 960px) {
    .nav-links,
    .header-right .language-switcher {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .split,
    .split.narrow-text,
    .points,
    .link-columns,
    .row {
        grid-template-columns: 1fr;
    }

    .row {
        gap: 12px;
    }

    .media,
    .media.portrait {
        aspect-ratio: 16 / 10;
    }

    .band {
        aspect-ratio: 16 / 9;
    }

    .hero {
        min-height: 92vh;
        min-height: 92svh;
    }

    .hero-media img {
        object-position: 66% 70%;
    }

    /* On narrow screens the text sits below the car, so shade from the bottom up */
    .hero::before {
        background:
            linear-gradient(180deg, rgba(13, 12, 11, 0.7) 0%, rgba(13, 12, 11, 0) 22%),
            linear-gradient(0deg, var(--bg) 0%, rgba(13, 12, 11, 0.88) 32%, rgba(13, 12, 11, 0.35) 62%, rgba(13, 12, 11, 0) 80%);
    }
}

/* Phones: the photo sits above the text so the car stays in view */
@media (max-width: 760px) {
    .hero {
        display: block;
        min-height: 0;
        padding: 0 var(--gutter) 72px;
    }

    .hero::before {
        display: none;
    }

    .hero-media {
        position: relative;
        inset: auto;
        z-index: 0;
        height: 62vh;
        height: 62svh;
        min-height: 380px;
        max-height: 600px;
        margin: 0 calc(-1 * var(--gutter));
    }

    .hero-media::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(180deg, rgba(13, 12, 11, 0.75) 0%, rgba(13, 12, 11, 0) 30%),
            linear-gradient(0deg, var(--bg) 0%, rgba(13, 12, 11, 0.5) 22%, rgba(13, 12, 11, 0) 48%);
    }

    .hero-media img {
        object-position: 80% 50%;
    }

    .hero .wrap {
        position: relative;
        margin-top: -48px;
    }
}

@media (max-width: 600px) {
    :root {
        --gutter: 16px;
        --header-h: 64px;
    }

    body {
        font-size: 0.975rem;
    }

    .wordmark {
        font-size: 1.05rem;
        letter-spacing: 0.24em;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn {
        flex: 1 1 100%;
        text-align: center;
    }
}

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

    .lb img,
    .lb:hover img {
        transition: none;
        transform: none;
    }
}

/* Empty and error states */
.page-message {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-h) + 60px);
}

.page-message .section-actions {
    margin-top: 2rem;
}

/* WordPress: keep the fixed header below the admin bar for signed-in editors */
.admin-bar #main-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar #main-header {
        top: 46px;
    }
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
