/* ══════════════════════════════════════════════
   LAYOUT — background, header, hero, sections, footer
══════════════════════════════════════════════ */

/* ─── Living background ─── */
.bg { position: fixed; inset: 0; z-index: -3; pointer-events: none; overflow: hidden;
    /* fallback when WebGL is unavailable */
    background:
        radial-gradient(60% 50% at 50% 0%, rgba(255, 212, 0, 0.16), transparent 70%),
        radial-gradient(40% 40% at 85% 60%, rgba(185, 110, 0, 0.14), transparent 70%),
        var(--dark-0);
}
#bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s ease; }
#bg-canvas.ready { opacity: 1; }
.bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 20%, transparent 75%);
}
.bg-noise {
    position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Header: floating glass pill ─── */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding-top: 12px; pointer-events: none; }
.header > * { pointer-events: auto; }
.header-main {
    width: calc(100% - 24px); max-width: 1240px; min-height: 62px; padding: 8px 10px 8px 18px;
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    border-radius: var(--radius-full);
    background: rgba(12, 12, 15, 0.62);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 40px -12px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
    transition: background 0.35s, border-color 0.35s;
}
[dir="rtl"] .header-main { padding: 8px 18px 8px 10px; }
.header.scrolled .header-main { background: rgba(8, 8, 10, 0.88); border-color: var(--line-strong); }

.logo-wrapper {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 160px; height: 44px; overflow: hidden; flex-shrink: 0; text-decoration: none;
}
.logo-wrapper img { width: 100%; height: 100%; object-fit: contain; transform: scale(2.3); transition: var(--transition-smooth); }
.logo-wrapper:hover img { transform: scale(2.42); filter: drop-shadow(0 0 14px rgba(255, 212, 0, 0.6)); }

.header-nav { display: flex; align-items: center; gap: 4px; }
.header-link {
    padding: 8px 14px; border-radius: var(--radius-full);
    color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: 0.9rem; white-space: nowrap;
    transition: color 0.3s, background 0.3s;
}
.header-link:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }
.header-link.active { color: var(--gold); background: var(--gold-dim); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.lang-switch-box {
    display: inline-flex; align-items: center; gap: 2px; padding: 3px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: var(--radius-full);
}
.lang-opt-btn {
    padding: 6px 10px; border: none; border-radius: var(--radius-full); background: transparent;
    color: var(--text-secondary); font-family: var(--font-latin); font-size: 0.74rem; font-weight: 800;
    letter-spacing: 0.04em; line-height: 1; cursor: pointer; transition: var(--transition-smooth);
}
.lang-opt-btn:hover { color: #fff; }
.lang-opt-btn.active { background: var(--gold); color: #050506; }

/* ─── Hero ─── */
.hero {
    min-height: 100vh; display: flex; align-items: center; position: relative;
    padding: calc(var(--header-h) + 48px) 0 64px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px; padding: 7px 16px 7px 12px;
    border-radius: var(--radius-full); border: 1px solid var(--line-gold); background: var(--gold-dim);
    color: var(--gold-light); font-size: 0.82rem; font-weight: 600;
}
.badge-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

.hero h1 { font-size: clamp(2.1rem, 4.6vw, 4rem); font-weight: 900; margin-bottom: 22px; }
[dir="rtl"] .hero h1 { line-height: 1.32; }
.hero h1 .gold-text {
    background: linear-gradient(110deg, var(--gold-dark) 0%, var(--gold) 25%, #fff7cf 50%, var(--gold) 75%, var(--gold-dark) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-desc { max-width: 600px; margin-bottom: 32px; color: var(--text-secondary); font-size: clamp(1rem, 1.4vw, 1.14rem); line-height: 1.85; }
.hero-desc strong { color: var(--gold); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { min-height: 56px; padding: 14px 30px; font-size: 1rem; }

/* ─── Sections ─── */
.section { padding: 110px 0; position: relative; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 16px;
    border-radius: var(--radius-full); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
    color: var(--gold); font-size: 0.78rem; font-weight: 700;
}
[dir="ltr"] .section-tag { text-transform: uppercase; letter-spacing: 0.14em; }
.section-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.section-title { font-size: clamp(1.75rem, 3.6vw, 2.9rem); font-weight: 800; color: #fff; }
.section-sub { max-width: 640px; margin: 14px auto 0; color: var(--text-secondary); font-size: 1rem; }

/* ─── Footer ─── */
.footer { padding: 44px 20px calc(44px + env(safe-area-inset-bottom)); text-align: center; border-top: 1px solid var(--line); background: rgba(5, 5, 6, 0.85); }
.footer p { color: var(--text-dim); font-size: 0.85rem; font-weight: 500; }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
    .header-nav { display: none; }
}
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 44px; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-desc { margin-inline: auto; }
}
@media (max-width: 768px) {
    :root { --header-h: 104px; }
    body { padding-bottom: 84px; }
    .container { padding: 0 18px; }
    .header { padding-top: 8px; }
    .header-main { width: calc(100% - 16px); min-height: 54px; padding: 6px 8px 6px 12px; gap: 8px; }
    [dir="rtl"] .header-main { padding: 6px 12px 6px 8px; }
    .logo-wrapper { width: 104px; height: 36px; }
    .lang-opt-btn { padding: 5px 7px; font-size: 0.7rem; }
    .header-actions { gap: 6px; }
    .header-actions .btn-telegram { display: none; } /* the bottom dock already has it */
    .header-actions .btn-gold { min-height: 38px; padding: 6px 13px; font-size: 0.8rem; }
    .hero { min-height: auto; padding: calc(var(--header-h) + 28px) 0 48px; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }
    .section { padding: 72px 0; }
    .section-header { margin-bottom: 36px; }
    .footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
    .logo-wrapper { width: 88px; }
    .lang-opt-btn { padding: 5px 5px; }
    .header-actions .btn-gold { padding: 6px 10px; font-size: 0.74rem; }
    .header-actions .btn-gold i { display: none; }
}

/* anchors land below the floating header */
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
@media (max-width: 768px) {
    .hero h1 { font-size: clamp(1.75rem, 8.2vw, 2.4rem); }
    [dir="rtl"] .hero h1 { line-height: 1.45; }
}

/* ─── 2026-11-07 pro pass ─── */
.lang-menu { display: contents; }
.lang-toggle { display: none; }
@media (max-width: 560px) {
    .lang-switch-box { position: relative; padding: 0; background: none; border: 0; }
    .lang-toggle {
        display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
        border-radius: var(--radius-full); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05);
        color: #fff; font: 800 0.8rem/1 var(--font-latin); letter-spacing: .04em; cursor: pointer;
    }
    .lang-toggle .fa-globe { color: var(--gold); }
    .lang-toggle .fa-chevron-down { font-size: 0.6rem; opacity: .7; transition: transform .2s; }
    .lang-switch-box.open .lang-toggle .fa-chevron-down { transform: rotate(180deg); }
    .lang-menu {
        display: none; position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 20;
        flex-direction: column; gap: 4px; min-width: 120px; padding: 6px;
        border-radius: 16px; border: 1px solid var(--line-gold); background: rgba(10, 10, 12, 0.96);
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8);
    }
    .lang-switch-box.open .lang-menu { display: flex; }
    .lang-menu .lang-opt-btn { min-height: 42px; padding: 0 14px; font-size: 0.85rem; text-align: start; border-radius: 10px; }
    .logo-wrapper { min-height: 44px; display: flex; align-items: center; }
    .header-actions .btn-gold { min-height: 42px; font-size: 0.82rem; }
}
@media (max-width: 380px) {
    .header-actions .btn-gold { padding: 6px 12px; font-size: 0.8rem; }
}
