/* ==========================================================================
   BAOWEY — Global Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */

:root {

    /* ----------------------------------------------------------------------
       Brand colors
       ---------------------------------------------------------------------- */

    --color-white: #FFFFFF;
    --color-black: #111111;
    --color-charcoal: #252525;
    --color-stone: #ababab;
    --color-red: #B3212D;
    --color-surface-grey: #f2f2f2;


    /* ----------------------------------------------------------------------
       Semantic colors
       ---------------------------------------------------------------------- */

    --color-background: var(--color-white);
    --color-surface: var(--color-stone);

    --color-text: var(--color-black);
    --color-text-muted: #686868;

    --color-border: #DDDDDD;

    --color-accent: var(--color-red);
    --color-accent-hover: #941B25;


    /* ----------------------------------------------------------------------
       Typography
       ---------------------------------------------------------------------- */

    --font-display: "Blacker Pro", Georgia, serif;
    --font-ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;


    /* ----------------------------------------------------------------------
       Typography scale
       ---------------------------------------------------------------------- */

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-3xl: 3rem;
    --text-4xl: 4rem;
    --text-display: clamp(3rem, 7vw, 7rem);


    /* ----------------------------------------------------------------------
       Spacing
       ---------------------------------------------------------------------- */

    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;
    --space-10: 8rem;


    /* ----------------------------------------------------------------------
       Layout
       ---------------------------------------------------------------------- */

    --container-width: 1280px;
    --page-padding: 1.5rem;


    /* ----------------------------------------------------------------------
       Borders
       ---------------------------------------------------------------------- */

    --border-thin: 1px solid var(--color-border);


    /* ----------------------------------------------------------------------
       Motion
       ---------------------------------------------------------------------- */

    --ease-standard: cubic-bezier(0.2, 0.65, 0.3, 1);
    --duration-fast: 180ms;
    --duration-standard: 280ms;
    --duration-slow: 500ms;


    /* ----------------------------------------------------------------------
       Other
       ---------------------------------------------------------------------- */

    --radius-small: 2px;
    --radius-medium: 4px;
}


/* ==========================================================================
   2. RESET
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: var(--text-base);
    line-height: 1.6;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.05;
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

p {
    margin: 0 0 var(--space-5);
}

.text-muted {
    color: var(--color-text-muted);
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.container {
    width: min(
        calc(100% - (var(--page-padding) * 2)),
        var(--container-width)
    );

    margin-inline: auto;
}

.section {
    padding-block: var(--space-10);
}


/* ==========================================================================
   5. LINKS
   ========================================================================== */

a {
    transition:
        color var(--duration-fast) var(--ease-standard),
        opacity var(--duration-fast) var(--ease-standard);
}

a:hover {
    color: var(--color-accent);
}


/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 0.75rem 1.5rem;

    border: 1px solid var(--color-black);

    background: var(--color-black);
    color: var(--color-white);

    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 500;

    letter-spacing: 0.02em;

    transition:
        background-color var(--duration-standard) var(--ease-standard),
        border-color var(--duration-standard) var(--ease-standard),
        color var(--duration-standard) var(--ease-standard);
}

.button:hover {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-white);
}


/*
 * Outline button
 */

.button--outline {
    background: transparent;
    color: var(--color-black);
}

.button--outline:hover {
    background: var(--color-black);
    color: var(--color-white);
}


/*
 * Accent button
 */

.button--accent {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-white);
}

.button--accent:hover {
    border-color: var(--color-accent-hover);
    background: var(--color-accent-hover);
}


/* ==========================================================================
   7. ACCESSIBILITY
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}


/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {

    :root {
        --page-padding: 1rem;

        /* Keep the spacing scale monotonic on mobile:
           reduce the tail values proportionally rather than
           breaking the ordering. */
        --text-3xl: 2.25rem;
        --text-4xl: 3rem;

        --space-9: 4rem;
        --space-10: 5rem;
    }

    .section {
        padding-block: var(--space-8);
    }
}


/* ==========================================================================
   9. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}