/* =========================================================
   CHRIS BROWN — GLOBAL STYLES
   ========================================================= */

/* ---------------------------------------------------------
   RESET
   --------------------------------------------------------- */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    min-height: 100vh;
    background: var(--color-brown-deep);
    color: var(--color-cream);
    font-family: var(--font-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.menu-open {
    overflow: hidden;
}


/* ---------------------------------------------------------
   DEFAULT ELEMENTS
   --------------------------------------------------------- */

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

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}


/* ---------------------------------------------------------
   PAGE WRAPPER
   --------------------------------------------------------- */

.page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 50% 25%,
            rgba(93, 60, 42, 0.18) 0%,
            transparent 45%
        ),
        var(--color-brown-deep);
}


/* ---------------------------------------------------------
   CONTAINER
   --------------------------------------------------------- */

.container {
    width: min(
        calc(100% - (var(--container-padding) * 2)),
        var(--container-width)
    );
    margin-inline: auto;
}


/* ---------------------------------------------------------
   GLOBAL TEXT
   --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.05;
}

p {
    font-family: var(--font-primary);
}


/* ---------------------------------------------------------
   SECTION
   --------------------------------------------------------- */

.section {
    position: relative;
    width: 100%;
}


/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */

.site-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 44px;
    padding: 12px 24px;
    border: 1px solid var(--color-cream);
    color: var(--color-cream);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition:
        background-color var(--transition-base),
        color var(--transition-base),
        border-color var(--transition-base);
}

.site-button:hover {
    background-color: var(--color-cream);
    color: var(--color-brown-deep);
}


/* ---------------------------------------------------------
   DARK OVERLAY
   --------------------------------------------------------- */

.page-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-menu);
    background: rgba(10, 7, 5, 0.62);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity var(--transition-base),
        visibility var(--transition-base);
}

.page-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* ---------------------------------------------------------
   GRAIN / TEXTURE
   --------------------------------------------------------- */

.page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}


/* ---------------------------------------------------------
   VIGNETTE
   --------------------------------------------------------- */

.page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at center,
            transparent 42%,
            rgba(8, 5, 4, 0.38) 100%
        );
}


/* ---------------------------------------------------------
   SELECTION
   --------------------------------------------------------- */

::selection {
    background: var(--color-cream);
    color: var(--color-brown-deep);
}


/* ---------------------------------------------------------
   SCROLLBAR
   --------------------------------------------------------- */

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: var(--color-brown-deep);
}

::-webkit-scrollbar-thumb {
    background: rgba(231, 220, 199, 0.35);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(231, 220, 199, 0.55);
}


/* ---------------------------------------------------------
   HIDDEN UTILITY
   --------------------------------------------------------- */

.hidden {
    display: none !important;
}


/* ---------------------------------------------------------
   ACCESSIBILITY
   --------------------------------------------------------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ---------------------------------------------------------
   FOCUS
   --------------------------------------------------------- */

:focus-visible {
    outline: 1px solid var(--color-cream);
    outline-offset: 4px;
}


/* ---------------------------------------------------------
   RESPONSIVE BASE
   --------------------------------------------------------- */

@media (max-width: 768px) {

    :root {
        --container-padding: 22px;
    }

    .container {
        width: min(
            calc(100% - (var(--container-padding) * 2)),
            var(--container-width)
        );
    }

    .site-button {
        min-width: 140px;
        min-height: 42px;
        padding: 11px 20px;
        font-size: 10px;
    }

}



/* =========================================================
   SCROLL ANIMATIONS
   ========================================================= */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(25px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ---------------------------------------------------------
   MANAGEMENT CARD STAGGER
   --------------------------------------------------------- */

.management-card:nth-child(1) {
    transition-delay: 0.05s;
}

.management-card:nth-child(2) {
    transition-delay: 0.12s;
}

.management-card:nth-child(3) {
    transition-delay: 0.19s;
}

.management-card:nth-child(4) {
    transition-delay: 0.26s;
}


/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

.hero {
    opacity: 1;
}

.hero-brown,
.hero-content {
    transition:
        opacity 0.9s ease,
        transform 1s ease;
}

.hero-brown {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px);
}

.hero-content {
    opacity: 0;
    transform: translateY(12px);
}

.hero.hero-loaded .hero-brown {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.hero.hero-loaded .hero-content {
    opacity: 1;
    transform: translateY(0);
}


/* ---------------------------------------------------------
   REDUCED MOTION
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .animate-on-scroll,
    .hero-brown,
    .hero-content {
        opacity: 1;
        transform: none;
        transition: none;
    }

}