/* === MAIN.CSS ===
   ПУТЬ: assets/css/main.css
   НАЗНАЧЕНИЕ: базовые токены, типографика, reset, общие элементы (кнопки, контейнер, курсор)
   СВЯЗИ: index.php, sections.css, animations.css, responsive.css
   РАЗМЕР: ~420 строк
*/

/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

/* === ТОКЕНЫ === */
:root {
    /* Черно-золотая палитра, OKLCH */
    --bg-primary: oklch(12% 0.004 90);
    --bg-secondary: oklch(16% 0.006 90);
    --bg-card: oklch(18% 0.008 85);
    --bg-elevated: oklch(21% 0.01 85);

    --gold: oklch(78% 0.13 85);
    --gold-bright: oklch(85% 0.15 88);
    --gold-dim: color-mix(in oklch, var(--gold), var(--bg-primary) 55%);
    --gold-line: color-mix(in oklch, var(--gold), transparent 75%);

    --text-primary: oklch(95% 0.005 90);
    --text-secondary: oklch(75% 0.01 90);
    --text-muted: oklch(52% 0.01 90);

    --border-subtle: color-mix(in oklch, var(--gold), transparent 88%);
    --border-visible: color-mix(in oklch, var(--gold), transparent 65%);

    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Crimson Text', serif;

    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

    --container-max: 1360px;
    --gutter: clamp(20px, 5vw, 64px);
}

/* === RESET === */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    background: var(--bg-primary);
}

html.no-scroll,
html.no-scroll body { overflow: hidden; height: 100%; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

@media (hover: none), (pointer: coarse) {
    body { cursor: auto; }
}

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

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

button {
    font-family: inherit;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
}

::selection {
    background: var(--gold);
    color: var(--bg-primary);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.01em;
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--gold);
}

/* === LAYOUT === */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

section { position: relative; }

/* === CUSTOM CURSOR === */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out-quart), height 0.3s var(--ease-out-quart), background 0.3s;
    mix-blend-mode: difference;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gold-line);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out-quart), height 0.4s var(--ease-out-quart), border-color 0.4s, opacity 0.4s;
}

.cursor-label {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bg-primary);
    background: var(--gold);
    padding: 6px 14px;
    border-radius: 100px;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.3s var(--ease-out-quart);
}

.cursor-ring.is-active { width: 72px; height: 72px; border-color: transparent; }
.cursor-label.is-active { opacity: 1; }
.cursor.is-hidden { opacity: 0; }

@media (hover: none), (pointer: coarse) {
    .cursor, .cursor-ring, .cursor-label { display: none; }
}

/* === BUTTONS === */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 34px;
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid var(--gold);
    color: var(--gold);
    overflow: hidden;
    isolation: isolate;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out-expo);
    z-index: -1;
}

.btn:hover::before { transform: scaleX(1); }
.btn:hover { color: var(--bg-primary); }

.btn-solid {
    background: var(--gold);
    color: var(--bg-primary);
    border-color: var(--gold);
}

.btn-solid::before { background: var(--gold-bright); }

.btn-solid:hover { color: var(--bg-primary); }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); }

/* === 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;
    }
}

/* === LOGO (гроздь винограда + MBC) === */
.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-mark--loader {
    flex-direction: column;
    gap: 14px;
}

.grape-mark {
    flex-shrink: 0;
}

.logo-text {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--text-primary);
}

.footer-top .logo-text {
    font-size: 1.3rem;
}
