/**
 * Gallop Design branding foundation
 *
 * Phase B:
 * - Central brand design tokens
 * - Reusable header, navigation, logo and footer primitives
 * - Not loaded by the live site until a later integration phase
 *
 * Generated from shared/branding/config.php
 */

:root {
    --gallop-brand-primary: #17202a;
    --gallop-brand-primary-text: #ffffff;
    --gallop-brand-accent: #c8922e;
    --gallop-brand-accent-dark: #9a6816;
    --gallop-brand-page-background: #f7f5ef;
    --gallop-brand-surface: #ffffff;
    --gallop-brand-text: #1f2937;
    --gallop-brand-muted-text: #5b6470;
    --gallop-brand-border: #e5dfd2;
    --gallop-brand-danger: #b42318;

    --gallop-brand-body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --gallop-brand-heading-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

    --gallop-brand-container-width: 1180px;
    --gallop-brand-header-height: 72px;
    --gallop-brand-radius-small: 6px;
    --gallop-brand-radius-medium: 10px;
    --gallop-brand-radius-large: 16px;
    --gallop-brand-shadow-small: 0 2px 8px rgba(23, 32, 42, 0.08);
    --gallop-brand-shadow-medium: 0 10px 30px rgba(23, 32, 42, 0.12);
    --gallop-brand-transition: 180ms ease;
}

/*
|--------------------------------------------------------------------------
| Branding utilities
|--------------------------------------------------------------------------
*/

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

.gallop-brand-surface {
    background: var(--gallop-brand-surface);
    color: var(--gallop-brand-text);
}

.gallop-brand-muted {
    color: var(--gallop-brand-muted-text);
}

.gallop-brand-accent {
    color: var(--gallop-brand-accent-dark);
}

/*
|--------------------------------------------------------------------------
| Header foundation
|--------------------------------------------------------------------------
*/

.gallop-brand-header {
    position: relative;
    z-index: 50;
    border-bottom: 4px solid var(--gallop-brand-accent);
    background: var(--gallop-brand-primary);
    color: var(--gallop-brand-primary-text);
    font-family: var(--gallop-brand-body-font);
}

.gallop-brand-header__inner {
    display: flex;
    min-height: var(--gallop-brand-header-height);
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.gallop-brand-identity {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    color: var(--gallop-brand-primary-text);
    text-decoration: none;
}

.gallop-brand-identity:hover,
.gallop-brand-identity:focus-visible {
    color: var(--gallop-brand-primary-text);
}

.gallop-brand-identity__logo {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 60px;
    object-fit: contain;
}

.gallop-brand-identity__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.gallop-brand-identity__name {
    overflow: hidden;
    font-family: var(--gallop-brand-heading-font);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallop-brand-identity__tagline {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.76rem;
    line-height: 1.25;
}

/*
|--------------------------------------------------------------------------
| Navigation foundation
|--------------------------------------------------------------------------
*/

.gallop-brand-nav {
    display: flex;
    align-items: center;
}

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

.gallop-brand-nav__link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--gallop-brand-radius-small);
    padding: 8px 12px;
    color: var(--gallop-brand-primary-text);
    font-size: 0.91rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    transition:
        background var(--gallop-brand-transition),
        border-color var(--gallop-brand-transition),
        color var(--gallop-brand-transition);
}

.gallop-brand-nav__link:hover,
.gallop-brand-nav__link:focus-visible {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: var(--gallop-brand-primary-text);
}

.gallop-brand-nav__link[aria-current="page"],
.gallop-brand-nav__link.is-active {
    border-color: var(--gallop-brand-accent);
    background: var(--gallop-brand-accent);
    color: var(--gallop-brand-primary-text);
}

/*
|--------------------------------------------------------------------------
| Mobile navigation controls
|--------------------------------------------------------------------------
*/

.gallop-brand-menu-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--gallop-brand-radius-small);
    background: transparent;
    color: var(--gallop-brand-primary-text);
    cursor: pointer;
    font: inherit;
}

.gallop-brand-menu-toggle:hover,
.gallop-brand-menu-toggle:focus-visible {
    border-color: var(--gallop-brand-accent);
    background: rgba(255, 255, 255, 0.1);
}

/*
|--------------------------------------------------------------------------
| Footer foundation
|--------------------------------------------------------------------------
*/

.gallop-brand-footer {
    border-top: 4px solid var(--gallop-brand-accent);
    background: var(--gallop-brand-primary);
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--gallop-brand-body-font);
}

.gallop-brand-footer__inner {
    display: flex;
    min-height: 110px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 24px;
}

.gallop-brand-footer__identity {
    margin: 0;
    color: var(--gallop-brand-primary-text);
    font-weight: 750;
}

.gallop-brand-footer__text {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.gallop-brand-footer__link {
    color: var(--gallop-brand-primary-text);
    font-weight: 700;
    text-decoration-color: var(--gallop-brand-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.gallop-brand-footer__link:hover,
.gallop-brand-footer__link:focus-visible {
    color: var(--gallop-brand-accent);
}

/*
|--------------------------------------------------------------------------
| Accessibility
|--------------------------------------------------------------------------
*/

.gallop-brand-skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 9999;
    transform: translateY(-150%);
    border-radius: var(--gallop-brand-radius-small);
    padding: 10px 14px;
    background: var(--gallop-brand-accent);
    color: var(--gallop-brand-primary-text);
    font-weight: 750;
    text-decoration: none;
}

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

.gallop-brand-header a:focus-visible,
.gallop-brand-footer a:focus-visible,
.gallop-brand-menu-toggle:focus-visible {
    outline: 3px solid var(--gallop-brand-accent);
    outline-offset: 3px;
}

/*
|--------------------------------------------------------------------------
| Responsive behavior
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {
    .gallop-brand-header__inner {
        flex-wrap: wrap;
        padding-block: 12px;
    }

    .gallop-brand-menu-toggle {
        display: inline-flex;
    }

    .gallop-brand-nav {
        display: none;
        width: 100%;
        padding-bottom: 12px;
    }

    .gallop-brand-nav.is-open {
        display: block;
    }

    .gallop-brand-nav__list {
        display: grid;
        gap: 6px;
    }

    .gallop-brand-nav__link {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .gallop-brand-container {
        width: min(
            calc(100% - 22px),
            var(--gallop-brand-container-width)
        );
    }

    .gallop-brand-identity__tagline {
        display: none;
    }

    .gallop-brand-footer__inner {
        display: grid;
        justify-items: start;
    }
}

@media print {
    .gallop-brand-header,
    .gallop-brand-footer,
    .gallop-brand-skip-link,
    .gallop-brand-menu-toggle {
        display: none !important;
    }
}
