/* === BASE.CSS ===
   assets/css/base.css
   НАЗНАЧЕНИЕ: self-host шрифты, токены OKLCH, reset, базовая типографика
   СВЯЗИ: index.php, views/main.php, stage.css
   РАЗМЕР: ~200 строк */

/* --- шрифты (файлы woff2 кладутся позже; до этого работает fallback-стек) --- */
@font-face {
    font-family: 'Jost';
    src: url('../fonts/jost-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('../fonts/cormorant-garamond-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: optional;
}

:root {
    /* поверхности */
    --bg: #000;
    --bg-2: oklch(14% 0.005 80);
    --bg-3: oklch(19% 0.006 80);

    /* текст */
    --fg: oklch(93% 0.01 80);
    --fg-dim: oklch(62% 0.01 80);
    --fg-faint: oklch(45% 0.008 80);

    /* акцент champagne */
    --accent: oklch(80% 0.06 85);
    --accent-soft: oklch(80% 0.06 85 / 0.55);
    --accent-glow: oklch(80% 0.06 85 / 0.35);
    --accent-line: oklch(80% 0.06 85 / 0.22);

    /* границы */
    --hair: oklch(80% 0.06 85 / 0.16);
    --hair-2: oklch(93% 0.01 80 / 0.10);

    /* типографика */
    --font-brand: 'Jost', 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-ui: 'Manrope', 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-insight: 'Cormorant Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;

    /* ритм */
    --gap-xs: 8px;
    --gap-s: 14px;
    --gap-m: 24px;
    --gap-l: 44px;
    --gap-xl: 72px;

    /* кривые */
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast: 220ms;
    --dur-med: 420ms;
    --dur-slow: 900ms;

    /* сцена */
    --stage-max: 700px;

    color-scheme: dark;
}

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

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-ui);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

body {
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

button,
input {
    font: inherit;
    color: inherit;
    margin: 0;
}

button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

input {
    background: none;
    border: 0;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

input:focus {
    outline: none;
}

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

:focus-visible {
    outline: 1px solid var(--accent-soft);
    outline-offset: 3px;
}

svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

p,
h1,
h2,
h3 {
    margin: 0;
    font-weight: inherit;
}

[hidden] {
    display: none !important;
}

/* --- брендовая типографика --- */
.av-wordmark {
    font-family: var(--font-brand);
    font-weight: 300;
    font-size: clamp(21px, 5.2vw, 28px);
    letter-spacing: 0.45em;
    text-indent: 0.45em;
    color: var(--fg);
}

.av-tagline {
    font-family: var(--font-ui);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.34em;
    text-indent: 0.34em;
    color: var(--fg-faint);
    text-transform: uppercase;
}

/* --- утилита: капитель для служебных подписей --- */
.av-eyebrow {
    font-size: 9px;
    letter-spacing: 0.28em;
    text-indent: 0.28em;
    text-transform: uppercase;
    color: var(--accent-soft);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
