/* ============================================
   RECERA.RU — Base Styles
   Reset, typography, utility classes
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Prevent layout shift from scrollbar */
body.no-scroll {
    overflow: hidden;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

ul, ol {
    list-style: none;
}

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

/* ---- Utility: Text ---- */
.text-accent   { color: var(--color-accent) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }
.text-muted    { color: var(--color-text-muted) !important; }
.text-center   { text-align: center !important; }
.text-left     { text-align: left !important; }
.text-right    { text-align: right !important; }
.text-uppercase { text-transform: uppercase !important; }
.font-mono     { font-family: var(--font-mono) !important; }

/* ---- Utility: Spacing ---- */
.mt-section    { margin-top: var(--section-padding); }
.mb-section    { margin-bottom: var(--section-padding); }
.pt-section    { padding-top: var(--section-padding); }
.pb-section    { padding-bottom: var(--section-padding); }
.py-section    {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}

/* ---- Utility: Layout ---- */
.d-flex        { display: flex; }
.flex-column   { flex-direction: column; }
.align-center  { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1         { gap: 0.5rem; }
.gap-2         { gap: 1rem; }
.gap-3         { gap: 1.5rem; }
.gap-4         { gap: 2rem; }

/* ---- Utility: Visibility ---- */
.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;
}

/* ---- Section Divider ---- */
.section-divider {
    border: none;
    height: var(--border-width);
    background-color: var(--color-border);
    margin: 0;
}

/* ---- Container override (Bootstrap) ---- */
.container {
    max-width: var(--container-max);
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* ---- Selection ---- */
::selection {
    background-color: var(--color-accent);
    color: var(--color-text-primary);
}

/* ---- Scrollbar (Webkit) ---- */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--color-border-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}
