/* ==========================================
   DESIGN SYSTEM
========================================== */

:root {
    --color-bg: #f7f4ef;
    --color-text: #111111;
    --color-header-bg: rgba(255, 255, 255, 0.15);
    --color-border: rgba(255, 255, 255, 0.25);

    --container: 1280px;

    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 32px;
    --space-lg: 64px;
    --space-xl: 120px;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;

    --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Afacad", sans-serif;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.dark-mode {
    --color-bg: #101010;
    --color-text: #f5f1ea;
    --color-header-bg: rgba(15, 15, 15, 0.20);
    --color-border: rgba(255, 255, 255, 0.10);
}


/* ==========================================
   GLOBAL
========================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    transition: background 0.3s ease, color 0.3s ease;
}

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

a {
    color: inherit;
}


/* ==========================================
   HEADER
========================================== */

.site-header {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 0 var(--space-md);
    pointer-events: none;
}

.site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    min-height: 72px;
    padding: 0 18px 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-header-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.25);
    pointer-events: auto;
    transition: all 0.3s ease;
}

.site-header.is-scrolled .site-header__inner {
    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
}

body.dark-mode .site-header.is-scrolled .site-header__inner {
    background: rgba(15,15,15,0.45);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.04em;
    position: relative;
    z-index: 1002;
}

.site-logo__mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 16px;
    line-height: 1;
}

.site-logo img,
.custom-logo {
    display: block;
    max-height: 52px;
    width: auto;
    vertical-align: middle;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    flex: 0 0 auto;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo__text {
    font-size: 18px;
}

.site-nav {
    margin-left: auto;
}

.site-nav__menu {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__menu a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav__menu a:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

body.dark-mode .site-nav__menu a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.site-nav__menu .current-menu-item > a,
.site-nav__menu .current_page_item > a {
    opacity: 1;
    background: rgba(0, 0, 0, 0.07);
}

body.dark-mode .site-nav__menu .current-menu-item > a,
body.dark-mode .site-nav__menu .current_page_item > a {
    background: rgba(255, 255, 255, 0.1);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1002;
}

.theme-toggle,
.burger {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.34);
    color: var(--color-text);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.theme-toggle {
    font-size: 17px;
}

.theme-toggle:hover,
.burger:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.56);
}

body.dark-mode .theme-toggle,
body.dark-mode .burger {
    background: rgba(255, 255, 255, 0.08);
}

.burger {
    display: none;
}

.burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}


/* ==========================================
   HERO
========================================== */

.site-main {
    min-height: 80vh;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 48px 100px;
    background: linear-gradient(135deg, #111 0%, #2b2118 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
}

.hero__content,
.page-hero__content {
    max-width: 760px;
}

.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 13px;
    opacity: 0.75;
    margin-bottom: 24px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(48px, 8vw, 104px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin: 0 0 32px;
}

.hero p {
    font-size: 20px;
    line-height: 1.6;
    max-width: 620px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    padding: 14px 24px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    opacity: 0.88;
}


/* ==========================================
   FOOTER
========================================== */

.site-footer {
    padding: 32px 48px;
    font-size: 14px;
    opacity: 0.7;
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 900px) {
    .site-header {
        top: 12px;
        padding: 0 14px;
    }

    .site-header__inner {
        min-height: 64px;
        padding: 0 12px 0 16px;
    }

    .site-logo__text {
        font-size: 16px;
        max-width: 160px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .burger {
        display: grid;
    }

    .burger span {
        grid-column: 1;
        grid-row: 1;
    }

    .burger span:nth-child(1) {
        transform: translateY(-6px);
    }

    .burger span:nth-child(2) {
        transform: translateY(0);
    }

    .burger span:nth-child(3) {
        transform: translateY(6px);
    }

    .burger.is-open span:nth-child(1) {
        transform: rotate(45deg);
    }

    .burger.is-open span:nth-child(2) {
        opacity: 0;
    }

    .burger.is-open span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .site-nav {
        position: fixed;
        inset: 0;
        height: 100vh;
        background:
            radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 32%),
            var(--color-bg);
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.65s cubic-bezier(.77, 0, .175, 1), opacity 0.35s ease;
        z-index: 1000;
        margin-left: 0;
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav__menu {
        flex-direction: column;
        gap: 10px;
        width: min(86vw, 460px);
    }

    .site-nav__menu li {
        width: 100%;
    }

    .site-nav__menu a {
        width: 100%;
        min-height: 64px;
        justify-content: center;
        font-size: clamp(28px, 8vw, 52px);
        font-weight: 800;
        letter-spacing: -0.06em;
        opacity: 1;
        background: transparent;
    }

    .site-nav__menu a:hover {
        background: transparent;
        transform: none;
    }

    body.menu-open {
        overflow: hidden;
    }

    .hero {
        padding: 140px 0 80px;
    }

    .hero p {
        font-size: 18px;
    }

    .site-footer {
        padding: 32px 24px;
    }
}

/* ==========================================
   SINGLE PAGE
========================================== */

.page-main {
    padding-top: 140px;
}

.page-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #111 0%, #2b2118 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
}

.page-hero h1 {
    font-size: clamp(42px, 7vw, 88px);
    line-height: 1;
    letter-spacing: -0.06em;
    margin: 0;
}

.page-content {
    padding: 40px 0 100px;
}

.container {
    width: min(calc(100% - 96px), var(--container));
    margin-inline: auto;
}

@media (max-width: 900px) {
    .container {
        width: min(calc(100% - 32px), var(--container));
    }
}

.page-main {
    padding-top: 0;
}

.page-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #111 0%, #2b2118 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
}

.page-hero__content {
    max-width: 820px;
}

.page-hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 13px;
    opacity: 0.75;
    margin-bottom: 24px;
}

.page-hero h1 {
    font-size: clamp(48px, 8vw, 104px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin: 0;
}

.page-hero__description {
    margin-top: 32px;
    font-size: 20px;
    line-height: 1.6;
    max-width: 680px;
}

.page-content {
    padding: 100px 0;
}

@media (max-width: 900px) {
    .page-hero {
        min-height: 64vh;
        padding: 140px 0 80px;
    }

    .page-hero h1 {
        font-size: clamp(42px, 14vw, 72px);
    }

    .page-hero__description {
        font-size: 18px;
    }

    .page-content {
        padding: 64px 0;
    }
}

/* Mobile logo fix */
@media (max-width: 900px) {
    .site-logo {
        max-width: 160px;
        overflow: hidden;
        flex-shrink: 1;
        margin-right: unset;
    }

    .custom-logo-link {
        max-width: 160px;
        overflow: hidden;
        justify-content: flex-start;
        margin-right: auto;
    }

    .site-logo img,
    .custom-logo {
        max-width: 160px;
        max-height: 36px;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: left center;
    }

    .site-header__actions {
        flex-shrink: 0;
    }
}

/* ==========================================
   HEADER ALIGNMENT FIX
========================================== */

.site-header__inner {
    justify-content: flex-start;
}

.site-nav {
    margin-left: auto;
}

.site-header__actions {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .site-header__inner {
        justify-content: flex-start;
    }

    .site-logo {
        margin-right: auto;
        flex-shrink: 1;
    }

    .site-nav {
        margin-left: 0;
    }

    .site-header__actions {
        margin-left: auto;
        flex-shrink: 0;
    }
}

.custom-logo-link {
    margin-right: auto;
}

.site-nav {
    margin-left: auto;
}

.site-header__actions {
    flex-shrink: 0;
}