/*
Theme Name: Apex Detailing
Author: Metehan Özdemir
Description: A considered automotive portfolio concept with scroll-controlled film.
Version: 1.0.0
Text Domain: apex-detailing
License: GPL-2.0-or-later
*/

/* Foundation and shared design tokens. */
@font-face {
    font-family: Inter;
    src: url('assets/fonts/inter.woff2') format('woff2');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --color-bg: #101112;
    --color-surface: #1a1c1d;
    --color-text: #f1f0e9;
    --color-muted: #b8bab5;
    --color-accent: #d8f34a;
    --color-light: #e8e6de;
    --color-blue: #073568;
    --border: 1px solid rgb(241 240 233 / 20%);
    --font-body: Inter, Arial, sans-serif;
    --font-heading: Impact, 'Arial Narrow', 'Helvetica Neue', sans-serif;
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-6: 48px;
    --space-8: 64px;
    --space-12: 96px;
    --gutter: clamp(24px, 5vw, 88px);
    --container: 1440px;
    --header-height: 96px;
    --admin-offset: 0px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: calc(var(--header-height) + var(--admin-offset) + 16px);
}

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

body.admin-bar {
    --admin-offset: 32px;
}

h1,
h2,
h3,
p,
figure {
    margin: 0;
}

h1,
h2,
h3 {
    font-weight: 500;
    line-height: 1.04;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select {
    font: inherit;
}

button,
a,
select,
summary {
    -webkit-tap-highlight-color: transparent;
}

button,
summary {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button[hidden],
[hidden] {
    display: none;
}

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

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

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 14px 22px;
    border: 1px solid transparent;
    border-radius: 0;
    color: var(--color-bg);
    background: var(--color-accent);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
    transition: background 160ms ease;
}

.button:hover {
    background: #e8ff75;
}

.button span,
.text-link span {
    font-size: 20px;
}

.text-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid currentColor;
    font-size: 13px;
    font-weight: 550;
}

.text-link:hover {
    color: var(--color-accent);
}

.eyebrow {
    font-size: 11px;
    font-weight: 550;
    letter-spacing: 0.16em;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 8px;
    left: 8px;
    padding: 16px;
    color: var(--color-bg);
    background: var(--color-accent);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Shared header and progressive mobile menu. */
.site-header {
    position: absolute;
    z-index: 30;
    top: var(--admin-offset);
    right: 0;
    left: 0;
    transition: background 180ms ease;
}

.site-header.navigation-ready {
    position: fixed;
}

.site-header.is-scrolled,
.site-header.menu-open {
    background: #101112;
}

.header-inner {
    display: flex;
    min-height: var(--header-height);
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    border-bottom: var(--border);
}

.brand {
    display: inline-flex;
    flex-direction: column;
    flex-shrink: 0;
    padding-block: 10px;
    line-height: 1;
}

.brand-name {
    font-size: 35px;
    font-weight: 850;
    font-style: italic;
    letter-spacing: -0.08em;
}

.brand-mark {
    margin-left: 8px;
    color: var(--color-accent);
    font-weight: 400;
}

.brand-descriptor {
    margin-top: 6px;
    font-size: 8px;
    letter-spacing: 0.42em;
}

.primary-navigation {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.5vw, 40px);
}

.primary-navigation > a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    font-size: 12px;
}

.primary-navigation > a:not(.button):hover {
    color: var(--color-accent);
}

.header-cta {
    margin-left: 16px;
}

.menu-toggle {
    display: none;
    min-width: 72px;
    min-height: 44px;
    border: var(--border);
    color: var(--color-text);
    background: transparent;
    font-size: 13px;
}

/* Shared footer. */
.site-footer {
    padding-block: 56px 24px;
    border-top: var(--border);
}

.footer-top,
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.footer-line {
    color: var(--color-muted);
    font-size: 15px;
}

.back-top {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 24px;
    font-size: 12px;
}

.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: var(--border);
    color: var(--color-muted);
    font-size: 10px;
}

.footer-bottom nav {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-bottom nav a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
}

.fallback-content {
    min-height: 70vh;
    padding-top: 200px;
    padding-bottom: 96px;
}

.fallback-content .button {
    margin-top: 32px;
}

@media (max-width: 1023px) {
    .header-cta {
        margin-left: 0;
    }

    .footer-line {
        max-width: 220px;
    }
}

@media (max-width: 782px) {
    body.admin-bar {
        --admin-offset: 46px;
    }
}

@media (max-width: 767px) {
    :root {
        --header-height: 80px;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 0;
    }

    .brand-name {
        font-size: 30px;
    }

    .menu-toggle {
        display: block;
    }

    .primary-navigation {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px 24px;
        padding-bottom: 20px;
    }

    .navigation-ready .primary-navigation {
        display: none;
    }

    .navigation-ready.menu-open .primary-navigation {
        display: flex;
    }

    .primary-navigation > a {
        min-height: 48px;
        font-size: 14px;
    }

    .header-cta {
        width: 100%;
    }

    .footer-top,
    .footer-bottom {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 24px;
    }

    .footer-line {
        max-width: 180px;
        margin-left: auto;
        font-size: 13px;
    }

    .footer-bottom {
        margin-top: 24px;
        font-size: 11px;
    }

    .footer-bottom nav {
        gap: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0s;
        animation: none;
    }
}
