/* ── CSS хувьсагчид (design tokens) ─────────────────────────────────────── */
:root {
    --bg-deep:      #0d0b08;
    --bg-mid:       #1a1510;
    --bg-horizon:   #2e200f;
    --amber:        #c8892a;
    --amber-soft:   #e8b96a;
    --cream:        #f0e6d0;
    --muted:        rgba(240,230,208,0.38);
    --glass-bg:     rgba(255,255,255,0.04);
    --glass-border: rgba(200,137,42,0.22);
    --glass-hover:  rgba(200,137,42,0.12);

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-ui:      'Jost', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background: var(--bg-deep);
    color: var(--cream);
    font-family: var(--font-ui);
    font-weight: 300;
    overflow: hidden;
    height: 100dvh;
}

/* ── Арын дэвсгэр gradient ───────────────────────────────────────────────── */
.bg-gradient {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 80%, var(--bg-horizon) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 50% 100%, #3d2508 0%, transparent 60%),
        var(--bg-deep);
    pointer-events: none;
}

/* ── Grain texture canvas ────────────────────────────────────────────────── */
#grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 0.045;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* ── Google Model Viewer ─────────────────────────────────────────────────── */
model-viewer {
    position: fixed;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: transparent;
    --poster-color: transparent;
    transition: opacity 0.4s ease;
}

/* ── Гарчиг ──────────────────────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 40px;
    left: 50px;
    z-index: 10;
    animation: fadeSlideDown 1.2s var(--ease-out-expo) both;
}

.header-eyebrow {
    font-family: var(--font-ui);
    font-weight: 200;
    font-size: 10px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 6px;
    opacity: 0.85;
}

.header-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(22px, 3vw, 38px);
    letter-spacing: 0.04em;
    color: var(--cream);
    line-height: 1;
}

/* ── Товчлуур хэсэг ──────────────────────────────────────────────────────── */
.controls {
    position: fixed;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    animation: fadeSlideUp 1.2s var(--ease-out-expo) 0.3s both;
}

.controls button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 22px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 3px;
    color: var(--cream);
    cursor: pointer;
    outline: none;
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    transition:
        background   0.35s var(--ease-out-expo),
        border-color 0.35s var(--ease-out-expo),
        transform    0.35s var(--ease-out-expo),
        box-shadow   0.35s var(--ease-out-expo);
    overflow: hidden;
}

.controls button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(200,137,42,0.18) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-expo);
}

.controls button:hover {
    background: var(--glass-hover);
    border-color: var(--amber);
    transform: translateY(-3px);
    box-shadow:
        0 0 20px rgba(200,137,42,0.15),
        0 8px 32px rgba(0,0,0,0.5);
}

.controls button:hover::after { opacity: 1; }

.controls button.active {
    background: rgba(200,137,42,0.14);
    border-color: var(--amber-soft);
    box-shadow:
        0 0 28px rgba(200,137,42,0.25),
        inset 0 1px 0 rgba(200,137,42,0.3);
}

.controls button.active .btn-mn { color: var(--amber-soft); }

.btn-mn {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--cream);
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-en {
    font-family: var(--font-ui);
    font-size: 8.5px;
    font-weight: 200;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    position: relative;
    z-index: 1;
}

/* ── Зааварчилгаа ─────────────────────────────────────────────────────────── */
.hint {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-size: 9px;
    font-weight: 200;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(240,230,208,0.28);
    animation: fadeIn 2s var(--ease-out-expo) 1s both;
    white-space: nowrap;
}

.hint-sep { opacity: 0.4; }

/* ── Keyframes ───────────────────────────────────────────────────────────── */
@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(18px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .site-header { top: 24px; left: 24px; }
    .controls { gap: 6px; bottom: 36px; }
    .controls button { padding: 11px 14px 9px; }
    .btn-mn { font-size: 14px; }
}
