
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ========================================
   Base
======================================== */

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bcc-color-background);
    color: var(--bcc-color-text);
    font-family: var(--bcc-font-body);
    font-size: var(--bcc-text-base);
    font-weight: var(--bcc-weight-regular);
    line-height: var(--bcc-leading-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

img,
video {
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled,
button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

:where(h1, h2, h3, h4, h5, h6) {
    color: var(--bcc-color-text);
    font-family: var(--bcc-font-heading);
    font-weight: var(--bcc-weight-medium);
    letter-spacing: var(--bcc-tracking-heading);
    line-height: var(--bcc-leading-tight);
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

::selection {
    background: var(--bcc-color-accent);
    color: var(--bcc-color-text);
}

/* ========================================
   Typography
======================================== */

.bcc-text {
    font-family: var(--bcc-font-body);
}

.bcc-heading {
    font-family: var(--bcc-font-heading);
    font-weight: var(--bcc-weight-medium);
    letter-spacing: var(--bcc-tracking-heading);
    line-height: var(--bcc-leading-tight);
}

.bcc-display {
    font-family: var(--bcc-font-heading);
    font-size: clamp(3rem, 7.5vw, var(--bcc-text-7xl));
    font-weight: var(--bcc-weight-medium);
    letter-spacing: var(--bcc-tracking-heading);
    line-height: 0.98;
    text-wrap: balance;
}

.bcc-number,
.bcc-stat-number {
    font-family: var(--bcc-font-numbers);
    font-weight: var(--bcc-weight-medium);
    letter-spacing: var(--bcc-tracking-tight);
    line-height: 1;
    font-variant-numeric: lining-nums tabular-nums;
}

/* ========================================
   Global Container
======================================== */

.bcc-container {
    width: calc(100% - (var(--bcc-container-padding-desktop) * 2));
    max-width: var(--bcc-container-width);
    margin-right: auto;
    margin-left: auto;
}

/* ========================================
   Global Section
======================================== */

.bcc-section {
    width: 100%;
    min-width: 0;
}

/* ========================================
   Global Button System
   Single source of truth for shared buttons
======================================== */

.bcc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bcc-space-2);
    min-height: 48px;
    padding: 0 var(--bcc-space-6);
    border: var(--bcc-border-width) solid var(--bcc-color-primary);
    border-radius: var(--bcc-border-radius-sm);
    background: var(--bcc-color-primary);
    color: var(--bcc-color-surface);
    font-family: var(--bcc-font-body);
    font-size: var(--bcc-text-sm);
    font-weight: var(--bcc-weight-medium);
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color var(--bcc-transition-base),
        color var(--bcc-transition-base),
        border-color var(--bcc-transition-base);
}

.bcc-button:hover {
    border-color: var(--bcc-color-primary-dark);
    background: var(--bcc-color-primary-dark);
    color: var(--bcc-color-surface);
}

.bcc-button:focus-visible {
    outline: 2px solid var(--bcc-color-accent);
    outline-offset: 4px;
}

.bcc-button:disabled,
.bcc-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

/* Accent button */

.bcc-button--accent {
    border-color: var(--bcc-color-accent);
    background: var(--bcc-color-accent);
    color: var(--bcc-color-primary-dark);
}

.bcc-button--accent:hover {
    border-color: var(--bcc-color-accent-hover);
    background: var(--bcc-color-accent-hover);
    color: var(--bcc-color-primary-dark);
}

/* Shared keyboard focus */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--bcc-color-accent);
    outline-offset: 4px;
}

/* ========================================
   Accessibility
======================================== */

.bcc-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;
}

[hidden] {
    display: none !important;
}

/* ========================================
   Tablet
======================================== */

@media (max-width: 1000px) {
    .bcc-container {
        width: calc(100% - (var(--bcc-container-padding-tablet) * 2));
    }

    .bcc-display {
        font-size: clamp(2.75rem, 8vw, 5rem);
    }
}

/* ========================================
   Mobile
======================================== */

@media (max-width: 640px) {
    html {
        scroll-padding-top: 80px;
    }

    .bcc-container {
        width: calc(100% - (var(--bcc-container-padding-mobile) * 2));
    }

    .bcc-display {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .bcc-button {
        min-height: 46px;
        padding-right: var(--bcc-space-5);
        padding-left: var(--bcc-space-5);
    }
}

/* ========================================
   Reduced Motion
======================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
