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

:root {
    --bg: #09090b;
    --lime: #a3e635;
    --lime-dark: #84cc16;
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Onest', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(163, 230, 53, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 2px;
}

.lang-btn {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-dim);
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn.active {
    color: var(--bg);
    background: var(--lime);
}

.lang-btn:not(.active):hover {
    color: var(--text);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}
.logo:hover { color: var(--lime); }

.logo-icon {
    width: 52px;
    height: auto;
    filter: brightness(1.2);
}

.btn-telegram {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--bg);
    background: var(--lime);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-telegram:hover {
    background: var(--lime-dark);
    box-shadow: 0 0 24px rgba(163, 230, 53, 0.3);
}

/* ===== First Screen ===== */
.first-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 56px;
}

.first-screen-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    animation: fadeUp 0.8s ease-out both;
}

.hero-title {
    font-size: clamp(28px, 4.5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-subtitle {
    margin-top: 12px;
    font-size: clamp(14px, 1.8vw, 18px);
    font-weight: 400;
    color: var(--text-muted);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Desktop Visual ===== */
.mobile-visual { display: none; }

.desktop-visual {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 10 / 5.5;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.4s forwards;
}

/* Core */
.core {
    position: absolute;
    top: 44%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    opacity: 0;
    animation: scaleIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.core-inner {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 40%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: pulseGlowWhite 3s ease-in-out 1.5s infinite;
}

.core-logo {
    width: 72px;
    height: auto;
    filter: brightness(1.3) drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
}

/* SVG Branches */
.branches-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.branch {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    opacity: 0.5;
}
.branch-1 { animation: drawBranch 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.1s forwards; }
.branch-2 { animation: drawBranch 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.4s forwards; }
.branch-3 { animation: drawBranch 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.7s forwards; }

.node-dot { opacity: 0; }
.node-dot-1 { animation: dotAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1) 2.1s forwards; }
.node-dot-2 { animation: dotAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1) 2.4s forwards; }
.node-dot-3 { animation: dotAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1) 2.7s forwards; }

/* Service Nodes */
.service-node {
    position: absolute;
    text-align: center;
    width: 180px;
    z-index: 10;
    opacity: 0;
}

.node-analytics {
    top: 8%;
    left: 8%;
    animation: nodeReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.1s forwards;
}

.node-mediabuying {
    top: 8%;
    right: 8%;
    animation: nodeReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.4s forwards;
}

.node-creative {
    top: 75%;
    left: 50%;
    transform: translateX(-50%);
    animation: nodeRevealCenter 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.7s forwards;
}

.node-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(163, 230, 53, 0.06);
    border: 1px solid rgba(163, 230, 53, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    transition: all 0.3s;
}

.service-node:hover .node-icon {
    background: rgba(163, 230, 53, 0.12);
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.1);
    border-color: rgba(163, 230, 53, 0.25);
}

.node-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.node-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ===== Mobile Visual ===== */
.mobile-core {
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: scaleInMobile 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.mobile-core .core-inner {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 40%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: pulseGlowWhite 3s ease-in-out 1.5s infinite;
}

.mobile-branch {
    width: 2px;
    height: 0;
    background: var(--lime);
    opacity: 0.4;
    margin: 0 auto;
    border-radius: 1px;
}

/* nth-child: 1=core, 2=branch, 3=node, 4=branch, 5=node, 6=branch, 7=node */
.mobile-visual > :nth-child(2) {
    animation: growBranch 0.6s ease-out 0.8s forwards;
}
.mobile-visual > :nth-child(4) {
    animation: growBranch 0.6s ease-out 1.6s forwards;
}
.mobile-visual > :nth-child(6) {
    animation: growBranch 0.6s ease-out 2.4s forwards;
}

.mobile-node {
    text-align: center;
    opacity: 0;
}

.mobile-visual > :nth-child(3) {
    animation: fadeUp 0.5s ease-out 1.4s forwards;
}
.mobile-visual > :nth-child(5) {
    animation: fadeUp 0.5s ease-out 2.2s forwards;
}
.mobile-visual > :nth-child(7) {
    animation: fadeUp 0.5s ease-out 3.0s forwards;
}

.mobile-node .node-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(163, 230, 53, 0.06);
    border: 1px solid rgba(163, 230, 53, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.mobile-node .node-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.mobile-node .node-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0 32px;
    text-align: center;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    color: var(--bg);
    background: var(--lime);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-cta:hover {
    background: var(--lime-dark);
    box-shadow: 0 0 40px rgba(163, 230, 53, 0.35);
    transform: translateY(-2px);
}

.copyright {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-dim);
}
.copyright:first-of-type {
    margin-top: 32px;
}
.copyright a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.copyright a:hover {
    color: var(--lime);
}

/* ===== Keyframes ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes scaleInMobile {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pulseGlowWhite {
    0%, 100% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.08), 0 0 50px rgba(255, 255, 255, 0.03);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.15), 0 0 80px rgba(255, 255, 255, 0.05);
    }
}
@keyframes drawBranch {
    to { stroke-dashoffset: 0; }
}
@keyframes dotAppear {
    from { opacity: 0; r: 0; }
    to { opacity: 0.8; r: 4; }
}
@keyframes nodeReveal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes nodeRevealCenter {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes growBranch {
    from { height: 0; }
    to { height: 36px; }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .header { padding: 12px 0; }
    .logo { font-size: 15px; letter-spacing: 0; }
    .logo-icon { width: 36px; }
    .btn-telegram { padding: 8px 16px; font-size: 13px; }

    .first-screen {
        min-height: auto;
        padding-top: 72px;
        padding-bottom: 24px;
    }

    .desktop-visual { display: none; }
    .mobile-visual {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 10px 0;
    }

    .mobile-core { margin-bottom: 0; }

    .footer { padding: 32px 0 24px; }
    .btn-cta { padding: 14px 32px; font-size: 16px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .btn-cta { width: 100%; justify-content: center; }
}
